Cannot access KVM using virsh console after KVM rebooted or shut off

Daniel Romero romero.cl at gmail.com
Tue Nov 16 01:28:41 UTC 2021


Hi,

Try to enable vnc on your vm, then try to connect using that protocol and see what happens. 

You can use chicken of the vnc os x client to connect and be sure your host machine have the right ports open for incoming vnc connections (start at 5900). 

Best regards,
DR

Sent from my Atari 800 XL

> On 15-11-2021, at 20:13, Yifei Liu <yifeliu at cs.stonybrook.edu> wrote:
> 
> Dear all,
> 
> I used ssh with -X option to connect to an Ubuntu remote server where I applied virsh 
> (libvirt) to manage my KVM virtual machines, and my local machine is MacOS. Then, 
> I used virt-install to install a Tiny Core Linux VM, and I got a pop-up Virt Viewer window 
> (via XQuartz) which is the console for my Tiny Core VM. However, if I rebooted my VM, 
> then I checked the VM state by virsh list --all which was running. Then, I tried 
> `virsh console my_vm_domain` but this command got stuck on:
>> Connected to domain my_vm_domain
>> Escape character is ^]
> 
> The `virsh console` command hung without any response. This issue also happened when 
> I used virsh console after I shut down and later started the VM. Even the VM was already 
> started, I cannot return to the VM console by `virsh console`.
> 
> I can get the VM console in Virt Viewer at the first boot (using virt-install). 
> But, if I shutdown the VM once, I can never access the VM console by virsh console even 
> the VM state is running. Any idea about how to use virsh console? 
> 
> Thanks,
> Yifei
> 
> 





More information about the libvirt-users mailing list