3

I would like to access my KVM VM with a shell. I created it via proxmox 2.3, Ubuntu 12.04 is installed on it via an official template. I would like to find the same command as

vzctl enter <VM_id> 

for OpenVZ containers.

I didn't find anything on the proxmox qm's Wiki. Is there anything similar?

HydrUra
  • 145
  • 1
  • 2
  • 6

3 Answers3

2

No, there isn't for KVM guests according to Proxmox.

Nathan C
  • 14,901
  • 4
  • 42
  • 62
2

Not possible with proxmox, since it doesn't implement all of KVM's potential. On normal KVM setups with libvirt or other management systems, like oVirt, this is possible using a serial console to the VM.

dyasny
  • 18,482
  • 6
  • 48
  • 63
1

It's possible using virtual terminals for KVM VM.

You need (keep in mind all my examples for Debian 6/7):

  1. Run Linux kernel inside KVM VM with kernel param: console=tty0. it can be done editing /etc/default/grub : GRUB_CMDLINE_LINUX_DEFAULT="quiet console=tty0"
  2. Add to KVM VM file /etc/inittab this line:T0:23:respawn:/sbin/getty -l /usr/local/bin/autologin -n -L ttyS0 115200 vt102
  3. Create file /usr/local/bin/autologin with following content: #!/bin/sh exec /bin/login -f root
  4. reboot the VM
  5. Use virsh console kvm_vm_name and work with it like vzctl enter $CTID

If you need any help please comment here :)

Pavel Odintsov
  • 311
  • 1
  • 6