[Top][All Lists]

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

qemu on macos, VM can't ping ip on bridge0

From: Gary Allen
Subject: qemu on macos, VM can't ping ip on bridge0
Date: Sun, 12 Apr 2020 16:02:09 +0800

I installed qemu on macos and use a tap device in the vm. Below are my steps.

  1. install qemu

    brew install qemu

  2. install tuntap, after installation, I can see tap devices in /dev/tapX

    brew install tuntap

  3. create a bridge

    sudo ifconfig bridge0 create

  4. configure ip address on bridge0

    sudo ifconfig bridge0

  5. sudo ifconfig bridge0 up

  6. start my qemu vm (which is centos), and log in to the vm, mannually configure the static ip address as, gateway is

    sudo qemu-system-x86_64 -m 2048 -vga virtio -show-cursor -usb -device usb-tablet -drive file=centos-temp.qcow2,if=virtio -accel hvf -cpu host -net nic -net tap,ifname=tap0,script=no,downscript=no

  7. after the vm starts, I can see a tap0 in the output of ifconfig, and I add tap0 to bridge0

    sudo ifconfig bridge0 addm tap0

however, after theses steps, I cant's ping in my vm, and neither can I ping in my mac host.

What am I doing wrong?

reply via email to

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