Import from VMware or Proxmox
This guide moves guests from vCenter or Proxmox onto kcore. Moving a VM between kcore nodes is VM migration.
kcore-migrate is separate from kctl. Inventory reads the source API and writes Terraform. It does not copy disk bytes. convert turns an exported disk into qcow2 or raw by calling virt-v2v or qemu-img. terraform-provider-kcore applies the VM, and kctl uploads the finished image.
Install
On a Linux jump host, nix develop in the kcore-migrate repository supplies Go plus virt-v2v and qemu-img. GitHub release archives also ship the inventory command for Linux and macOS. Disk conversion still runs on Linux.
git clone git@github.com:kcorehypervisor/kcore-migrate.git
cd kcore-migrate
nix develop
make build
./bin/kcore-migrate version
Inventory
The password comes from VMWARE_PASSWORD or PROXMOX_PASSWORD, or from the variable named by --password-env. It is not a command-line flag. --insecure skips TLS verification. Both sources write the same guest record.
VMware
The VMware reader uses govmomi. It lists virtual machines and leaves the VMDKs on the datastore.
export VMWARE_PASSWORD=...
kcore-migrate inventory \
--source vmware \
--endpoint https://vcenter.example \
--username migrate@vsphere.local \
--out ./migrate-out
Proxmox
The Proxmox reader lists QEMU virtual machines and LXC containers. A host without a port is read on port 8006. Disks stay on the node.
export PROXMOX_PASSWORD=...
kcore-migrate inventory \
--source proxmox \
--endpoint https://pve.example:8006 \
--username root@pam \
--out ./migrate-out
What inventory writes
guests.tf— onekcore_vmper guest: name, CPU, memory, the first disk size, and NICs.gaps.md— extra disks, templates, LXC containers, VLAN tags, raw device mappings, and distributed port groups.
The provider registers kcore_vm only. NIC blocks name networks that must already exist. storage_backend is filesystem until the provider accepts Ceph. image_path stays empty until convert produces a disk. kctl accepts raw or qcow2.
Convert
convert does not read VMDK itself. An OVA, OVF, VMX, or VMDK runs virt-v2v -o disk, which fixes the guest for KVM and writes name-sda into --out. A qcow2, raw, or img file runs qemu-img convert, which only changes the container format. That is the usual path for a Proxmox disk.
kcore-migrate convert --input guest.ova --out ./converted
kcore-migrate convert --input vm-100-disk-0.qcow2 --format raw --out ./converted/vm-100.raw
--format is qcow2 (the default) or raw. --tool virt-v2v or --tool qemu-img overrides the choice. An OVA, OVF, or VMX cannot use qemu-img. Set image_path to the finished file and image_format to qcow2 or raw.
Tools on the conversion host
| Piece | Role |
|---|---|
virt-v2v | nixpkgs, in the Linux shell. Converts an exported VMware guest and installs virtio drivers. |
virtio-win | Fedora Windows virtio drivers, already linked by the nixpkgs virt-v2v package. |
qemu-img | nixpkgs qemu-utils. Changes the container format only. |
nbdkit | Wrapped inside virt-v2v. Serves the source disk during conversion. |
| VMware VDDK | Broadcom download for a direct vCenter read. Proprietary. Not in kcore-migrate and not in the GitHub release. The nixpkgs nbdkit build has no VDDK plugin, so this shell converts exported disks. |
Apply
Create the kcore networks named in guests.tf. Point image_path and image_format at the converted disk, then apply with the Terraform provider. Upload that same raw or qcow2 image with kctl when the cluster is ready to receive it.
Limits
- Inventory does not copy disk bytes.
- A direct read from vCenter waits on an operator-installed VDDK and an nbdkit built with the VDDK plugin.
- LXC containers and templates are listed, and gaps.md says they are not a normal QEMU guest to convert as-is.
- This is not live migration between kcore nodes. That path is VM migration and needs shared Ceph storage.