分类: LINUX
2008-12-30 11:06:59
++新增一个网桥xenbr1,并使用eth1网卡
http://blog.zhangjianfeng.com/article/744
++修改宿主机的网卡IP
/usr/share/doc/packages/xen/README.SuSE 中这么一段说明
Configuring network interfaces when using Xen bridging:
Due to the renaming of network interfaces by the network-bridge script
(e.g. eth0 to peth0), network interfaces should not be configured or restarted
while they are enslaved to a Xen bridge. Before configuring a network
interface enslaved to a Xen bridge, shutdown all VMs using the interface.
Then use the network-bridge script to remove the Xen bridge and to restore the
network interface back to normal (put peth0 back to eth0). For example, to
remove the Xen bridge and restore eth0 back to normal do the following:
/etc/xen/scripts/network-bridge stop netdev=eth0
With the Xen bridge removed and eth0 put back to normal, eth0 can then be
configured or restarted. Once the configuration is complete, Xen bridging can
be started back up again (creating the Xen bridge and renaming eth0 to peth0)
by doing the following:
/etc/xen/scripts/network-bridge start netdev=eth0
The VMs can then be started again.
++XEN中安装windows操作系统后,出现登录屏幕却无法按ctrl+alt+delete解决办法
- hit crtl-alt-2 (the two-key on top of you normal keyboard, not on the
numeric keypad)
- type this literally (without the quotes): “sendkey ctrl-alt-delete”
- hit ctrl-alt-1 to get back to the vm
*此问题在xen3.2中已经可以用过管理菜单控制
++Domain-0的内存不自动回收的解决办法
xen子机Domain-U关机后,Domain-0并不会自动回收内存,需要手工用命令回收
xm mem-set Domain-0 2048
附1: 安装时用到的配置
more /etc/xen/vm/mgr1_install
ostype=”sles10″
name=”mgr1″
memory=512
vcpus=1
uuid=”29d6679c-7cd8-e731-c9e7-47b4276296da”
#on_crash=”destroy”
on_poweroff=”destroy”
#on_reboot=”destroy”
localtime=0
builder=”linux”
kernel=”/tmp/kernel.UjQch1″
ramdisk=”/tmp/install-initrd.ndmsAh”
extra=”TERM=xterm install= ”
disk=[ 'file:/zhangjianfeng/data/xen/images/mgr1/disk0,xvda,w', ]
vif=[ 'mac=00:16:3e:00:00:01', ]
vfb=["type=vnc,vncunused=1"]
附2: 安装系统后,需要手工处理配置文件,加入相关参数,防止不停重启安装
ostype=”sles10″
name=”mgr1″
#memory=512
memory=768
vcpus=2
uuid=”29d6679c-7cd8-e731-c9e7-47b4276296da”
on_crash=”restart”
on_poweroff=”destroy”
on_reboot=”restart”
localtime=0
builder=”linux”
#kernel=”/tmp/kernel.UjQch1″
#ramdisk=”/tmp/install-initrd.ndmsAh”
kernel = “/boot/vmlinuz-xen”
ramdisk = “/boot/initrd-xen”
extra=”TERM=xterm install= ”
disk=[ 'file:/zhangjianfeng/data/xen/images/mgr1/disk0,xvda,w', 'phy:/dev/cdrom,xvdb,r', 'file:/zhangjianfeng/iso/sles10.1.iso,xvdc,r', ]
#vif=[ 'mac=00:16:3e:00:00:01', ]
vif=[ 'mac=00:16:3e:00:00:01,bridge=xenbr0', 'mac=00:16:3e:00:00:02,bridge=xenbr1' ]
vfb=["type=vnc,vncunused=1"]
#bootloader = “/usr/lib/xen/boot/domUloader.py”
#bootentry = “xvda2:/boot/vmlinuz-xen,/boot/initrd-xen”
root = “/dev/xvda2″
boot=”cda”
##为安装好的虚拟机配置新的kernel和ramdisk配置
附3: 一个windowsXP的配置(Full 虚拟化)
ostype=”windowsxp”
name=”windowsxp”
memory=1024
#memory=512
vcpus=1
uuid=”c759db4d-c15d-23f4-84ed-5c53d4fd1472″
#on_crash=”destroy”
#on_poweroff=”destroy”
#on_reboot=”destroy”
on_crash=”restart”
on_poweroff=”destroy”
on_reboot=”restart”
localtime=1
builder=”hvm”
device_model=”/usr/lib/xen/bin/qemu-dm”
kernel=”/usr/lib/xen/boot/hvmloader”
boot=”dc”
disk=[ 'file:/zhangjianfeng/data/xen/images/windowsxp/disk0,hda,w', 'file:/media/system/windows/xp-en/1.iso,hdc:cdrom,r', ]
#disk=[ 'file:/zhangjianfeng/data/xen/images/windowsxp/disk0,hda,w', 'file:/zhangjianfeng/iso/WXPVOL_EN.ISO,hdc:cdrom,r', ]
vif=[ 'mac=00:16:3e:0a:ef:c0,model=rtl8139,type=ioemu', ]
vnc=1
vncunused=1
apic=0
acpi=1
pae=1
usb=1
usbdevice=’tablet’
usbdevice = ‘host:Generic:058F0O1111B1′
serial=”pty”
audio = 1 #开启声卡
soundhw=’all’ #开启声卡
处理器支持XEN完全虚拟化列表
Xen 配置文件参数名意义
xen的Domain0与子机的关系
##以上内容在SLES10-SP1环境测试