Troubleshooting — Virtual Machines
VM does not boot
Cause: the system disk is not ready, the source image is invalid, or the instance profile does not match the image.
Solution:
-
Verify that VMDisk resources exist and are ready:
kubectl get vmdisk -
Check the VMInstance events:
kubectl describe vminstance <vm-name> -
Verify that the
instanceProfileis appropriate for the OS image (for exampleubuntufor an Ubuntu image). An incorrect profile will not prevent boot but the VM will not be optimized (missing drivers). -
Verify that the chosen
instanceTypeis valid (prefixs1,u1, orm1followed by a valid size).
SSH timeout with PortList
Cause: port 22 is not in the externalPorts list, external exposure is not enabled, or the SSH key was not injected.
Solution:
-
Verify that
external: trueis enabled and port 22 is listed:vm.yamlspec:
external: true
externalMethod: PortList
externalPorts:
- 22 -
Retrieve the exposed service IP address:
kubectl get svc -
Verify that your SSH key was injected in the manifest:
vm.yamlspec:
sshKeys:
- "ssh-ed25519 AAAAC3... user@laptop" -
Test the connection in verbose mode:
ssh -v user@<external-ip>
.local DNS does not work in the VM
Cause: systemd-resolved treats .local domains as mDNS (multicast DNS), which prevents standard DNS resolution for these domains.
Solution:
-
Create a drop-in for
systemd-networkdthat disables mDNS:sudo mkdir -p /etc/systemd/network/10-cloud-init-eth0.network.d -
Create the configuration file:
sudo tee /etc/systemd/network/10-cloud-init-eth0.network.d/override.conf << 'EOF'
[Network]
MulticastDNS=no
EOF -
Reload the network configuration:
sudo networkctl reload -
Verify that resolution works:
resolvectl status
resolvectl query my-service.local
This issue affects all distributions using systemd-resolved (Ubuntu 22.04+, Debian 12+, etc.). The fix persists after reboot.
Disk not attached to the VM
Cause: the VMDisk name does not match the entry in spec.disks, the VMDisk is not ready, or the storageClass is invalid.
Solution:
-
Verify that the VMDisk name exactly matches the one referenced in
spec.disks:vm.yamlspec:
disks:
- data-volume # Must match the VMDisk metadata.name -
Check the VMDisk status:
kubectl get vmdisk data-volume
kubectl describe vmdisk data-volume -
The available storageClasses on Hikube are:
local,replicated, andreplicated-async. For a VM (single instance),replicatedis recommended.
Serial console / VNC for debugging
Cause: the VM is not responding via SSH and you need direct access to diagnose the issue.
Solution:
-
For serial console access (text):
virtctl console <vm-name> -
For VNC access (graphical):
virtctl vnc <vm-name> -
From the console, you can check:
- Boot logs
- Network configuration (
ip addr,ip route) - Service status (
systemctl status) - System logs (
journalctl -xe)
virtctl is the KubeVirt CLI. Install it from the KubeVirt releases.