mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-21 20:15:17 +00:00
relaxng: allow : in /dev/disk/by-path names
On IRC, Hydrar pointed a problem where 'virsh edit' failed on his domain created through an ISCSI pool managed by virt-manager, all because the XML included a block device with colons in the name. * docs/schemas/basictypes.rng (absFilePath): Add colon as safe. * tests/qemuxml2argvdata/qemuxml2argv-disk-iscsi.xml: New file. * tests/qemuxml2argvdata/qemuxml2argv-disk-iscsi.args: Likewise. * tests/qemuxml2argvtest.c (mymain): Test it. Signed-off-by: Eric Blake <eblake@redhat.com>
This commit is contained in:
parent
95003cd511
commit
dfc708750b
@ -242,7 +242,7 @@
|
||||
|
||||
<define name="absFilePath">
|
||||
<data type="string">
|
||||
<param name="pattern">/[a-zA-Z0-9_\.\+\-\\&"'<>/%,]+</param>
|
||||
<param name="pattern">/[a-zA-Z0-9_\.\+\-\\&"'<>/%,:]+</param>
|
||||
</data>
|
||||
</define>
|
||||
|
||||
|
7
tests/qemuxml2argvdata/qemuxml2argv-disk-iscsi.args
Normal file
7
tests/qemuxml2argvdata/qemuxml2argv-disk-iscsi.args
Normal file
@ -0,0 +1,7 @@
|
||||
LC_ALL=C PATH=/bin HOME=/home/test USER=test LOGNAME=test QEMU_AUDIO_DRV=none \
|
||||
/usr/bin/qemu -S -M \
|
||||
pc -m 214 -smp 1 -nographic -monitor unix:/tmp/test-monitor,server,nowait \
|
||||
-no-acpi -boot c -usb \
|
||||
-hda /dev/disk/by-path/ip-192.168.44.1:3260-iscsi-iqn.2011-02.lan.hdserver\
|
||||
:hydrar-desktop.win7vm-lun-0 -net none \
|
||||
-serial none -parallel none
|
28
tests/qemuxml2argvdata/qemuxml2argv-disk-iscsi.xml
Normal file
28
tests/qemuxml2argvdata/qemuxml2argv-disk-iscsi.xml
Normal file
@ -0,0 +1,28 @@
|
||||
<domain type='qemu'>
|
||||
<name>QEMUGuest1</name>
|
||||
<uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
|
||||
<memory unit='KiB'>219100</memory>
|
||||
<currentMemory unit='KiB'>219100</currentMemory>
|
||||
<vcpu placement='static'>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'>
|
||||
<driver name='qemu' type='raw'/>
|
||||
<source dev='/dev/disk/by-path/ip-192.168.44.1:3260-iscsi-iqn.2011-02.lan.hdserver:hydrar-desktop.win7vm-lun-0'/>
|
||||
<target dev='hda' bus='ide'/>
|
||||
<address type='drive' controller='0' bus='0' target='0' unit='0'/>
|
||||
</disk>
|
||||
<controller type='usb' index='0'/>
|
||||
<controller type='ide' index='0'/>
|
||||
<controller type='pci' index='0' model='pci-root'/>
|
||||
<memballoon model='none'/>
|
||||
</devices>
|
||||
</domain>
|
@ -708,6 +708,7 @@ mymain(void)
|
||||
DO_TEST("hugepages-pages6", NONE);
|
||||
DO_TEST("nosharepages", QEMU_CAPS_MACHINE_OPT, QEMU_CAPS_MEM_MERGE);
|
||||
DO_TEST("disk-cdrom", NONE);
|
||||
DO_TEST("disk-iscsi", NONE);
|
||||
DO_TEST("disk-cdrom-network-http", QEMU_CAPS_KVM, QEMU_CAPS_DEVICE,
|
||||
QEMU_CAPS_DRIVE);
|
||||
DO_TEST("disk-cdrom-network-https", QEMU_CAPS_KVM, QEMU_CAPS_DEVICE,
|
||||
|
Loading…
x
Reference in New Issue
Block a user