Bug 790789
Summary: | virsh console fails when executed via remote ssh | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 6 | Reporter: | Dan Yasny <dyasny> |
Component: | libvirt | Assignee: | Daniel Veillard <veillard> |
Status: | CLOSED ERRATA | QA Contact: | Virtualization Bugs <virt-bugs> |
Severity: | medium | Docs Contact: | |
Priority: | medium | ||
Version: | 6.2 | CC: | acathrow, berrange, dallan, dyuan, jdenemar, mzhan, rwu, whuang |
Target Milestone: | rc | Keywords: | Reopened |
Target Release: | --- | ||
Hardware: | i686 | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | libvirt-0.9.10-4.el6 | Doc Type: | Bug Fix |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2012-06-20 06:48:29 UTC | Type: | --- |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Dan Yasny
2012-02-15 12:06:40 UTC
virsh console needs to see a pseudo-terminal and ssh doesn't create one if it is asked to execute a remote command directly. You may, however, explicitly ask ssh to create the terminal with -t option: ssh -t root@libvirthost virsh console myVM Two things - The error reporting from virsh console here sucks - 'ssh -t' won't actually work, because although that lets virsh puts the remote console into rawmode, the local console is still in cooked mode. So newlines get interpreted wrongly AFAICT, the only thing we can do is to improve the error reporting With this patch https://www.redhat.com/archives/libvir-list/2012-February/msg00690.html You'll see $ ssh root@somehost virsh console f16x86_64 error: Cannot run interactive console without a controlling TTY > - 'ssh -t' won't actually work, because although that lets virsh puts the
> remote console into rawmode, the local console is still in cooked mode. So
> newlines get interpreted wrongly
Ignore this comment, it is wrong.
Dan Y., out of curiosity, what are you trying to implement with this? One other thought, you could also use the remote stream support to connect the console, I don't know if that requires installing stuff on the machine from which you are connecting that you're uncomfortable with. (In reply to comment #8) > One other thought, you could also use the remote stream support to connect the > console, I don't know if that requires installing stuff on the machine from > which you are connecting that you're uncomfortable with. What do you mean by "remote stream" - to set up a socket? I mean http://libvirt.org/html/libvirt-libvirt.html#virStreamNew and friends that let you create a data pipe over a remote connection so you can do things like implement a serial console for on a VM on another machine. (In reply to comment #10) > I mean http://libvirt.org/html/libvirt-libvirt.html#virStreamNew and friends > that let you create a data pipe over a remote connection so you can do things > like implement a serial console for on a VM on another machine. Thanks, I wasn't aware of this. My current solution seems to work, and looks like it's enough for now. I suppose this will be considered as a full-fledged feature in the future The patch fixing the error handling of that case is available in build libvirt-0.9.10-4.el6, Daniel Verify this bug with : libvirt-0.9.10-4.el6.x86_64 qemu-kvm-0.12.1.2-2.236.el6.x86_64 [ssh without -t ]: # ssh 10.66.85.217 virsh console r root.85.217's password: error: Cannot run interactive console without a controlling TTY [ssh with -t ]: # ssh -t 10.66.85.217 virsh console r root.85.217's password: Connected to domain r Escape character is ^] [ OK ] Setting hostname virtlab-66-84-201.englab.nay.redhat.com: [ OK ] Setting up Logical Volume Management: 2 logical volume(s) in volume group "vg_virtlab6684201" now active [ OK ] Checking filesystems Checking all file systems. ... Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. http://rhn.redhat.com/errata/RHSA-2012-0748.html |