Connecting Virtual Networks to Adapters
By connecting an adapter on the physical server to a virtual network, you can join all virtual machines and Containers included in the virtual network to the network to which the corresponding adapter is connected.
Let us assume the following:
To connect the eth1 adapter to the pcsnet1 virtual network and thus to join the MyVM virtual machine to the network behind eth1 , run this command on the server:
# vznetcfg net addif pcsnet1 eth1
To check that the eth1 physical adapter has been successfully added to the pcsnet1 virtual network, you can execute the following command:
# vznetcfg if list
Name Type Network ID Addresses
eth1 nic pcsnet1 10.31.252.116/16,fe80::2a9:40ff:fe0f:b6f2/64,dhcp
...
As you can see, the eth1 adapter is now joined to the pcsnet1 virtual network. That means that the MyVM virtual machine whose virtual network adapter is connected to pcsnet1 can access the local network behind eth1 .
At any time, you can disconnect the eth1 physical adapter from the pcsnet1 virtual network (and thus detach the MyVM virtual machine from the local network) by running the following command:
# vznetcfg net delif eth1
|