KVM VM login with ssh

informant

Renowned Member
Jan 31, 2012
816
11
83
Hi all,

how i can login as root to a KVM-VM over SSH? Does anyone have a command?
We would check, if KVM VM have the right ip adress. or have anyone a command for check this as root on node?

Very thanks and best regards
 
Hi all,

how i can login as root to a KVM-VM over SSH? Does anyone have a command?
We would check, if KVM VM have the right ip adress. or have anyone a command for check this as root on node?

Very thanks and best regards

Hi,
why you want to login for that? What happens if ssh isn't open on this VM?

If your pve-node has an IP on that bridge, you can build an script for that - or simply test with:
Code:
root@proxmox1:~# arping -c 1 -I vmbr23 172.20.3.151
ARPING 172.20.3.151 from 172.20.3.61 vmbr23
Unicast reply from 172.20.3.151 [BE:19:E2:BD:21:99]  0.633ms
Sent 1 probes (1 broadcast(s))
Received 1 response(s)
root@proxmox1:~# grep -i BE:19:E2:BD:21:99 /etc/pve/qemu-server/*
/etc/pve/qemu-server/101.conf:net0: e1000=BE:19:E2:BD:21:99,bridge=vmbr23
Udo
 
Hi udo,

thats right, but with this test, i do not get the ip addresses of the VM. I would check, it the VM have the right ip address and not a wrong address.
It´s a VM with own ip address (ipv4 and ipv6) and i would list all ips of this vm - you´re understand, what i mean?

arp -a do not list this vm and his ip-adresses!

thanks and best regards
 
Last edited:
Hi,
if your pve-host havn't an IP on that bridge, you can use tcpdump for that (but need to wait a little bit):
Code:
# grep net0 /etc/pve/qemu-server/150.conf 
net0: virtio=1A:E1:7E:55:D0:6A,bridge=vmbr90

# tcpdump -n -i vmbr90 | grep -i "1A:E1:7E:55:D0:6A"
tcpdump: WARNING: vmbr90: no IPv4 address assigned
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on vmbr90, link-type EN10MB (Ethernet), capture size 65535 bytes
15:28:51.748813 ARP, Reply 192.168.40.27 is-at 1a:e1:7e:55:d0:6a, length 28
Udo
 
Hi,

ok. Also, if i dont get an ip address, the vm was not configured correctly, right?

thanks and best regards @udo
 
Hi udo,

arping -c 1 -I vmbr23 172.20.3.151, is this ip-address the address of node?

regards
 
Hi udo,

ok, but the VM is online with a IPv4 or IPv6 address (i can see traffic in interface), but if i use the command, i don´t get a answer/information of this vm/ip. i don´t understand it,,,
Do you have a other idea, to check, which ip the vm has?

best regards and very thanks for your informations.
 
Hi udo,

ok, but the VM is online with a IPv4 or IPv6 address (i can see traffic in interface), but if i use the command, i don´t get a answer/information of this vm/ip. i don´t understand it,,,
Do you have a other idea, to check, which ip the vm has?

best regards and very thanks for your informations.

Hi,
use the way with tcpdump to see which IP address the VM use.

Udo