segfault with missing disk/target/dev
Software environment
- Operating system: Linux
- Architecture: x86_64
- kernel version: 5.14.15
- libvirt version: 7.10.0
- Hypervisor and version: qemu/not relevant
Description of problem
i was assuming you can skip the "dev" property of "target" in "disk" since it shouldnt actually do anything. However, doing so crashes libvirtd. I think this only happens when there's multiple errors.
Steps to reproduce
<domain type='kvm' id='7'>
<name>something</name>
<uuid>a01550b3-f8c8-4c66-aed5-d3744287aa49</uuid>
<memory unit='GiB'>10</memory>
<currentMemory unit='GiB'>10</currentMemory>
<vcpu placement='static'>1</vcpu>
<os>
<type arch='x86_64' machine='q35'>hvm</type>
</os>
<devices>
<emulator>/usr/bin/qemu-system-x86_64</emulator>
<controller type='pci' index='0' model='pcie-root'>
<alias name='pcie.0'/>
</controller>
<disk type='file' device='disk'>
<driver name='qemu' type='raw'/>
<source file='/vmm/bob' />
<target bus='virtio'/>
<readonly/>
<address type='pci' domain='0x0000' bus='0x00' slot='6' function='0x0'/>
</disk>
<disk type='file' device='disk'>
<driver name='qemu' type='raw'/>
<source file='/vmm/beep' />
<target bus='virtio'/>
<readonly/>
<address type='pci' domain='0x0000' bus='0x00' slot='7' function='0x0'/>
</disk>
</devices>
</domain>