how to get the IP from a qemu-system-ppc or i386 VM?

Asked by john.d@servergy.com

When I launch a VM is there a way to determine the IP the VM is using? I want to be able to ssh to it.

Question information

Language:
English Edit question
Status:
Expired
For:
Ubuntu libvirt Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
actionparsnip (andrew-woodhead666) said :
#1

In a terminal run:

ifconfig

You will see the IP

Revision history for this message
john.d@servergy.com (john-d-0) said :
#2

eth2 Link encap:Ethernet HWaddr 3c:0c:48:00:00:14
          inet addr:192.168.1.112 Bcast:192.168.1.255 Mask:255.255.255.0
          inet6 addr: fd9f:a16:3ee4:0:3e0c:48ff:fe00:14/64 Scope:Global
          inet6 addr: fd9f:a16:3ee4:0:90ce:958e:3cfa:e41b/64 Scope:Global
          inet6 addr: fe80::3e0c:48ff:fe00:14/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
          RX packets:14087 errors:0 dropped:0 overruns:0 frame:0
          TX packets:18437 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:1887428 (1.8 MB) TX bytes:2289991 (2.2 MB)
          Interrupt:40

No sign of the IP address of the VM

Revision history for this message
john.d@servergy.com (john-d-0) said :
#3

The VM has:

root@ubuntu-qemu-1404:~# ifconfig eth0
eth0 Link encap:Ethernet HWaddr 52:54:00:12:34:56
          inet addr:10.0.2.15 Bcast:10.0.2.255 Mask:255.255.255.0
          inet6 addr: fe80::5054:ff:fe12:3456/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
          RX packets:23 errors:0 dropped:0 overruns:0 frame:0
          TX packets:30 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:2640 (2.6 KB) TX bytes:2720 (2.7 KB)

But I can't login :

(trusty)root@jade-rev4:~# ssh jpd@10.0.2.15
ssh: connect to host 10.0.2.15 port 22: No route to host
(trusty)root@jade-rev4:~#

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#4

If you are running this in virtualbox, power off the guest and set the network to bridged. It will get an IP from your router and appear as a new PC on the LAN.

Much easier.

Revision history for this message
john.d@servergy.com (john-d-0) said :
#5

Thanks. This isn't virtualbox. Is bridge networking modes available in qemu-system ? The network modes are not very descriptive.

Revision history for this message
john.d@servergy.com (john-d-0) said :
#6

Thanks. This isn't virtualbox. Is bridge networking modes available in qemu-system ? The network modes are not very descriptive.

This is the launch :

(trusty)root@jade-rev4:/home2/qemu# cat go14.04.sh
exec qemu-system-ppc -M ppce500 -nographic -kernel jade-kernel-2.0.bin \
                -initrd jade-initrd-2.0.bin -m 1G -enable-kvm -drive \
         file=jade-ubuntu-14.04.qcow2.netinstall,if=virtio -append "console=ttyS0" \
         -no-shutdown -no-reboot -name Ubuntu-$$

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#7
Revision history for this message
john.d@servergy.com (john-d-0) said :
#8

None of those reference materials list how to determine a IP address of a guest OS from the host.

Revision history for this message
john.d@servergy.com (john-d-0) said :
#9

None of those reference materials list how to determine a IP address of a guest OS from the host.

Revision history for this message
Launchpad Janitor (janitor) said :
#10

This question was expired because it remained in the 'Open' state without activity for the last 15 days.