Migrate VM from Awanio CEP to Cockpit
Running migration via Vapor Web UI (without docker-compose)
You can set up and run the containerized migration utility directly from the Vapor Web UI without using Docker Compose command line tools.
1. Configure the Container
In the Vapor Web UI, navigate to the Docker tab, select Containers, and click + Create Container to open the creation drawer. Set the following options:
Name:
kvirt2virtImage:
r.awan.app/library/tools/kvirt2virt:v1.0.4Network: Change the network selection to
host(this ensures the containerized libvirt tools can resolve local network domains and hypervisor socket interfaces).Advanced Options:
- Enable Privileged Mode (required to gain access to system virtualization and storage backends).
- Enable Allocate Pseudo-TTY (-t) (required for interactive terminal prompts).
- Enable Keep STDIN Open (-i) (required for interactive terminal prompts).
Volumes (Bind Mounts): Add the host paths to mount them inside the container (set the type to
bindand propagation torslavewhere applicable). Choose the source paths based on your Docker installation type:Option A: Standard Docker (e.g., Debian-based, RHEL, or official Docker CE)
If your node uses a standard Docker daemon installed via native packages (e.g.,
apt-get install docker-ceon Debian), use direct host paths:- Libvirt Socket: Source
/var/run/libvirt➔ Target/var/run/libvirt(Typebind, Propagationrslave) - KubeVirt Pod Disk Storage: Source
/var/lib/kubelet➔ Target/var/lib/kubelet(Typebind, Propagationrslave) - Local VM Images Pool: Source
/var/lib/libvirt/images➔ Target/var/lib/libvirt/images(Typebind, Propagationrslave) - Host Kubeconfig Configuration: Source
/root/.kube➔ Target/root/.kube(Typebind)
Option B: Snap-confined Docker (e.g., Ubuntu Snap installations)
If your node uses Docker installed via Ubuntu Snap, the daemon runs in a confined mount namespace and cannot directly access
/var/lib/kubeletor/var/run/libvirt. Follow these steps:- On the host machine, run the following commands to create shared loop-back mounts:bash(To make these mounts persistent across reboots, add them to
# Expose kubelet storage: sudo mkdir -p /var/snap/docker/common/kubelet sudo mount --bind /var/lib/kubelet /var/snap/docker/common/kubelet # Expose libvirt daemon socket: sudo mkdir -p /var/snap/docker/common/libvirt sudo mount --bind /var/run/libvirt /var/snap/docker/common/libvirt/etc/fstab) - In the Vapor Web UI, set the volume fields using the exposed snap paths:
- Libvirt Socket: Source
/var/snap/docker/common/libvirt➔ Target/var/run/libvirt(Typebind, Propagationrslave) - KubeVirt Pod Disk Storage: Source
/var/snap/docker/common/kubelet➔ Target/var/lib/kubelet(Typebind, Propagationrslave) - Local VM Images Pool: Source
/var/snap/docker/common/var/lib/libvirt/images➔ Target/var/lib/libvirt/images(Typebind, Propagationrslave) - Host Kubeconfig Configuration: Source
/home/awanio/.kube➔ Target/root/.kube(Typebind)
- Libvirt Socket: Source
- Libvirt Socket: Source
Click Create Container to spin up and run the container daemon in the background.
2. Execute Migration inside the Web Terminal
Once the container shows as running in the list:
- Click the container actions dropdown and select the Terminal action to open the Container Terminal Modal.
- Inside the web terminal, type and run:bashThis launches the interactive wizard where you can specify the target VMI, target name, storage pool, network, and/or copy-paste your kubeconfig setup.
migrate -i - Alternatively, you can run the non-interactive command:bash
migrate --vmi-name cirros-vm --namespace default --storage-pool default --target-name my-vm-copy
Output Modes
Default Mode
By default, the script runs in quiet mode, displaying only the VM details, real-time progress bars for copy/convert operations, and the final success status:
Migrating VM 'default/cirros-vm' to host VM 'my-cirros-copy'...
Progress: [========================================] 100.0% (16MB / 16MB)
Progress: [========================================] 100.0%
SUCCESS: VM 'my-cirros-copy' restored and is now running on host. (1.17s)Verbose Mode
Run with the --verbose flag to output all diagnostic step logs, XML transformations, CPU model patching, and migration binary patches.