Pack an image using a virtual machine


I’m repacking rocky 9 image for MAAS. It works perfectly when I use my own computer. On the server and in a virtual machine it fails due to the following setting -cpu host is unsupported

I wonder if one can run the build without this option. Simply removing this option causes kernel panic.

Hi @dataved ,

do you have kvm enabled?

It seems kvm is enabled:

$ sudo kvm-ok
[sudo] password for afedotov:
INFO: /dev/kvm exists
KVM acceleration can be used

Here is the error message:

qemu-system-x86_64: CPU model 'host' requires KVM or HVF

I don’t know by heart (if anybody knows, please jump in!).

Since you have a working machine, I’d first check and compare all the packages and their versions - qemu, packer and the others installed

thanks for your suggestion!

adding a user to kvm group helped on a server without VM, probably the script was modified to run as unprivileged