分类: LINUX
2012-02-16 13:36:15
1. allocate disk space for the new windows
dd if=/dev/zero of=/export/data/xen/images/BizInt05.dev bs=1M count=40960 |
dd if /dev/null of /export/data/xen/images/BizInt05.dev bs=1M seek=40960 (dynamically allocated disk space ) |
2.edit virtual files for windows .
more /etc/xen/BizInt05.dev
#### specified meaning through "man virt-install "
name = "BizInt05.dev" uuid = "e6dc597e-037a-4ac4-872f-af58c5d1789c" # optional maxmem = 2048 memory = 2048 vcpus = 2 cpus = "2-7" builder = "hvm" kernel = "/usr/lib/xen/boot/hvmloader" boot = "cda" # boot sequnence . note ,c=disk ,h=cd-rom .a =floppy # if you use pxe ,first boot device is "n",network ,finished installation and fall back. pae = 1 acpi = 1 apic = 1 localtime = 1 on_poweroff = "destroy" on_reboot = "restart" on_crash = "restart" device_model = "/usr/lib64/xen/bin/qemu-dm" usb = 1 usbdevice = "tablet" sdl = 0 vnc = 1 vncunused = 1 vnclisten = "0.0.0.0" disk = [ "tap:aio:/export/data/xen/images/BizInt05.dev-disk0,hda,w",'file:/mnt/cdrom/win7.iso,hdc:cdrom,r' ] #####
note : win7.iso is available on
192.168.0.2:/Software/OS/Microsoft.Windows.7.Enterprise.x64.SP1.Integrated.October.2011-BIE/bie7641011.iso
,rename it to win7.iso ##### #disk = [ "tap:aio:/export/data/xen/images/BizInt05.dev-disk0,hda,w" ] vif = [ "mac=00:16:36:33:38:6f,bridge=xenbr0,script=vif-bridge,vifname=vif9.0" ] parallel = "none" serial = "pty" |
3. create vm
xm create bizint05.dev root 11598 5310 0 Dec12 ? 00:04:38 /usr/lib64/xen/bin/qemu-dm -d 57 -m 2048 -boot dca -localtime -serial pty -vcpus 2 -acpi -usb -usbdevice tablet -domain-name BizInt05.dev -net nic,vlan=1,macaddr=00:16:36:33:38:6f,model=rtl8139 -net tap,vlan=1,bridge=xenbr0 -vnc 0.0.0.0:57 -vncunused |
4. connect this windows via vncviewer,and start installation .