Difference between revisions of "Vnx-rootfswin7"
(Created page with "{{Title|How to create a Windows 7 root-file-system for VNX}} <ul> <li>Create the filesystem disk image:</li> qemu-img create -f qcow2 root_fs_win7-base.qcow2 10GB <li>Create a ...") |
|||
(2 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
− | {{Title|How to create a Windows 7 root | + | {{Title|How to create a KVM Windows 7 root filesystem for VNX}} |
<ul> | <ul> | ||
<li>Create the filesystem disk image:</li> | <li>Create the filesystem disk image:</li> | ||
− | qemu-img create -f qcow2 | + | qemu-img create -f qcow2 vnx_rootfs_win7-base.qcow2 10GB |
− | <li>Create a libvirt XML definition ( | + | <li>Create a libvirt XML definition (rootfs_win7.xml) containing the virtual machine description:</li> |
<pre> | <pre> | ||
<domain type='kvm'> | <domain type='kvm'> | ||
Line 24: | Line 24: | ||
<emulator>/usr/bin/kvm</emulator> | <emulator>/usr/bin/kvm</emulator> | ||
<disk type='file' device='disk'> | <disk type='file' device='disk'> | ||
− | <source file='/usr/share/vnx/filesystems/ | + | <source file='/usr/share/vnx/filesystems/vnx_rootfs_win7-base.qcow2'/> |
<target dev='hda'/> | <target dev='hda'/> | ||
</disk> | </disk> | ||
Line 54: | Line 54: | ||
<li>Start the virtual machine with:</li> | <li>Start the virtual machine with:</li> | ||
− | virsh create | + | virsh create rootfs_win7.xml |
<li>Open virtual machine console with:</li> | <li>Open virtual machine console with:</li> | ||
virt-viewer Win7 | virt-viewer Win7 |
Latest revision as of 01:28, 9 June 2012
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