I'm trying to access a Windows 10 virtual machine from my Linux host by using virsh console
.
But when I do so, I get the empty console that many others have experienced.
virsh console win10
Connected to domain 'win10'
Escape character is ^] (Ctrl + ])
And I can't type at all. Anyway, is there a configuration that I can do in the VM to allow this, specifically for Windows? Thanks
virsh console
is a TTY console, which is the uart in the VM (a.k.a. "the COM port"). Does your Windows 10 output anything into this COM port?Windows expects a VGA hardware to output into, so configure a VNC for the VM and connect with VNC Viewer for interacting with the VM. For this to be possible, you'd configure in the
libvirt
xml domain config something like this:(it is possible you'd need to use another PCI slot address and TCP port for VNC to this machine).
Then restart (stop then start) a VM, and confirm qemu is listening on the chosen port:
Notice, in my case it listens on localhost, for security.
To connect to this via SSH tunnel, use a TCP port forwarding. It is built into standard Linux VNC client package:
(for connecting to the 5901's VNC you use VNC screen 1). It'll connect via SSH to the
virtualization.host.name
and forward some local port to thelocalhost:5901
of the server, right as we need; then connects VNC client to this forwarded port. So your VNC will be secured with SSH.Or, you can listen on any IP address (less secure). Or you can set up this TCP tunnel some other way. But this way I presented here is more convenient. Or, I forgot about that, use
virt-viewer
to connect to the screen, didn't used it for ages.Also, Windows Server supports (at least, supported some time ago) a special administration console (SAC) that runs on the COM port and can be used to do some operations (task kill, etc.). This console can be accessed with
virsh console
. But I doubt Windows 10 has that.virsh console
opens the VM's serial console, if it has one. If not, as in the case of Windows generally, then nothing happens.You should be using
virt-viewer
to view VMs with graphical consoles, or better yet, the well integratedvirt-manager
.