1

I need to run two ESXi hosts on KVM and assign them distinct, external IPs visible to the external network. Desired topology:

  ESXI     ESXI
   ↓        ↓       
  KVM      KVM
   ↓        ↓
  vIF      vIF
(own ip)  (own ip)
   ↓        ↓
 Physical NIC 
      ↓
 External Net

It's a cinch with other hosts as two bridged Virtual Interfaces with vNIC model set to Virtio device would do the trick. But Virtio as NIC model is not supported by ESXi and it won't boot complaining about no network adapter detected.

Is there a way to make Virtual Interfaces work with ESXi on KVM? I tried to go along with E1000 as NIC but couldn't connect ESXi to external network.

Here's the config I tried. None worked:

<interface type='bridged'>
  <source bridge='br0'/>
  <model type='virtio'/>  #ESXi won't boot due to no adapter detected
</interface>

<interface type='bridged'>
  <source source='br0'  />
  <model type='e1000'/>  #ESXi boots but no network connectivity
</interface>

<interface type='direct'>
  <source dev='br0' mode='bridged' />
  <model type='e1000'/> #ESXi boots but no network connectivity
</interface>

<interface type='direct'>
  <source dev='br0' mode='passthrough' />
  <model type='e1000'/>  #ESXi boots but no network connectivity
</interface>

#Not applicable to my requirements as physical NIC would be passed to KVM
<interface type='direct'>
  <source dev='enp2s0:0' mode='passthrough' />
  <model type='e1000'/>  
</interface>

<interface type='direct'>
  <source dev='br0' mode='bridged' />
  <model type='e1000'/>  #ESXi boots but no network connectivity
</interface>

Here's my interfaces:

 br0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
    inet 192.168.1.10  netmask 255.255.255.0  broadcast 192.168.1.255
    inet6 fe80::b8ca:7bff:fe23:e847  prefixlen 64  scopeid 0x20<link>
    ether ba:ca:7b:23:e8:47  txqueuelen 1000  (Ethernet)
    RX packets 0  bytes 0 (0.0 B)
    RX errors 0  dropped 0  overruns 0  frame 0
    TX packets 4  bytes 300 (300.0 B)
    TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

 enp0s26u1u6: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
    inet 192.168.1.9  netmask 255.255.255.0  broadcast 192.168.1.255
    inet6 fe80::3be6:18f3:cdd7:d837  prefixlen 64  scopeid 0x20<link>
    ether a0:ce:c8:01:75:ef  txqueuelen 1000  (Ethernet)
    RX packets 25284  bytes 1737100 (1.6 MiB)
    RX errors 0  dropped 6860  overruns 0  frame 0
    TX packets 25208  bytes 29421441 (28.0 MiB)
    TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

  enp2s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
    inet 192.168.1.6  netmask 255.255.255.0  broadcast 192.168.1.255
    inet6 fe80::ca2d:afad:d824:1205  prefixlen 64  scopeid 0x20<link>
    ether 90:2b:34:9a:bf:67  txqueuelen 1000  (Ethernet)
    RX packets 3375628  bytes 4511208522 (4.2 GiB)
    RX errors 0  dropped 3301  overruns 0  frame 0
    TX packets 1832807  bytes 847946426 (808.6 MiB)
    TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
    device interrupt 18  

  enp2s0:0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
    inet 192.168.1.10  netmask 255.255.255.0  broadcast 192.168.1.255
    ether 90:2b:34:9a:bf:67  txqueuelen 1000  (Ethernet)
    device interrupt 18 

2 Answers 2

1

It is understandable that virtio-net doesn't work with ESXi as they're unlikely to care about providing drivers for a NIC that's only relevant in nested-virt. The e1000 is a standard NIC type though, so I would fully expect that to work. There's always the possibility that some bug in QEMU's emulation makes it incompatible with ESXi.

The following blog post suggests trying the 'vmxnet3' NIC model with QEMU

https://xrsa.net/2014/08/25/running-vmware-esxi-under-ovirt/

This is the vmware paravirtualized NIC model, which QEMU also supports.

1
  • But I haven't got VMW installed. Is there a way to install the vmxnet3 module manually w/o installing VMW or VMPlayer? Mar 10, 2017 at 15:19
0

You started out with this configuration, which is otherwise correct but ESXi can't use a virtio NIC:

<interface type='bridged'>
  <source bridge='br0'/>
  <model type='virtio'/>  #ESXi won't boot due to no adapter detected
</interface>

But, for whatever reason, you don't appear to have ever simply changed the NIC model type to e1000 and made no other changes. All of the other settings you have tried have the correct NIC model, but other broken or inappropriate settings.

Of course, you can (and probably should) also just use the vmxnet3 NIC type, which has been supported in libvirt and qemu just fine for many years now.

So, change only the model type, and don't change anything else.

5
  • But Far as I know vmxnet3 support Comes with VMW/player. Is there a workaround w/o installing VMW? Mar 11, 2017 at 16:28
  • What do you mean? Aren't you trying to run ESXi nested in KVM? Mar 11, 2017 at 20:19
  • because when i set model to vmxnet i got: qemu-kvm: -device vmxnet3,netdev=hostnet0,id=net0,mac=52:54:00:ae:36:e1,bus=pci.0,addr=0x3: 'vmxnet3' is not a valid device model name Mar 13, 2017 at 12:35
  • @user1611132 Make sure you're running a modern Linux distribution. It was added years ago. Mar 13, 2017 at 17:54
  • i am running a minimal centos-7 (modern enough i guess) but maybe it was the limitations of minimal base packages that spoiled the party? Mar 15, 2017 at 13:20

Not the answer you're looking for? Browse other questions tagged .