mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-03 19:45:21 +00:00
Taint domains using cdrom-passthrough
https://bugzilla.redhat.com/show_bug.cgi?id=976387 For a domain configured using the host cdrom, we should taint the domain due to problems encountered when the host and guest try to control the tray.
This commit is contained in:
parent
9ce409561a
commit
99a2d6af2b
@ -101,7 +101,8 @@ VIR_ENUM_IMPL(virDomainTaint, VIR_DOMAIN_TAINT_LAST,
|
||||
"disk-probing",
|
||||
"external-launch",
|
||||
"host-cpu",
|
||||
"hook-script");
|
||||
"hook-script",
|
||||
"cdrom-passthrough");
|
||||
|
||||
VIR_ENUM_IMPL(virDomainVirt, VIR_DOMAIN_VIRT_LAST,
|
||||
"qemu",
|
||||
|
@ -2288,6 +2288,7 @@ typedef enum {
|
||||
VIR_DOMAIN_TAINT_EXTERNAL_LAUNCH, /* Externally launched guest domain */
|
||||
VIR_DOMAIN_TAINT_HOST_CPU, /* Host CPU passthrough in use */
|
||||
VIR_DOMAIN_TAINT_HOOK, /* Domain (possibly) changed via hook script */
|
||||
VIR_DOMAIN_TAINT_CDROM_PASSTHROUGH,/* CDROM passthrough */
|
||||
|
||||
VIR_DOMAIN_TAINT_LAST
|
||||
} virDomainTaintFlags;
|
||||
|
@ -2079,6 +2079,12 @@ void qemuDomainObjCheckDiskTaint(virQEMUDriverPtr driver,
|
||||
qemuDomainObjTaint(driver, obj, VIR_DOMAIN_TAINT_HIGH_PRIVILEGES,
|
||||
logFD);
|
||||
|
||||
if (disk->device == VIR_DOMAIN_DISK_DEVICE_CDROM &&
|
||||
virStorageSourceGetActualType(disk->src) == VIR_STORAGE_TYPE_BLOCK &&
|
||||
disk->src->path)
|
||||
qemuDomainObjTaint(driver, obj, VIR_DOMAIN_TAINT_CDROM_PASSTHROUGH,
|
||||
logFD);
|
||||
|
||||
virObjectUnref(cfg);
|
||||
}
|
||||
|
||||
|
@ -8202,6 +8202,7 @@ qemuDomainUpdateDeviceLive(virConnectPtr conn,
|
||||
|
||||
switch ((virDomainDeviceType) dev->type) {
|
||||
case VIR_DOMAIN_DEVICE_DISK:
|
||||
qemuDomainObjCheckDiskTaint(driver, vm, dev->data.disk, -1);
|
||||
ret = qemuDomainChangeDiskMediaLive(conn, vm, dev, driver, force);
|
||||
break;
|
||||
case VIR_DOMAIN_DEVICE_GRAPHICS:
|
||||
|
Loading…
Reference in New Issue
Block a user