mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
Add support for -drive QEMU syntax, and virtio bus / disk type
This commit is contained in:
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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'/>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
1
tests/qemuxml2argvdata/qemuxml2argv-disk-virtio.args
Normal file
1
tests/qemuxml2argvdata/qemuxml2argv-disk-virtio.args
Normal 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
|
||||
34
tests/qemuxml2argvdata/qemuxml2argv-disk-virtio.xml
Normal file
34
tests/qemuxml2argvdata/qemuxml2argv-disk-virtio.xml
Normal 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>
|
||||
@@ -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'/>
|
||||
|
||||
@@ -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'/>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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'/>
|
||||
|
||||
@@ -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'/>
|
||||
|
||||
@@ -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'/>
|
||||
|
||||
@@ -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'/>
|
||||
|
||||
@@ -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'/>
|
||||
|
||||
@@ -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'/>
|
||||
|
||||
@@ -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'/>
|
||||
|
||||
@@ -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'/>
|
||||
|
||||
@@ -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'/>
|
||||
|
||||
@@ -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'/>
|
||||
|
||||
@@ -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'/>
|
||||
|
||||
@@ -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'/>
|
||||
|
||||
Reference in New Issue
Block a user