debian安装xen

http://www.vpsee.com/2010/03/install-xen-on-debian/

http://www.howtoforge.com/virtualization-with-xen-on-debian-lenny-amd64

1、sudo apt-get install xen-hypervisor-3.2-1-amd64 xen-linux-system-2.6.26-2-xen-amd64 xen-utils-3.2-1 xen-tools xenstore-utils

2、vi/etc/modules

loopmax_loop=64

3、vi/etc/xen/xend-config.sxp

#(network-scriptnetwork-dummy)

(network-scriptnetwork-custom)

cat /etc/xen/scripts/network-custom
#!/bin/bash

dir=$(dirname "$0")
"$dir/network-bridge" "$@" netdev=eth0
"$dir/network-bridge" "$@" netdev=eth1
exit 0
 

4、reboot

5、xen-create-image--hostname=vm01--size=10Gb--swap=512Mb--force--dir=/data/vm--memory=1024Mb--arch=i386--dist=lenny--password--role=udev\

--ip=xxx --netmask=255.255.255.0 --gateway=xxx

5.1

vif         = [ 'ip=xxx,mac=00:16:3E:52:5F:15,bridge=eth0','ip=xxx,mac=00:16:3E:52:5F:16,bridge=eth1' ]

6、xm create vm01.cfg

7、xmconsolevm01

其他相关命令:

CTRL+]退出vm,但是vm还在运行

xmlist

xmshutdownvm01

ln-s/etc/xen/vm01.cfg/etc/xen/auto

相关推荐