mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-11-05 04:41:20 +00:00
b40ec75296
Historically the virtio-blk frontend by default enabled SCSI emulation and tried to do SCSI command passthrough. As this was enabled by default there's a fallback mechanism in place in cases when the backend doesn't support SCSI for any reason. This is not the case when disk type=lun is used with 'scsi-block' via 'virtio-scsi'. We did not restrict configurations when the user picks 'qcow2' or any other format as format of the disk, in which case the emulation is disabled as such configuration doesn't make sense. This patch unifies the approach so that 'raw' is required both when used via 'virtio-blk' and 'virtio-scsi' so that the user is presented with the expected configuration. Note that use of <disk type='lun'> is already very restrictive as it requires a block device or iSCSI storage. Additionally the scsi emulation is now deprecated by qemu with virtio-blk as it conflicts with virtio-1 and the alternative is to use 'virtio-scsi' which performs better and is along for a very long time. Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
47 lines
1.6 KiB
XML
47 lines
1.6 KiB
XML
<domain type='qemu'>
|
|
<name>test</name>
|
|
<uuid>bba65c0e-c049-934f-b6aa-4e2c0582acdf</uuid>
|
|
<memory unit='KiB'>1048576</memory>
|
|
<currentMemory unit='KiB'>1048576</currentMemory>
|
|
<vcpu placement='static'>1</vcpu>
|
|
<os>
|
|
<type arch='x86_64' machine='pc'>hvm</type>
|
|
<boot dev='cdrom'/>
|
|
<boot dev='hd'/>
|
|
<bootmenu enable='yes'/>
|
|
</os>
|
|
<clock offset='utc'/>
|
|
<on_poweroff>destroy</on_poweroff>
|
|
<on_reboot>restart</on_reboot>
|
|
<on_crash>restart</on_crash>
|
|
<devices>
|
|
<emulator>/usr/bin/qemu-system-x86_64</emulator>
|
|
<disk type='block' device='lun' rawio='yes'>
|
|
<driver name='qemu' type='raw'/>
|
|
<source dev='/dev/sdfake'/>
|
|
<target dev='vda' bus='virtio'/>
|
|
<address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
|
|
</disk>
|
|
<disk type='block' device='lun'>
|
|
<driver name='qemu' type='raw'/>
|
|
<source dev='/dev/sdfake2'/>
|
|
<target dev='vdb' bus='virtio'/>
|
|
<address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
|
|
</disk>
|
|
<controller type='usb' index='0'/>
|
|
<controller type='virtio-serial' index='0'>
|
|
<address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/>
|
|
</controller>
|
|
<controller type='ide' index='0'/>
|
|
<controller type='pci' index='0' model='pci-root'/>
|
|
<interface type='user'>
|
|
<mac address='52:54:00:e5:48:58'/>
|
|
<model type='virtio'/>
|
|
<driver name='vhost' event_idx='off'/>
|
|
</interface>
|
|
<input type='mouse' bus='ps2'/>
|
|
<input type='keyboard' bus='ps2'/>
|
|
<memballoon model='virtio'/>
|
|
</devices>
|
|
</domain>
|