"Kirill A. Korinsky" <kir...@korins.ky> writes:

> Greetings,
>
> Seems that it is impossible to setup some MAC address to an network interfce 
> of
> VM. For example I have a VM with settings:
>
> vm "mx0" {
>       memory 1G
>
>       disk "/var/vm/mx0.qcow2"
>
>       interface {
>               switch "uplink"
>               lladdr "00:50:56:00:20:a5"
>       }
>
>       owner catap
> }
>
> and vmd creates tap device:
>
> tap3: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> mtu 1500
>       lladdr fe:e1:ba:d9:a5:44
>       description: vm4-if0-mx0
>       index 32 priority 0 llprio 3
>       groups: tap
>       status: active
>

What is the hardware address for the virtio network device inside the
VM? The tap(4) device is host-side. I just tested this locally and am
able to have the guest-side vio(4) properly set:

vio0: flags=8802<BROADCAST,SIMPLEX,MULTICAST> mtu 1500
        lladdr 00:50:56:00:20:a5
        index 1 priority 0 llprio 3
        media: Ethernet autoselect
        status: no carrier

If you want to change the host-side tap(4), see the ifconfig man page on
how to do so. vmd(8) could probably be changed to set that as well or
maybe there's a way to do it today that I'm not aware of. (I don't use
any of the lladdr features in vmd.)

-dv

Reply via email to