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