Skip to content

Virtual Machines

Not officially supported

Hedgehog does not officially support running control or gateway nodes as virtual machines.

The examples on this page use libvirt/QEMU. The underlying requirements — UEFI without secure boot, VirtIO devices, and PCI passthrough for gateway data-plane NICs — apply to any hypervisor.

Common Settings

These apply to both control and gateway nodes.

  • Use the q35 machine type with efi firmware. Only UEFI boot is supported.
  • Disable secure boot:

    <os firmware='efi'>
      <firmware>
        <feature enabled='no' name='secure-boot'/>
      </firmware>
    </os>
    
  • To Disable Secure boot in Proxmox:

  • Start the VM, enter the UEFI configuration
  • Navigate via keyboard Device Manager -> Secure Boot Configuration. Ensure it is disabled.
  • Use VirtIO devices wherever possible.
  • Attach a console device.
  • Enable autostart so the VM starts with the host.
  • The QEMU guest agent is built into the Flatcar image. To use it, add a virtio-serial port named org.qemu.guest_agent.0. See the Flatcar documentation for details. In Proxmox ensure to check the box for Guest Agent when creating the Virtual Machine

Control Node

  • Size the VM to meet or exceed the control node requirements.
  • Configure both NICs as virtio: one for the outside world, one for the out-of-band management network of the fabric switches.

Gateway Node

  • There are no minimum performance guarantees when the gateway is in a VM.
  • Size the VM to meet or exceed the gateway node requirements.
  • Configure the management NIC as virtio.
  • Add a virtual IOMMU to the VM, the gateway installation fails without it. With libvirt, use the q35 machine type and add:

    <features>
      <ioapic driver='qemu'/>
    </features>
    <devices>
      <iommu model='intel'>
        <driver intremap='on' caching_mode='on'/>
      </iommu>
    </devices>
    
  • Give the VM at least 24 GiB of RAM, as the gateway dataplane uses 16 GiB of hugepages and will not start with less.

  • Use PCI passthrough — not SR-IOV — for the data-plane NICs. Passthrough usually requires host-side configuration (IOMMU, driver binding) before the device can be attached: