VM Console while in rescue mode

ihr

Member
Dec 25, 2022
52
6
13
Hi

I'm doing some work in some virtual machines so I need to start from external CD in rescue mode and perform some operations. The problem is that the console is now inside the browser and I can't copy and paste large pieces os text such as a hard drive UUID. Also I've no access to ssh because the service is not launched etc...

I wonder if there are alternative methods to connect to the VM console so we can use copy and paste from the mouse

Regards
Ignacio
 
For a running lxc you could use "pct enter <vmid>".
We have all on nfs storage so stopped vm's and lxc's could be mounted and then go into their filesystems and modify files neccessary (even cool for cloning), after that umount the modified images and start them.
lxc: mount –o loop <vmid>.raw /my-lxc
vm: modprobe nbd ; qemu-nbd --connect=/dev/nbd0 vm-<type_in>.qcow2 ; lsblk ; lvs ; mount /dev/mapper/<rl-root> /my_vm (depend what you want) ; umount /my_vm ; qemu-nbd --disconnect /dev/nbd0
 
Last edited:
  • Like
Reactions: ihr