Add support for -drive QEMU syntax, and virtio bus / disk type

This commit is contained in:
Daniel P. Berrange
2008-05-09 16:41:19 +00:00
parent 7967662a52
commit 098ba1a433
46 changed files with 386 additions and 275 deletions

View File

@@ -16,7 +16,7 @@
<emulator>/usr/bin/qemu</emulator>
<disk type='block' device='cdrom'>
<source dev='/dev/cdrom'/>
<target dev='hdc'/>
<target dev='hdc' bus='ide'/>
<readonly/>
</disk>
</devices>

View File

@@ -16,11 +16,11 @@
<emulator>/usr/bin/qemu</emulator>
<disk type='block' device='disk'>
<source dev='/dev/HostVG/QEMUGuest1'/>
<target dev='hda'/>
<target dev='hda' bus='ide'/>
</disk>
<disk type='file' device='floppy'>
<source file='/tmp/firmware.img'/>
<target dev='fda'/>
<target dev='fda' bus='fdc'/>
</disk>
</devices>
</domain>

View File

@@ -16,7 +16,7 @@
<emulator>/usr/bin/qemu</emulator>
<disk type='block' device='disk'>
<source dev='/dev/HostVG/QEMUGuest1'/>
<target dev='hda'/>
<target dev='hda' bus='ide'/>
</disk>
</devices>
</domain>

View File

@@ -16,7 +16,7 @@
<emulator>/usr/bin/qemu</emulator>
<disk type='block' device='disk'>
<source dev='/dev/HostVG/QEMUGuest1'/>
<target dev='hda'/>
<target dev='hda' bus='ide'/>
</disk>
</devices>
</domain>

View File

@@ -16,7 +16,7 @@
<emulator>/usr/bin/qemu</emulator>
<disk type='block' device='disk'>
<source dev='/dev/HostVG/QEMUGuest1'/>
<target dev='hda'/>
<target dev='hda' bus='ide'/>
</disk>
</devices>
</domain>

View File

@@ -16,7 +16,7 @@
<emulator>/usr/bin/qemu</emulator>
<disk type='block' device='disk'>
<source dev='/dev/HostVG/QEMUGuest1'/>
<target dev='hda'/>
<target dev='hda' bus='ide'/>
</disk>
<serial type='pty'>
<target port='0'/>

View File

@@ -16,11 +16,11 @@
<emulator>/usr/bin/qemu</emulator>
<disk type='block' device='disk'>
<source dev='/dev/HostVG/QEMUGuest1'/>
<target dev='hda'/>
<target dev='hda' bus='ide'/>
</disk>
<disk type='file' device='cdrom'>
<source file='/root/boot.iso'/>
<target dev='hdc'/>
<target dev='hdc' bus='ide'/>
<readonly/>
</disk>
</devices>

View File

@@ -16,15 +16,15 @@
<emulator>/usr/bin/qemu</emulator>
<disk type='block' device='disk'>
<source dev='/dev/HostVG/QEMUGuest1'/>
<target dev='hda'/>
<target dev='hda' bus='ide'/>
</disk>
<disk type='block' device='floppy'>
<source dev='/dev/fd0'/>
<target dev='fda'/>
<target dev='fda' bus='fdc'/>
</disk>
<disk type='file' device='floppy'>
<source file='/tmp/firmware.img'/>
<target dev='fdb'/>
<target dev='fdb' bus='fdc'/>
</disk>
</devices>
</domain>

View File

@@ -16,19 +16,19 @@
<emulator>/usr/bin/qemu</emulator>
<disk type='block' device='disk'>
<source dev='/dev/HostVG/QEMUGuest1'/>
<target dev='hda'/>
<target dev='hda' bus='ide'/>
</disk>
<disk type='block' device='disk'>
<source dev='/dev/HostVG/QEMUGuest2'/>
<target dev='hdb'/>
<target dev='hdb' bus='ide'/>
</disk>
<disk type='file' device='disk'>
<source file='/tmp/data.img'/>
<target dev='hdc'/>
<target dev='hdc' bus='ide'/>
</disk>
<disk type='file' device='disk'>
<source file='/tmp/logs.img'/>
<target dev='hdd'/>
<target dev='hdd' bus='ide'/>
</disk>
</devices>
</domain>

View File

@@ -0,0 +1 @@
/usr/bin/qemu -M pc -m 214 -smp 1 -nographic -monitor pty -no-acpi -boot c -drive file=/dev/HostVG/QEMUGuest1,if=ide,index=0,boot=on -drive file=/dev/HostVG/QEMUGuest2,if=ide,media=cdrom,index=2 -drive file=/tmp/data.img,if=virtio,index=0 -drive file=/tmp/logs.img,if=virtio,index=6 -net none -serial none -parallel none -usb

View File

@@ -0,0 +1,34 @@
<domain type='qemu'>
<name>QEMUGuest1</name>
<uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
<memory>219200</memory>
<currentMemory>219200</currentMemory>
<vcpu>1</vcpu>
<os>
<type arch='i686' machine='pc'>hvm</type>
<boot dev='hd'/>
</os>
<clock offset='utc'/>
<on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot>
<on_crash>destroy</on_crash>
<devices>
<emulator>/usr/bin/qemu</emulator>
<disk type='block' device='disk'>
<source dev='/dev/HostVG/QEMUGuest1'/>
<target dev='hda' bus='ide'/>
</disk>
<disk type='block' device='cdrom'>
<source dev='/dev/HostVG/QEMUGuest2'/>
<target dev='hdc' bus='ide'/>
</disk>
<disk type='file' device='disk'>
<source file='/tmp/data.img'/>
<target dev='vda' bus='virtio'/>
</disk>
<disk type='file' device='disk'>
<source file='/tmp/logs.img'/>
<target dev='vdg' bus='virtio'/>
</disk>
</devices>
</domain>

View File

@@ -16,7 +16,7 @@
<emulator>/usr/bin/qemu</emulator>
<disk type='block' device='disk'>
<source dev='/dev/HostVG/QEMUGuest1'/>
<target dev='hda'/>
<target dev='hda' bus='ide'/>
</disk>
<input type='mouse' bus='ps2'/>
<graphics type='sdl'/>

View File

@@ -16,7 +16,7 @@
<emulator>/usr/bin/qemu</emulator>
<disk type='block' device='disk'>
<source dev='/dev/HostVG/QEMUGuest1'/>
<target dev='hda'/>
<target dev='hda' bus='ide'/>
</disk>
<input type='mouse' bus='ps2'/>
<graphics type='vnc' port='5903' listen='127.0.0.1'/>

View File

@@ -16,7 +16,7 @@
<emulator>/usr/bin/qemu</emulator>
<disk type='block' device='disk'>
<source dev='/dev/HostVG/QEMUGuest1'/>
<target dev='hda'/>
<target dev='hda' bus='ide'/>
</disk>
<input type='mouse' bus='usb'/>
</devices>

View File

@@ -16,7 +16,7 @@
<emulator>/usr/bin/qemu</emulator>
<disk type='block' device='disk'>
<source dev='/dev/HostVG/QEMUGuest1'/>
<target dev='hda'/>
<target dev='hda' bus='ide'/>
</disk>
<input type='tablet' bus='usb'/>
</devices>

View File

@@ -16,7 +16,7 @@
<emulator>/usr/bin/qemu</emulator>
<disk type='block' device='disk'>
<source dev='/dev/HostVG/QEMUGuest1'/>
<target dev='hda'/>
<target dev='hda' bus='ide'/>
</disk>
</devices>
</domain>

View File

@@ -19,7 +19,7 @@
<emulator>/usr/bin/qemu</emulator>
<disk type='block' device='disk'>
<source dev='/dev/HostVG/QEMUGuest1'/>
<target dev='hda'/>
<target dev='hda' bus='ide'/>
</disk>
</devices>
</domain>

View File

@@ -16,7 +16,7 @@
<emulator>/usr/bin/qemu</emulator>
<disk type='block' device='disk'>
<source dev='/dev/HostVG/QEMUGuest1'/>
<target dev='hda'/>
<target dev='hda' bus='ide'/>
</disk>
</devices>
</domain>

View File

@@ -16,7 +16,7 @@
<emulator>/usr/bin/qemu</emulator>
<disk type='block' device='disk'>
<source dev='/dev/HostVG/QEMUGuest1'/>
<target dev='hda'/>
<target dev='hda' bus='ide'/>
</disk>
<interface type='user'>
<mac address='00:11:22:33:44:55'/>

View File

@@ -16,7 +16,7 @@
<emulator>/usr/bin/qemu</emulator>
<disk type='block' device='disk'>
<source dev='/dev/HostVG/QEMUGuest1'/>
<target dev='hda'/>
<target dev='hda' bus='ide'/>
</disk>
<interface type='user'>
<mac address='00:11:22:33:44:55'/>

View File

@@ -16,7 +16,7 @@
<emulator>/usr/bin/qemu</emulator>
<disk type='block' device='disk'>
<source dev='/dev/HostVG/QEMUGuest1'/>
<target dev='hda'/>
<target dev='hda' bus='ide'/>
</disk>
<parallel type='tcp'>
<source mode='bind' host='127.0.0.1' service='9999'/>

View File

@@ -16,7 +16,7 @@
<emulator>/usr/bin/qemu</emulator>
<disk type='block' device='disk'>
<source dev='/dev/HostVG/QEMUGuest1'/>
<target dev='hda'/>
<target dev='hda' bus='ide'/>
</disk>
<serial type='dev'>
<source path='/dev/ttyS2'/>

View File

@@ -16,7 +16,7 @@
<emulator>/usr/bin/qemu</emulator>
<disk type='block' device='disk'>
<source dev='/dev/HostVG/QEMUGuest1'/>
<target dev='hda'/>
<target dev='hda' bus='ide'/>
</disk>
<serial type='file'>
<source path='/tmp/serial.log'/>

View File

@@ -16,7 +16,7 @@
<emulator>/usr/bin/qemu</emulator>
<disk type='block' device='disk'>
<source dev='/dev/HostVG/QEMUGuest1'/>
<target dev='hda'/>
<target dev='hda' bus='ide'/>
</disk>
<serial type='pty'>
<target port='0'/>

View File

@@ -16,7 +16,7 @@
<emulator>/usr/bin/qemu</emulator>
<disk type='block' device='disk'>
<source dev='/dev/HostVG/QEMUGuest1'/>
<target dev='hda'/>
<target dev='hda' bus='ide'/>
</disk>
<serial type='pty'>
<target port='0'/>

View File

@@ -16,7 +16,7 @@
<emulator>/usr/bin/qemu</emulator>
<disk type='block' device='disk'>
<source dev='/dev/HostVG/QEMUGuest1'/>
<target dev='hda'/>
<target dev='hda' bus='ide'/>
</disk>
<serial type='tcp'>
<source mode='bind' host='127.0.0.1' service='9999'/>

View File

@@ -16,7 +16,7 @@
<emulator>/usr/bin/qemu</emulator>
<disk type='block' device='disk'>
<source dev='/dev/HostVG/QEMUGuest1'/>
<target dev='hda'/>
<target dev='hda' bus='ide'/>
</disk>
<serial type='tcp'>
<source mode='connect' host='127.0.0.1' service='9999'/>

View File

@@ -16,7 +16,7 @@
<emulator>/usr/bin/qemu</emulator>
<disk type='block' device='disk'>
<source dev='/dev/HostVG/QEMUGuest1'/>
<target dev='hda'/>
<target dev='hda' bus='ide'/>
</disk>
<serial type='udp'>
<source mode='bind' host='127.0.0.1' service='9999'/>

View File

@@ -16,7 +16,7 @@
<emulator>/usr/bin/qemu</emulator>
<disk type='block' device='disk'>
<source dev='/dev/HostVG/QEMUGuest1'/>
<target dev='hda'/>
<target dev='hda' bus='ide'/>
</disk>
<serial type='unix'>
<source mode='connect' path='/tmp/serial.sock'/>

View File

@@ -16,7 +16,7 @@
<emulator>/usr/bin/qemu</emulator>
<disk type='block' device='disk'>
<source dev='/dev/HostVG/QEMUGuest1'/>
<target dev='hda'/>
<target dev='hda' bus='ide'/>
</disk>
<serial type='vc'>
<target port='0'/>