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 ...")
 
Line 3: Line 3:
 
<ul>
 
<ul>
 
<li>Create the filesystem disk image:</li>
 
<li>Create the filesystem disk image:</li>
  qemu-img create -f qcow2 root_fs_win7-base.qcow2 10GB
+
  qemu-img create -f qcow2 vnx_rootfs_win7-base.qcow2 10GB
<li>Create a libvirt XML definition (root_fs_win7.xml) containing the virtual machine description:</li>
+
<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/root_fs_win7-base.qcow2'/>
+
       <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 root_fs_win7.xml
+
  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

Revision as of 13:44, 27 July 2011

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

  • Create the filesystem disk image:
  • qemu-img create -f qcow2 vnx_rootfs_win7-base.qcow2 10GB
    
  • Create a libvirt XML definition (rootfs_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/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).

  • Start the virtual machine with:
  • virsh create rootfs_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