Importing from VMware and VirtualBox
You can bring an existing VM over from VMware (Workstation, Fusion, ESXi) or VirtualBox. staxmax reads its settings and disk from the files those programs export, converts the disk, and creates a new VM from it, stopped, so you can watch its first boot.
Shut the VM down in VMware or VirtualBox before you export it. A VM exported while running, or suspended, may not boot cleanly.
What to export
| From | Export | Then add |
|---|---|---|
| VMware Workstation / Fusion | File → Export to OVF, choosing the .ova format | The .ova file |
| VMware ESXi / vCenter | Export OVF Template, or ovftool to an .ova | The .ova file (or the .ovf and its .vmdk files) |
| VirtualBox | File → Export Appliance, OVF 1.0 or 2.0, as an .ova | The .ova file |
| A VMware VM's folder | Nothing: use the files as they are | The .vmx and every .vmdk in the folder |
| A VirtualBox VM's folder | Nothing | The .vbox and its .vdi |
| A disk on its own | – | A .vmdk, .vdi, .vhd, .vhdx or .qcow2 file |
An .ova is the simplest: one file with everything in it, and the disk inside it is compressed, so it uploads faster. A VMware folder with snapshots works too, as long as you add every .vmdk (the snapshot's disk and the ones it builds on): the import flattens them into one disk.
Importing
- On the Virtual machines page, click Import.
- With more than one node, choose the node the VM is to run on. The files go there and are converted there.
- Click Choose files and select the export, or paste a link to it and click Download (for example from a web server or a NAS that serves files over HTTP). The page shows the upload; keep it open until the files have arrived. A large disk takes a while over the network. Closing the dialog before clicking Import VM (with Cancel, Escape or ✕) stops the uploads and downloads and discards the files.
- staxmax reads the files and shows what it found: where it came from, the guest OS, the disk and its size. If a file is missing (a VMware disk is often split into several
.vmdkfiles), it names it; click Add files and add it. - Check the settings, which start from the original VM's:
- CPUs, memory, disk: the disk can be made larger than it was, not smaller.
- Firmware: UEFI or Legacy BIOS, read from the export or, for a disk on its own, from its partition table. It must match how the OS was installed, or it will not boot.
- Windows: ticked when the export says it is Windows. The VM then gets what Windows drives without extra drivers (an NVMe disk, a USB tablet) and a TPM.
- Disk type (not Windows): VirtIO SCSI is the fastest. Choose NVMe if the guest cannot find its disk at boot (see below).
- Keep its MAC address: only when the original VM will never run again. It keeps DHCP reservations and licences tied to the address working.
- Click Import VM. The disk is converted straight into the new VM. You can close the dialog; the VM shows as Importing on the Virtual machines page until it is done.
- When it is done, open its Screen console and start it there, to see its first boot.
If you asked for protection, it starts once the import has finished: the first copy goes to another node like for any new VM.
The first boot
The VM gets new virtual hardware, so the guest finds a few things changed.
Network. The network card is a VirtIO card with a new name inside the guest. A Linux guest whose network settings name the old card (ens160, ens192, ens33 from VMware, enp0s3 from VirtualBox) comes up without a network: sign in on the console, run ip link to see the new name (often enp5s0), and change it in /etc/netplan/, /etc/network/interfaces or NetworkManager. Settings that match by MAC address need the new address unless you kept the old one.
Windows. Windows has no driver for the VirtIO network card. Choose the VirtIO drivers ISO in the import (add virtio-win.iso on the ISOs page first; the dialog's link to it opens in a new tab, so the files already added stay), and once Windows is up, run virtio-win-guest-tools.exe from it; then use Eject install media. If Windows stops at boot with INACCESSIBLE_BOOT_DEVICE, it did not have its NVMe driver set to start at boot. The usual fix is to install the VirtIO drivers in the original VM before exporting it, or to start Windows once in Safe Mode, which loads the storage drivers it finds.
A Linux guest that cannot find its disk (it drops to an initramfs or dracut prompt) was built with only the drivers for its old disk controller. Import it again with Disk type: NVMe, or rebuild its initramfs with the VirtIO drivers in the original VM first (on RHEL, Rocky or Alma: dracut -f --add-drivers "virtio_scsi virtio_blk").
A UEFI Linux guest that stops in the UEFI shell has its boot loader only where its old firmware remembered it, not at the standard fallback path. In the shell, start it by hand (for example fs0:\EFI\debian\grubx64.efi, or shimx64.efi), then in the guest run grub-install --force-extra-removable (Debian, Ubuntu) so it boots by itself from then on.
VMware Tools and VirtualBox Guest Additions do nothing here and can be uninstalled. An imported guest has no Incus agent (only images from the catalog come with it), so the Root shell and Files tabs of its console do not work: sign in on Terminal or Screen, or over SSH. staxmax learns its address from its network traffic, as for Windows, so failover works without the agent.
Taking a VM to VMware or VirtualBox
⋯ → Download as OVA on the Virtual machines page downloads a VM as an .ova file, which VMware Workstation, Fusion and ESXi (Deploy OVF Template) and VirtualBox (File → Import Appliance) open. It holds the VM's disk and its CPUs, memory and firmware, not its snapshots.
The node converts the disk first, so the download starts after a while: about half a minute per few GB of data. A running VM is copied from a snapshot, which holds only what the guest has written to disk; stop it first for a clean copy.
On the other side the VM gets hardware those programs offer and guests have drivers for: its disk on a SATA controller and Intel E1000 network cards, with new MAC addresses. A Windows VM may need a Safe Mode start before it finds its disk on the new controller (see the first-boot notes above, the other way round). In VirtualBox, a VM that used UEFI here needs Enable EFI ticked in its settings before it starts: VirtualBox does not read that from the file.
Limits
- One disk. A staxmax VM has one disk, so only the first (boot) disk is imported. The import names any others it leaves out. Copy their data into the VM over the network, or merge them first.
- VirtualBox snapshots cannot be imported from the VM's folder. Delete the snapshots in VirtualBox (the current state stays), or export the VM as an
.ova, which has none. - VirtualBox
.vdidisks needqemu-utilson the node. Nodes installed with staxmax 0.2.7 or later have it; on older ones, runsudo apt install qemu-utils, or export the VM as an.ova(VirtualBox puts a.vmdkin it, which needs nothing extra). - Room. The files are kept on the node's storage pool while they are converted, then removed, so the pool needs room for the export and for the VM's data at the same time. The import refuses files that would leave the pool less than 10% free, counting the files still arriving, and stops a transfer that gets too close to that while it runs.
- Snapshots, VMware settings and VirtualBox extras (shared folders, 3D, extra network cards) are not carried over. Add network cards and a TPM afterwards with Edit.
- Files that wait for an import are discarded after a day, or when the node's staxmaxd restarts.