FreeBSD 11 - Bhyve - Spoof MAC address

John Nielsen lists at jnielsen.net
Mon Jan 4 23:21:19 UTC 2016


> On Jan 4, 2016, at 9:32 AM, James Lodge <James at Lodge.me.uk> wrote:
> 
> Hi All,
> 
> 
> I'm just getting started with Bhyve. So far everything is working as expected. My original goal was to be running Ubuntu 12.04 i386 as I need it for a particular project. One issue I'm having is MAC address spoofing. I'm aware I can change the MAC address within Ubuntu but I'd like to configure the tap interface from the host which should be possible according to man pages.
> 
> 
> Bhyve Man Page: https://www.freebsd.org/cgi/man.cgi?query=bhyve&sektion=8
> 
> 
> 
> The issue I have is that by setting the below, the vm boots, I can console via null modem, but there is no eth0 interface, only the loopback. Removing the static MAC, reboot and everything is present and correct.
> 
> 
> -s 2:0,virtio-net,tap0,mac=xx:xx:xx:xx:xx:xx

It looks like you are setting the MAC correctly on your bhyve command line and bhyve is running; so far so good. Is it possible that Ubuntu has a different MAC saved for its idea of eth0 and is therefore not doing what you expect? (Perhaps udev is renaming the device?)

Can you run these two commands within the VM and post the output?
 ip link show
 lspci


JN



More information about the freebsd-virtualization mailing list