mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-22 11:22:23 +00:00
qemu: Put format=raw onto cmd line for SCSI passthrough
https://bugzilla.redhat.com/show_bug.cgi?id=1632833 When doing a SCSI passthrough we don't put format= onto the command line. This causes qemu to probe the format automatically which ends up in a warning in the domain log and possible qemu disabling writes to the first block (according to the warning message). Based-on-work-of: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Michal Privoznik <mprivozn@redhat.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
This commit is contained in:
parent
3a1cdb06fd
commit
641a95c9b6
@ -4841,7 +4841,7 @@ qemuBuildSCSIHostdevDrvStr(virDomainHostdevDefPtr dev,
|
||||
} else {
|
||||
if (!(source = qemuBuildSCSIHostHostdevDrvStr(dev)))
|
||||
goto error;
|
||||
virBufferAsprintf(&buf, "file=/dev/%s,if=none", source);
|
||||
virBufferAsprintf(&buf, "file=/dev/%s,if=none,format=raw", source);
|
||||
}
|
||||
VIR_FREE(source);
|
||||
|
||||
|
@ -25,6 +25,6 @@ server,nowait \
|
||||
-drive file=/dev/HostVG/QEMUGuest2,format=raw,if=none,id=drive-ide0-0-0 \
|
||||
-device ide-drive,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0,\
|
||||
bootindex=1 \
|
||||
-drive file=/dev/sg0,if=none,id=drive-hostdev0 \
|
||||
-drive file=/dev/sg0,if=none,format=raw,id=drive-hostdev0 \
|
||||
-device scsi-generic,bus=scsi0.0,scsi-id=7,drive=drive-hostdev0,id=hostdev0 \
|
||||
-device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x4
|
||||
|
@ -25,7 +25,7 @@ server,nowait \
|
||||
-drive file=/dev/HostVG/QEMUGuest2,format=raw,if=none,id=drive-ide0-0-0 \
|
||||
-device ide-drive,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0,\
|
||||
bootindex=1 \
|
||||
-drive file=/dev/sg0,if=none,id=drive-hostdev0,readonly=on \
|
||||
-drive file=/dev/sg0,if=none,format=raw,id=drive-hostdev0,readonly=on \
|
||||
-device scsi-generic,bus=scsi0.0,channel=0,scsi-id=4,lun=8,\
|
||||
drive=drive-hostdev0,id=hostdev0 \
|
||||
-device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x4
|
||||
|
@ -25,7 +25,7 @@ server,nowait \
|
||||
-drive file=/dev/HostVG/QEMUGuest2,format=raw,if=none,id=drive-ide0-0-0 \
|
||||
-device ide-drive,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0,\
|
||||
bootindex=1 \
|
||||
-drive file=/dev/sg0,if=none,id=drive-hostdev0 \
|
||||
-drive file=/dev/sg0,if=none,format=raw,id=drive-hostdev0 \
|
||||
-device scsi-generic,bus=scsi0.0,channel=0,scsi-id=4,lun=8,\
|
||||
drive=drive-hostdev0,id=hostdev0 \
|
||||
-device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x4
|
||||
|
Loading…
x
Reference in New Issue
Block a user