mirror of
https://github.com/virt-manager/virt-manager.git
synced 2026-08-04 02:13:21 -05:00
serialcon: Fix opening with xen (bz 1215357)
Apparently xen doesn't set <serial> device alias names, and OpenConsole just opens the first <console> device unconditionally. Properly handling that would be to report it in the UI that we can only open the first console, but for now just drop the alias check. Apparently SUSE already does this as mentioned in the RH bug https://bugzilla.redhat.com/show_bug.cgi?id=1215357
This commit is contained in:
@@ -205,8 +205,9 @@ class LibvirtConsoleConnection(ConsoleConnection):
|
||||
name = dev and dev.alias.name or None
|
||||
logging.debug("Opening console stream for dev=%s alias=%s",
|
||||
dev, name)
|
||||
if not name:
|
||||
raise RuntimeError(_("Cannot open a device with no alias name"))
|
||||
# libxl doesn't set aliases, their open_console just defaults to
|
||||
# opening the first console device, so don't force prescence of
|
||||
# an alias
|
||||
|
||||
stream = self.conn.get_backend().newStream(libvirt.VIR_STREAM_NONBLOCK)
|
||||
self.vm.open_console(name, stream)
|
||||
|
||||
Reference in New Issue
Block a user