Virtual Networks for Virtual Machines in Acropolis Hypervisor
Today we'll look at VLANs and networks for the VMs running on AHV. We'll focus on managed and unmanaged networks, two different ways of providing VM connectivity. With unmanaged networks, VMs get a direct connection to their VLAN of choice. With managed networks, AHV can perform IP Address Management for VMs, handing out IP Addresses via configurable DHCP pools.
Before we get started, here's a look at what we've covered so far in the series:
AHV makes network management for VMs incredibly simple, connecting VMs with just a few clicks. Check out the following YouTube video for a light board walkthrough of AHV VM networking concepts including CLI and Prism examples:
Read on for a description of what's covered in the video, along with a few screen shots.
For user VMs, the networks that a virtual NIC uses can be created and managed in the Prism GUI, Acropolis CLI (aCLI), or using REST. Each virtual network that Acropolis creates is bound to a single VLAN. A virtual NIC created and assigned to a VM is associated with a single network and hence a single VLAN. Multiple virtual NICs (each with a single VLAN or network) can be provisioned for a user VM.
Virtual networks can be viewed and created under the VM page by selecting Network Config:
Under Create Network, friendly names and VLANs can be assigned such as the following unmanaged network in VLAN 27 named Production.
You can see individual VM NIC and network details under the Table view on the VM page by selecting the desired VM and choosing Update:
SSH access to the CVM also allows network configuration via aCLI as follows. Try out the <tab> character in a CLI after typing net. for a complete list of context sensitive options.
Network name Network UUID Type Identifier Production ea8468ec-c1ca-4220-bc51-714483c6a266 VLAN 27 vlan.0 a1850d8a-a4e0-4dc9-b247-1849ec97b1ba VLAN 0
<acropolis> net.list_vms vlan.0
VM UUID VM name MAC address 7956152a-ce08-468f-89a7-e377040d5310 VM1 52:54:00:db:2d:11 47c3a7a2-a7be-43e4-8ebf-c52c3b26c738 VM2 52:54:00:be:ad:bc 501188a6-faa7-4be0-9735-0e38a419a115 VM3 52:54:00:0c:15:35
In addition to simple network creation and VLAN management, Acropolis Hypervisor also supports IP address management (IPAM). IPAM enables AHV to automatically assign IP addresses to virtual machines using DHCP. Each virtual network and associated VLAN can be configured with a specific IP subnet, associated domain settings, and IP address pools available for assignment. Acropolis uses VXLAN and OpenFlow rules in OVS to intercept outbound DHCP requests from user VMs so that the configured IP address pools and settings are provided to VMs.
An IP address is assigned from the pool of addresses when a managed VM NIC is created; the address is released back to the pool when the VM NIC or VM is deleted. Be sure to work with your network team to reserve a range of addresses for VMs before enabling the IPAM feature to avoid address overlap.
Administrators can use Acropolis with IPAM to deliver a complete virtualization deployment, including network management, from the Prism interface. This radically simplifies the traditionally complex network management associated with provisioning virtual machines.
This wraps up my four-part Acropolis networking series. Hopefully the information presented here will help you design and implement a full-featured virtual environment, with the ability to configure both the physical and virtual networks to suit your needs. For more information remember to check out the Acropolis Hypervisor Best Practices Guide and follow the nu.school YouTube channel.
This post was authored by Jason Burns, Senior Solutions & Performance Engineer at Nutanix