-Install and configure xen in Ubuntu
Lab environment:
Operating System: Ubuntu 12.04.4 lts x86_64
Kernel version: 3.2.0-23-generic
Install bridge-utils:
apt-get install bridge-utils
Configure the bridge network (use static IP address, where the real IP address is replaced by x. x ):
# The loopback network interfaceauto loiface lo inet loopback# The primary network interfaceauto eth0iface eth0 inet static address X.X.X.X netmask 255.255.255.128 gateway X.X.X.Xauto eth0:0iface eth0:0 inet static address X.X.X.X netmask 255.255.255.128auto eth1iface eth1 inet manualauto xenbr1iface xenbr1 inet static address 10.20.20.20netmask 255.255.255.0bridge_ports eth1bridge_stp off
Use apt-get to download and install:
apt-getinstall xen-hypervisor-4.1-amd64 xen-utils-4.1 xenwatch xen-toolsxen-utils-common xenstore-utils
Modify the startup Item after installation:
sed -i‘s/GRUB_DEFAULT=.*\+/GRUB_DEFAULT="Xen 4.1-amd64"/‘ /etc/default/grubupdate-grub2
Modify xend configuration (/etc/xen/xend-config.sxp)
Use the bridging method based on my network configuration. Modify the following:
(network-script ‘network-bridge netdev=eth1‘)
To ensure smooth network connection, you need to configure the following:
Add NAT:
/sbin/iptables-t nat -A POSTROUTINGi -s 10.0.0.0/8 -o eth0 -j MASQUERADE
Enable IP forwarding:
vim/etc/sysctl.confnet.ipv4.ip_forward= 1sysctl -p
Now, the basic configuration of xen is OK.
This article from the "keep walking" blog, please be sure to keep this source http://yao1990.blog.51cto.com/2913182/1559332
Xen: Install xen in Ubuntu