<dd>Indicates that the device is readonly, only supported by SCSI host
device now. <span class="since">Since 1.0.6 (QEMU and KVM only)</span>
</dd>
+ <dt><code>shareable</code></dt>
+ <dd>If present, this indicates the device is expected to be shared
+ between domains (assuming the hypervisor and OS support this).
+ Only supported by SCSI host device.
+ <span class="since">Since 1.0.6</span>
+ </dd>
</dl>
if (virXPathBoolean("boolean(./readonly)", ctxt))
def->readonly = true;
+ if (virXPathBoolean("boolean(./shareable)", ctxt))
+ def->shareable = true;
break;
}
}
if (def->readonly)
virBufferAddLit(buf, "<readonly/>\n");
+ if (def->shareable)
+ virBufferAddLit(buf, "<shareable/>\n");
virBufferAdjustIndent(buf, -6);
if (virDomainDeviceInfoFormat(buf, def->info,
--- /dev/null
+<domain type='qemu'>
+ <name>QEMUGuest2</name>
+ <uuid>c7a5fdbd-edaf-9466-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'>
+ <source dev='/dev/HostVG/QEMUGuest2'/>
+ <target dev='hda' bus='ide'/>
+ <address type='drive' controller='0' bus='0' target='0' unit='0'/>
+ </disk>
+ <controller type='scsi' index='0' model='virtio-scsi'/>
+ <controller type='usb' index='0'/>
+ <controller type='ide' index='0'/>
+ <controller type='pci' index='0' model='pci-root'/>
+ <hostdev mode='subsystem' type='scsi' managed='yes'>
+ <source>
+ <adapter name='scsi_host0'/>
+ <address bus='0' target='0' unit='0'/>
+ </source>
+ <shareable/>
+ <address type='drive' controller='0' bus='0' target='4' unit='8'/>
+ </hostdev>
+ <memballoon model='virtio'/>
+ </devices>
+</domain>
DO_TEST("hostdev-scsi-readonly");
DO_TEST("disk-copy_on_read");
+ DO_TEST("hostdev-scsi-shareable");
virObjectUnref(driver.caps);
virObjectUnref(driver.xmlopt);