Vnx-rootfswin7
How to create a KVM Windows 7 root filesystem for VNX
- Create the filesystem disk image:
qemu-img create -f qcow2 vnx_rootfs_win7-base.qcow2 10GB
<domain type='kvm'> <name>Win7</name> <memory>524288</memory> <vcpu>1</vcpu> <os> <type arch="i686">hvm</type> <boot dev='hd'/> <boot dev='cdrom'/> </os> <features> <pae/> <acpi/> <apic/> </features> <clock sync="localtime"/> <devices> <emulator>/usr/bin/kvm</emulator> <disk type='file' device='disk'> <source file='/usr/share/vnx/filesystems/vnx_rootfs_win7-base.qcow2'/> <target dev='hda'/> </disk> <disk type='file' device='cdrom'> <source file='/almacen/iso/win7.iso'/> <target dev='hdb'/> </disk> <interface type='network'> <source network='default'/> </interface> <interface type='network'> <source network='default'/> </interface> <interface type='network'> <source network='default'/> </interface> <interface type='network'> <source network='default'/> </interface> <serial type='pty'> <source path='/dev/pts/3'/> <target port='0'/> </serial> <graphics type='vnc'/> </devices> </domain>
Note: change "source file=" lines to whatever fits your case (use full paths).
virsh create rootfs_win7.xml
virt-viewer Win7
Note: you also can access the console through vncviewer:
vncviewer localhost::5005
- Optional: autologin
Known problems
- After the Windows 7 virtual machine is shutdown, a blue screen of death (BSOD) appears...and the machine is rebooted. To stop the virtual machine, just type the following command when the BSOD appears:
virsh destroy Win7