Now it is time to start a VM and attach it to one of the flat networks. This is really easy, as there is no need for the tenant to provision networks, subnets, routers and floating IPs to use them. The flat networks have been allocated by the cloud admin and have the attribute shared. The shared attribute allows it for all tenants to attach VMs directly to the flat networks without using tenant routers and NAT.
The first step is to get the ID of the first flat network (flat–198–19–1), which is used in this example. The image-id is the same as used for the first VM.
nova boot --image a13badd0-28a6-4d2a-a05b-7c064b747b7e --flavor Cirros --nic net-id=<NET ID of the first flat network> testvmflat1
The VM gets it’s IP address by using DHCP. The DHCP server acts also as the proxy to the metadata service to provide cloud init data for the started VM. There is no need to use a floating IP for the VM, as the VM gets a „flat“ IP address. The intention for the flat network was, to avoid NAT, which is sometimes necessary for performance reasons or the use of applications, which cannot handle NAT.