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

SOLVED: how to set fixed virtual-ethernet MAC address in VM while still doing DHCP?



In message <https://lists.debian.org/debian-user/2021/12/msg00606.html>
I wrote:
> I have a virtual machine (VM) running Debian 10.10.0 ("Buster") x86-64,
> running in an OpenBSD 7.0 host (using the OpenBSD 'vmm' VM monitor).
[[...]]
> my question is, how can I set a fixed virtual-ethernet MAC address
> in Debian and still have the system use DHCP for IPv4 network configuration?

In message <https://lists.debian.org/debian-user/2021/12/msg00607.html>,
Dan Ritter <dsr@randomstring.org> replied:
> OpenBSD's VM infrastructure owns the virtual hardware.
> 
> vm "tux" {
>     enable
>     memory 97G
>     owner jthorn
>     disk "/var/vmm/tux.qcow2" format qcow2
>     interface tap {
>         switch "uplink_veb420"
>         lladdr fe:ee:bb:d1:c8:01
>     }
> }
> 
> In your interface config for the VM, set the lladdr.

I'm pleased to report that Dan's solution works perfectly!  That is,
(contrary to my misunderstanding) the host (OpenBSD) owns BOTH ends of
the virtual network and can set the MAC address seen by the guest (Debian).

Stay safe and COVID-free, everyone, -- Jonathan


Reply to: