mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-09 14:35:25 +00:00
qemu_hotplug: Deny live detach of <console/>
I've tried, then I've tried even harder, but still wasn't able to make sense of our console backcompat code in all its fine details. Since I value my sanity, let's just forbid hotunplug of <console/>, especially since detaching of corresponding <serial/> works. Signed-off-by: Michal Privoznik <mprivozn@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
parent
b5a591f73b
commit
8de96e270a
@ -5693,6 +5693,16 @@ qemuDomainDetachDeviceChr(virQEMUDriver *driver,
|
|||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (vmdef->os.type == VIR_DOMAIN_OSTYPE_HVM &&
|
||||||
|
tmpChr->deviceType == VIR_DOMAIN_CHR_DEVICE_TYPE_CONSOLE &&
|
||||||
|
(tmpChr->targetType == VIR_DOMAIN_CHR_CONSOLE_TARGET_TYPE_SERIAL ||
|
||||||
|
tmpChr->targetType == VIR_DOMAIN_CHR_CONSOLE_TARGET_TYPE_NONE)) {
|
||||||
|
/* Raise this limitation once device removal works. */
|
||||||
|
virReportError(VIR_ERR_OPERATION_UNSUPPORTED, "%s",
|
||||||
|
_("detaching of <console/> is unsupported. Try corresponding <serial/> instead"));
|
||||||
|
goto cleanup;
|
||||||
|
}
|
||||||
|
|
||||||
/* guestfwd channels are not really -device rather than
|
/* guestfwd channels are not really -device rather than
|
||||||
* -netdev. We need to treat them slightly differently. */
|
* -netdev. We need to treat them slightly differently. */
|
||||||
guestfwd = tmpChr->deviceType == VIR_DOMAIN_CHR_DEVICE_TYPE_CHANNEL &&
|
guestfwd = tmpChr->deviceType == VIR_DOMAIN_CHR_DEVICE_TYPE_CHANNEL &&
|
||||||
|
Loading…
Reference in New Issue
Block a user