/ 中存储网

How To Install Xen On Ubuntu 11.10(Oneiric)的方法

2015-07-11 21:06:41 来源:中存储网

apt-get install xen-tools xen-utils-common xenwatch libxen-dev xen-docs-4.1 xen-hypervisor-4.1-amd64 xen-utils-4.1 xenstore-utils bridge-utils

grub:

修改set default="2",即启动接下来的内核:

submenu "Xen 4.1-amd64" {
menuentry 'Ubuntu GNU/Linux, with Xen 4.1-amd64 and Linux 3.0.0-12-generic' --class ubuntu --class gnu-linux --class
gnu --class os --class xen {
insmod part_msdos
insmod ext2
set root='(hd0,msdos1)'
search --no-floppy --fs-uuid --set=root 162bc81d-3f41-45cb-adf0-d56994a2a55c
echo    'Loading Xen 4.1-amd64 ...'
multiboot       /boot/xen-4.1-amd64.gz placeholder
echo    'Loading Linux 3.0.0-12-generic ...'
module  /boot/vmlinuz-3.0.0-12-generic placeholder root=UUID=162bc81d-3f41-45cb-adf0-d56994a2a55c ro  quiet
splash
echo    'Loading initial ramdisk ...'
module  /boot/initrd.img-3.0.0-12-generic
}

xend配置:
vim /etc/xen/xend-config.sxp添加接下来一行
(network-script network-bridge)

网桥配置

cat /etc/network/interfaces  
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet dhcp
/etc/init.d/networking restart
ifdown eth0
brctl delbr tmpbridge
/etc/xen/scripts/network-bridge start

确认一下是否OK了:
brctl show
bridge name     bridge id               STP enabled     interfaces
eth0            8000.1c6f650addfe       no              peth0

ifconfig命令可以看到熟悉的eth0和peth0,但是eth0和peth0居然有相同的IP,重启后恢复正常。