Configuring virtual networks and subnets