qemu-discuss
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

networking hostfwd


From: Ronald Delobel
Subject: networking hostfwd
Date: Thu, 15 Oct 2020 18:41:15 +0200

Hi,

I know top posts are impolites but I don't know how to quote the original text in gmail web interface.

My guess is that If you have two distincts networks, you have to indicate somewhere which route should be the default to reach the others hosts to avoid confusion, maybe ssh output can give you some indications 'no route to host', 'host unreachable' verbose flag may help too.
In your second case (192.168.xx.xx), which port do you use? 22, the default or -p 5555? Does your guest have an according static ip address in 192.168.xx.xx? usernet offers dhcp service, not tuntap. Are there any logs in the guest that can track incoming connection?

Original post follow:

All,
  I am facing an issue with qemu networking host forward:

If I start my VM with following command:
 qemu-system-x86_64 -cpu host -enable-kvm -m 8192 -smp 4,sockets=1,cores=4,threads=1 \
        -netdev user,id=hostnet0,hostfwd=tcp::5555-:22 \
        -device e1000,netdev=hostnet0,mac=52:54:00:d1:66:6f \
        -drive if=virtio,file=/home/ravikb/development/vm_images/ubuntu_vm_1.qcow2,cache=none \

It works fine. I was able to ssh from both localhost and other machines on network. However, if I add another network port to the guest by adding following lines to command so that I get another interface on 192.168.122.xxx
        -netdev tap,id=hostnet1 \
        -device e1000,netdev=hostnet1,mac=52:54:00:d1:68:6f

I can no longer do ssh to the guest. I tried adding host IP address, guest IP of 10.0.2.15 to hostfwd command, I can not get it working. Am I missing something? I am using ubuntu18.04 for both guest and host.

regards,
Ravi

reply via email to

[Prev in Thread] Current Thread [Next in Thread]