Install and configure dual-nic in the XenServer Virtual Machine
When installing OpenStack, my network node is configured with only one nic, so whenConfigure the Open vSwitch (OVS) Service
After running the command
# service openvswitch-switch restart# ovs-vsctl add-br br-ex# ovs-vsctl add-port br-ex eth0
Then, I will not be able to access it through the external IP address on eth0, and the Management IP address will not be accessible. Therefore, the official document requires the network node to have three NICs.
There is no way. I can only create one vm to install the network. This process still encountered problems.
Because my XenServer has two NICs, I created two virtual NICs and mapped them to the two NICs respectively. After the vm is started, I configure the network as follows:
# The primary network interfaceauto eth0iface eth0 inet staticaddress 192.168.234.205netmask 255.255.255.0gateway 192.168.234.1#management interfaceauto eth1iface eth1 inet staticaddress 10.0.0.21netmask 255.255.255.0#gateway 10.0.0.1#Instance tunnels interface.auto eth1:1iface eth1:1 inet staticaddress 10.0.1.21netmask 255.255.255.0
That is, set the Internet IP address on eth0 and the management IP address and tunnels IP address on eth1. However, I found that I could not access the vm through the management on eth1. After a long time, I realized that Nic 2 on XenServer should not be plugged in. This reminds me that if there are two NICs on the host, you must be sure to work.
If you know the problem, you can solve it. If the two virtual network cards are mapped to the same physical network card, the problem will be solved.
Of course, after running the above command, you still cannot access it through the IP address on eth0. This post describes the solution, that is, clearing the IP address of eth0, bind the Internet IP address to the br-ex.
ifconfig eth0 0.0.0.0 ifconfig br-ex 192.168.234.205
You will ask, How can I perform this operation if I cannot connect to this virtual machine?
Of course, the IP address of the management segment of the network node is used for this purpose ,:).
This article permanently updates the link address: