配置文件/etc/xen/mywindows。内容如下
- import os, re
- arch_libdir = ‘lib‘
- arch = os.uname()[4]
- if os.uname()[0] == ‘Linux‘ and re.search(‘64‘, arch):
- arch_libdir = ‘lib64‘
- kernel = "/usr/lib/xen/boot/hvmloader"
- builder=‘hvm‘
- memory = 3000
- name = "mywindows"
- vcpus=8
- pae=1
- acpi=1
- vif = [ ‘type=ioemu, mac=00:B6:4A:E7:88:4C, bridge=bond0‘ ]
- disk = [ ‘phy:/dev/sda6,hda,w‘ , ‘file:/root/win2003.iso,hdc:cdrom,r‘ ]
- device_model = ‘/usr/‘ + arch_libdir + ‘/xen/bin/qemu-dm‘
- boot="cda"
- sdl=0
- opengl=0
- vnc=1
- vnclisten="0.0.0.0"
- vncdisplay=1
- vncpasswd=‘VNC_PASS‘
- stdvga=0
- serial=‘pty‘
将windows的iso文件放在,/root/win2003.iso。将vm开机后自动进入光盘引导,这时使用vnc客户端连接5901,然后按提示安装即可
时间: 2024-12-28 22:05:40