LINUX.ORG.RU

например.

<domain type='kvm'>
  <name>winxp</name>
  <uuid>e2725d10-7ada-4f71-eea7-fa6c31a541ee</uuid>
  <memory>1048576</memory>
  <currentMemory>1048576</currentMemory>
  <vcpu>1</vcpu>
  <!--<cpumodel>pentium3</cpumodel>-->
  <os>
    <type arch='i686'>hvm</type>
    <boot dev='hd'/>
  </os>
  <features>
    <acpi/>
  </features>
  <clock offset='utc'/>
  <on_poweroff>destroy</on_poweroff>
  <on_reboot>restart</on_reboot>
  <on_crash>destroy</on_crash>
  <devices>
    <emulator>/usr/bin/kvm</emulator>
    <disk type='file' device='disk'>
      <source file='/dsk/geymsla/vm/winxp.img'/>
      <target dev='hda' bus='ide'/>
    </disk>
    <disk type='file' device='cdrom'>
	<!--<source file='/dsk/cyning/inst/skylink.iso'/>-->
	<source file='/dsk/geymsla/vm/macosx.iso'/>
	<target dev='hdc' bus='ide'/>
	<readonly/>
    </disk>
    <interface type='ethernet'>
      <mac address='00:16:3e:00:00:33'/>
      <script path='/etc/qemu-ifup'/>
      <model type='rtl8139'/>
    </interface>
    <!--
    <hostdev mode='subsystem' type='pci'>
	<source>
	    <address bus='0x07' slot='0x01' function='0x0'/>
	</source>
    </hostdev>
    <hostdev mode='subsystem' type='pci'>
	<source>
	    <address bus='0x07' slot='0x01' function='0x1'/>
	</source>
    </hostdev>
     <hostdev mode='subsystem' type='usb'>
       <source>
       <vendor id='0x13fe'/>
       <product id='0x1d00'/>
     </source>
     </hostdev>

     <hostdev mode='subsystem' type='usb'>
       <source>
       <vendor id='0x16d5'/>
       <product id='0x6501'/>
     </source>
     </hostdev>
    -->
<!--    <serial type='dev'>
      <source path='/dev/ttyUSB0'/>
      <target port='0'/>
    </serial>
    -->
   <console type='dev'>
     <source path='/dev/ttyS0'/>
       <target port='0'/>
    </console>
    <input type='tablet' bus='usb'/>
    <input type='mouse' bus='ps2'/>
    <graphics type='vnc' port='5902' autoport='no' listen=''/>
  </devices>
</domain>

scaldov ★★
()
<domain type='kvm' xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0'>
  <name>WXP</name>
  <uuid>b57805b7-3606-16d6-2061-addc7e201e37</uuid>
  <memory>524288</memory>
  <currentMemory>524288</currentMemory>
  <vcpu>1</vcpu>
  <os>
    <type arch='i686' machine='pc-0.12'>hvm</type>
    <boot dev='hd'/>
  </os>
  <features>
    <acpi/>
    <apic/>
    <pae/>
  </features>
  <clock offset='localtime'/>
  <on_poweroff>destroy</on_poweroff>
  <on_reboot>restart</on_reboot>
  <on_crash>restart</on_crash>
  <devices>
    <emulator>/usr/bin/qemu-kvm</emulator>
    <disk type='file' device='cdrom'>
      <driver name='qemu' type='raw'/>
      <target dev='hdc' bus='ide'/>
      <readonly/>
      <address type='drive' controller='0' bus='1' unit='0'/>
    </disk>
    <disk type='block' device='disk'>
      <driver name='qemu' type='raw' cache='writethrough'/>
      <source dev='/dev/VM/VM-WinXP'/>
      <target dev='vda' bus='virtio'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
    </disk>
    <controller type='ide' index='0'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/>
    </controller>
    <interface type='bridge'>
      <mac address='52:54:00:e1:61:a1'/>
      <source bridge='br0'/>
      <model type='virtio'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
    </interface>
    <serial type='pty'>
      <target port='0'/>
    </serial>
    <serial type='vc'>
      <target port='1'/>
    </serial>
    <console type='pty'>
      <target type='serial' port='0'/>
    </console>
    <input type='tablet' bus='usb'/>
    <input type='mouse' bus='ps2'/>
    <graphics type='spice' autoport='yes' keymap='en-us'/>
    <video>
      <model type='qxl' heads='1'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
    </video>
    <memballoon model='virtio'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
    </memballoon>
  </devices>
  <qemu:commandline>
    <qemu:arg value='-device'/>
    <qemu:arg value='virtio-serial,max_ports=30'/>
     <qemu:arg value='-device'/>
    <qemu:arg value='spicevmc,subtype=vdagent,nr=0'/>
  </qemu:commandline>
</domain>

Держи с virtio и spice на вырост :]

vasily_pupkin ★★★★★
()
Вы не можете добавлять комментарии в эту тему. Тема перемещена в архив.