1

I am running dedicated server with few KVM VMs on it. I had success in the past getting separate public IPv4 address attached to one VM using macvtap driver and it works just like totally independent server just fine.

I am copying everything I am doing for the second public IPv4 I received from hosting service provider, but this time I can not access internet from second VM using macvtap.

Here is relevant host's ip link show for newly created macvtap interface when VM is launched by libvirt:

40: macvtap2@eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UNKNOWN mode DEFAULT group default qlen 500
link/ether 52:54:00:35:02:38 brd ff:ff:ff:ff:ff:ff

And here is guest's ifconfig output:

ens10     Link encap:Ethernet  HWaddr 52:54:00:35:02:38  
      inet addr:[PUBLIC IP]  Bcast:[BROADCAST IP PROVIDED BY HOSTER]  Mask:255.255.255.224
      inet6 addr: fe80::5054:ff:fe35:238/64 Scope:Link
      UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
      RX packets:0 errors:0 dropped:0 overruns:0 frame:0
      TX packets:21 errors:0 dropped:0 overruns:0 carrier:0
      collisions:0 txqueuelen:1000 
      RX bytes:0 (0.0 B)  TX bytes:1230 (1.2 KB)

Here is relevant section from virsh edit machine:

    <interface type='direct'>
      <mac address='52:54:00:35:02:38'/>
      <source dev='eth0' mode='vepa'/>
      <model type='virtio'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x0a' function='0x0'/>
    </interface>

When I am running tcpdump -vv host [PUBLIC VM IP] I can see incoming packets, but never response.

I see nothing in tcpdump -vv -i ens10 VMs output at all.

Similar setup seems to work with another VM and I fail to find what difference between two can cause second VM working the same. Anything I can do to debug it further?

1

Turned out it was matter of requesting separate MAC address for my virtual machine from Hetzner (my hoster) and not use randomly generated by libvirt one. Once I requested and updated config everything else just started working.

Some details: https://wiki.hetzner.de/index.php/Virtualisierung/en

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.