No corresponding virtual interface created on host for macvlan in vm

After deleting and recreating a vm a few times, DHCP stopped working in the VM. While investigating, I noticed that I can’t find the virtual interface on the host.

In my vm’s config, I have the following,

devices:
  vnet1:
    type: nic
    nictype: macvlan
    name: eth0
    parent: eno2
    hwaddr: 02:52:e7:bc:40:d7

In the vm, the interface shows up as,

21: eth0@if3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
    link/ether 02:52:e7:bc:40:d7 brd ff:ff:ff:ff:ff:ff link-netnsid 0
    inet 10.13.86.110/24 metric 100 brd 10.13.86.255 scope global dynamic eth0
       valid_lft 2151sec preferred_lft 2151sec
    inet6 fe80::52:e7ff:febc:40d7/64 scope link 
       valid_lft forever preferred_lft forever

But on the host, there is no if3 virtual interface.

josh@nas:~/ > ip a | grep if
9: veth15e2efb7@if8: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master orcabr0 state UP group default qlen 1000
11: veth79fe3c15@if10: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master orcabr0 state UP group default qlen 1000
13: veth0aef33bd@if12: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master orcabr0 state UP group default qlen 1000
15: veth5d50045d@if14: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master orcabr0 state UP group default qlen 1000
17: veth9247d1bf@if16: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master orcabr0 state UP group default qlen 1000
19: veth4439594d@if18: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master orcabr0 state UP group default qlen 1000
josh@nas:~/ > ip link show eno2
3: eno2: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode DEFAULT group default qlen 1000
    link/ether 3c:ec:ef:76:6e:a3 brd ff:ff:ff:ff:ff:ff
    altname enp4s0f1

The image is ubuntu/22.04/cloud and the agent is running.

I forgot to add --vm and it was a container. Deleting this.

1 Like