QEMU-NAT
Материал из YourcmcWiki
Простенький скрипт, чтобы сделать tap интерфейс с NAT для QEMU:
#!/bin/bash ip l set tap0 up ip a a 10.0.2.2/24 dev tap0 echo 1 > /proc/sys/net/ipv4/ip_forward iptables -t nat -C POSTROUTING -o wlan0 -j MASQUERADE || \ iptables -t nat -A POSTROUTING -o wlan0 -j MASQUERADE iptables -C FORWARD -i tap0 -j ACCEPT || \ iptables -I FORWARD 1 -i tap0 -j ACCEPT iptables -C FORWARD -o tap0 -m state --state RELATED,ESTABLISHED -j ACCEPT || \ iptables -I FORWARD 1 -o tap0 -m state --state RELATED,ESTABLISHED -j ACCEPT ip r a 192.168.7.0/24 via 192.168.1.176
А вот так запустить VMWare ESXi в QEMU:
sudo -E kvm -smp 4,cores=2,threads=2,sockets=1 -m 4096 \ -bios /usr/share/ovmf/OVMF.fd \ -drive file=vmware.qcow2,if=none,id=nvm \ -device nvme,serial=HBSE59101400307,drive=nvm \ -cpu host \ -netdev tap,ifname=tap0,script=no,id=n0 \ -device vmxnet3,netdev=n0,mac=52:54:98:F6:4A:03 \ -cdrom /d/setup/iso/VMware-VMvisor-Installer-7.0U2a-17867351.x86_64.iso