mirror of https://gitee.com/openkylin/libvirt.git
xen: add QED format test
Follow up of commit 340bb6b7
to add unit tests for the QED format
support. Also add missing QED case in xenFormatXLDisk()
This commit is contained in:
parent
1a9148fbdf
commit
9cae9c886b
|
@ -1050,6 +1050,9 @@ xenFormatXLDisk(virConfValuePtr list, virDomainDiskDefPtr disk)
|
|||
case VIR_STORAGE_FILE_QCOW2:
|
||||
virBufferAddLit(&buf, "qcow2");
|
||||
break;
|
||||
case VIR_STORAGE_FILE_QED:
|
||||
virBufferAddLit(&buf, "qed");
|
||||
break;
|
||||
/* set default */
|
||||
default:
|
||||
virBufferAddLit(&buf, "raw");
|
||||
|
|
|
@ -0,0 +1,25 @@
|
|||
name = "XenGuest2"
|
||||
uuid = "c7a5fdb2-cdaf-9455-926a-d65c16db1809"
|
||||
maxmem = 579
|
||||
memory = 394
|
||||
vcpus = 1
|
||||
pae = 1
|
||||
acpi = 1
|
||||
apic = 1
|
||||
viridian = 0
|
||||
rtc_timeoffset = 0
|
||||
localtime = 0
|
||||
on_poweroff = "destroy"
|
||||
on_reboot = "restart"
|
||||
on_crash = "restart"
|
||||
device_model = "/usr/lib/xen/bin/qemu-system-i386"
|
||||
sdl = 0
|
||||
vnc = 1
|
||||
vncunused = 1
|
||||
vnclisten = "127.0.0.1"
|
||||
vif = [ "mac=00:16:3e:66:92:9c,bridge=xenbr1,script=vif-bridge,model=e1000" ]
|
||||
parallel = "none"
|
||||
serial = "none"
|
||||
builder = "hvm"
|
||||
boot = "d"
|
||||
disk = [ "target=/var/lib/libvirt/images/XenGuest2,format=qed,backendtype=qdisk,vdev=hda,access=rw" ]
|
|
@ -0,0 +1,45 @@
|
|||
<domain type='xen'>
|
||||
<name>XenGuest2</name>
|
||||
<uuid>c7a5fdb2-cdaf-9455-926a-d65c16db1809</uuid>
|
||||
<memory unit='KiB'>592896</memory>
|
||||
<currentMemory unit='KiB'>403456</currentMemory>
|
||||
<vcpu placement='static'>1</vcpu>
|
||||
<os>
|
||||
<type arch='x86_64' machine='xenfv'>hvm</type>
|
||||
<loader type='rom'>/usr/lib/xen/boot/hvmloader</loader>
|
||||
<boot dev='cdrom'/>
|
||||
</os>
|
||||
<features>
|
||||
<acpi/>
|
||||
<apic/>
|
||||
<pae/>
|
||||
</features>
|
||||
<clock offset='variable' adjustment='0' basis='utc'/>
|
||||
<on_poweroff>destroy</on_poweroff>
|
||||
<on_reboot>restart</on_reboot>
|
||||
<on_crash>restart</on_crash>
|
||||
<devices>
|
||||
<emulator>/usr/lib/xen/bin/qemu-system-i386</emulator>
|
||||
<disk type='file' device='disk'>
|
||||
<driver name='qemu' type='qed'/>
|
||||
<source file='/var/lib/libvirt/images/XenGuest2'/>
|
||||
<target dev='hda' bus='ide'/>
|
||||
<address type='drive' controller='0' bus='0' target='0' unit='0'/>
|
||||
</disk>
|
||||
<controller type='ide' index='0'/>
|
||||
<interface type='bridge'>
|
||||
<mac address='00:16:3e:66:92:9c'/>
|
||||
<source bridge='xenbr1'/>
|
||||
<script path='vif-bridge'/>
|
||||
<model type='e1000'/>
|
||||
</interface>
|
||||
<input type='mouse' bus='ps2'/>
|
||||
<input type='keyboard' bus='ps2'/>
|
||||
<graphics type='vnc' port='-1' autoport='yes' listen='127.0.0.1'>
|
||||
<listen type='address' address='127.0.0.1'/>
|
||||
</graphics>
|
||||
<video>
|
||||
<model type='cirrus' vram='8192' heads='1' primary='yes'/>
|
||||
</video>
|
||||
</devices>
|
||||
</domain>
|
|
@ -258,6 +258,9 @@ mymain(void)
|
|||
DO_TEST("new-disk");
|
||||
DO_TEST_FORMAT("disk-positional-parms-full", false);
|
||||
DO_TEST_FORMAT("disk-positional-parms-partial", false);
|
||||
#ifdef LIBXL_HAVE_QED
|
||||
DO_TEST_FORMAT("disk-qed", false);
|
||||
#endif
|
||||
DO_TEST("spice");
|
||||
DO_TEST("spice-features");
|
||||
DO_TEST("vif-rate");
|
||||
|
|
Loading…
Reference in New Issue