How can you check if a virtual machine is running on Proxmox? (KVM)

harmonyp

Member
Nov 26, 2020
196
4
23
47
I am curious is there any way to check if a virtual machine (KVM) is running on a Proxmox node?

I have found multiple commands along the line of

Code:
sudo lshw -class system
&
Code:
sudo dmesg | grep -i virtual
but these just return a generic QEMU message.

The only way I can think of is by running
Code:
dhclient -d -nw eth0
which would return the DHCP server IP and then if the firewall lets you connect through https://DHCPSERVERIP:8006
 
detecting proxmox isn't possible since it simply uses kvm

systemd-detect-virt will tell you the hypervisor/container engine
 
Code:
qm list

 VMID NAME                 STATUS     MEM(MB)    BOOTDISK(GB)   PID
       110 myvm1           stopped    4096              37.00   0
      2003 myvm2           running    2048               5.00   3167624