0

I'm running Qemu on Windows and I can't connect to the ESXi guest and can't ping the host network gateway from the ESXi guest. I disabled all other network interface on Host machine except the internet connecting Ethernet interface. I've spent like 2 days and still can't get it working.

Any idea how to resolve the issue?

I'm using the following command to start the guest.

qemu-system-x86_64 -boot d -hda esxi.img -m 4096 -cpu Westmere -machine q35 -smp cpus=2,cores=2 -accel tcg -netdev user,id=net0,hostfwd=tcp::2022-:22,hostfwd=tcp::8080-:80 -device e1000,netdev=net0

enter image description here

192.168.1.1 is the router gateway.
192.168.1.4 is the host machine IP address.

Esxi guest can't ping either.

user630702
  • 495
  • 10
  • 32
  • What does qemu guest have to do with vmware guest? Are they connected somehow, one is a guest of another? I see you are using qemu guest networking, that means that qemu process will NAT all packets into host IP address; if the host has just one IP address, that is what should be given access in vmware. Is vmware accessible from the host which runs qemu? – Nikita Kipriyanov Jun 16 '22 at 12:35
  • what do you mean vmware? This is just a new esxi. And I can' t connect to it. `the host has just one IP address, that is what should be given access in vmware` Do you mean that I should assign the host ip address to the ESXi? It had the the `10.0.2.15` ip address before but I still can't connect to that IP either – user630702 Jun 16 '22 at 12:37
  • Err. esxi is vmware hypervisor. So, do you have an access from the host machine where you running qemu to the vmware host? – Nikita Kipriyanov Jun 16 '22 at 12:44
  • qemu is running on the windows host. – user630702 Jun 16 '22 at 13:14
  • And so, does access from windows to vmware esxi work? – Nikita Kipriyanov Jun 16 '22 at 13:29
  • No it doesn't work. – user630702 Jun 16 '22 at 13:53
  • So it's not a qemu problem. Fix your access from windows to vmware. – Nikita Kipriyanov Jun 16 '22 at 13:59
  • I just created a Centos VM using QEMU and I can't access the Centos VM either. I mean I can't SSH or ping. For Some reason networking isn't working as expected with Qemu. – user630702 Jun 16 '22 at 14:05
  • Do you SSH to **localhost** (to **windows** system), port 2022? Does the firewall on **windows** allow that? Does the firewall in Linux VM allow connections to port 22 (from 10.0.2.2 or from 192.168.1.4)? Nothing outside Qemu knows about 10.0.2.x addresses; Qemu user mode networking does network address translation. I mean, there is unlikely you have problem with Qemu, you just doing something wrong because you read manual not carefully enough. I admit Qemu documentation is awful, but *this* topic is described in quite details. – Nikita Kipriyanov Jun 16 '22 at 17:22
  • Yeah, OP should configure networking properly to be able to connect to VMs. As an example: https://gist.github.com/arvati/546617042fcf2669f330b739075c1c5d – Stuka Apr 08 '23 at 10:13

0 Answers0