Univention Bugzilla – Bug 18383
Zugriff per Console auf virtuelle Instanzen
Last modified: 2023-06-28 10:46:25 CEST
Sofern die virtuelle Maschine einen Zugriff per Console zulässt könnte eine entsprechende Console angezeigt werden
Bedingt durch Bug #19249 Comment 3: > Da inzwischen PyGrub für Xen-PV-Maschinen benutzt wird, ist hier PyGrub in das > innerhalb von /boot/grub/menu.cfg definierte Timeout von 60 Sekunden gelaufen, > um das Image zu extrahieren. Das Xen-CLI-Tool "xm" implementiert deshalb extra > eine Logik in <file:xen-3.4.3/tools/python/xen/xm/create.py>, die immer den > interaktiven Modus von PyGrub per '-q' deaktiviert (außer es wird die > Xen-Console direkt per "xm create -c ..." gefordert.) > > UVMMd erzeugt jetzt ebenfalls den Eintrag <bootloader_args>-q</bootloader_args> > in der Konfigurationsdateien. Wenn der Zugriff auf die Xen-Console implementiert wird, sollte dann analog zu "xm create" ebenfalls das "-q" unterdrückt werden, wenn die Console verwendet wird.
Siehe <http://fedoraproject.org/wiki/Features/VirtioSerial> für mögliche Hintergrundinformationen.
Unsere Version von kvm ist zu alt und kann keine virtio-console; alternativ geht aber eine virtualisierte serielle Konsole: Host: # virsh edit $MY_DOM <console type='pty'> <target type='serial' port='0'/> </console> Gast: # echo 'T0:23:respawn:/sbin/getty -L ttyS0 9600 vt100' >>/etc/inittab # echo root >>/etc/securetty # telinit Q Host: # virsh console $MY_DOM bzw. # socat - $(virsh dumpxml pmh93client32 | sed -ne "s,.*<console type='pty' tty='\(.*\)'>.*,\1,p") Ein AJAX-Telnet gibt es z.B. hier: <http://plugins.jquery.com/project/ajax_terminal> <http://www.koikids.com/dashboard.htm>
"virsh console $VM" crasht bis einschließlich libvirt (<= 0.9.4) beim 2. Versuch, sich mit der Console zu verbinden, weil ein die getestete Variable nicht der freigegebenen Variable entspricht. Der folgender Patch korrigiert das: <http://www.redhat.com/archives/libvir-list/2011-August/msg00340.html> Allerdings behält der libvirtd danach pro geöffneter Konsole das /dev/ptd/*-Device geöffnet und ein anschließendes "virsh list" bleibt hängen: # lsof /dev/# tail -n 1 /var/log/libvirt/qemu/pmh_cachetest.log char device redirected to /dev/pts/3 pts/3 libvirtd 6129 root 17u CHR 136,3 6 /dev/pts/3 libvirtd 6129 root 21u CHR 136,3 6 /dev/pts/3 libvirtd 6129 root 22u CHR 136,3 6 /dev/pts/3 libvirtd 6129 root 23u CHR 136,3 6 /dev/pts/3
Der Patch aus comment 4 ist hier: <http://libvirt.org/git/?p=libvirt.git;a=commit;h=ed009313b166da9fd077758a21aa9a328209e7f1> Zusätzlich ist noch <http://libvirt.org/git/?p=libvirt.git;a=commit;h=88416593e19d56433662b801d6e72ba182024fd9> anzuwenden, der besagte Endlosschleife korrigiert.
Die beiden Patches für libvirt gegen die SEGVs wurden eingespielt. svn9563, libvirt_0.8.7-1.92.201108151823
Korrekturen: (In reply to comment #3) Es reicht: > # virsh edit $MY_DOM > <console type='pty'/> > Gast: > # echo 'T0:23:respawn:/sbin/getty -L ttyS0 9600 vt100' >>/etc/inittab > # echo root >>/etc/securetty Statt "root" muß es natürlich "ttyS0" lauten, was da eigentlich auch schon erhalten wäre, wenn es "/etc/univention/templates/files/etc/securetty" nicht wieder herauspatchen würde :-( # echo ttyS0 >>/etc/univention/templates/files/etc/securetty # ucr commit /etc/securetty
(In reply to comment #7) > Statt "root" muß es natürlich "ttyS0" lauten, was da eigentlich auch schon > erhalten wäre, wenn es "/etc/univention/templates/files/etc/securetty" nicht > wieder herauspatchen würde :-( → branches/ucs-3.0/ucs/desktop/univention-x-core/conffiles/etc/securetty
This issue has been filed against UCS 2.3. UCS 2.3 is out of maintenance and many UCS components have vastly changed in later releases. Thus, this issue is now being closed. If this issue still occurs in newer UCS versions, please use "Clone this bug". In this case please provide detailed information on how this issue is affecting you.
The customer still has problems with this. They currently have to manually virsh edit every vm they want to use via virsh console to configure the serial console. This results in a lot of administrative overhead
This issue has been filed against UCS 4.3. UCS 4.3 is out of maintenance and many UCS components have changed in later releases. Thus, this issue is now being closed. If this issue still occurs in newer UCS versions, please use "Clone this bug" or reopen it and update the UCS version. In this case please provide detailed information on how this issue is affecting you.