Attaching instances to networks
Instances can be attached to networks in a variety of ways. At the first boot, an instance can be attached to a network using the nova boot
command. Running instances can be attached to networks using the nova interface-attach
command. Both methods are explained in the upcoming sections.
Attaching instances to networks using Nova boot
Instances are attached to networks at the first boot through the nova boot
command, the dashboard, or the Nova API. The following nova boot
flag provides a network interface to an instance:
--nic net-id=<UUID of Neutron network>
By passing the --nic
flag multiple times, it is possible to attach an instance to more than one Neutron network. The following nova boot
command demonstrates the procedure of connecting an instance to multiple networks at the first boot:
nova boot --flavor <flavor-id> --image <image-id> --nic net-id=<network-uuid1> --nic net-id=<network-uuid2> --nic net-id=<network-uuid3...