Difference between revisions of "Vnx-rootfswin7"

From VNX
Jump to: navigation, search
(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 ...")
(No difference)

Revision as of 10:43, 29 June 2011

How to create a Windows 7 root-file-system for VNX

  • Create the filesystem disk image:
  • qemu-img create -f qcow2 root_fs_win7-base.qcow2 10GB
    
  • Create a libvirt XML definition (root_fs_win7.xml) containing the virtual machine description:
  • <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/root_fs_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).

  • Start the virtual machine with:
  • virsh create root_fs_win7.xml
    
  • Open virtual machine console with:
  • virt-viewer Win7
    

    Note: you also can access the console through vncviewer:

    vncviewer localhost::5005
    
  • After Windows 7 instalation is finished:
    • 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