I’m having issues with running an arm64 machine using vagrant with the vagrant-libvirt plugin.
Here’s the Vagrantfile:
<code>Vagrant.configure("2") do |config|
# Disable synced folders
config.vm.synced_folder ".", "/vagrant", disabled: true
# Machine setup
config.vm.define "pi4b" do |app|
app.vm.provider "libvirt" do |lv|
lv.machine_arch = "aarch64"
end
app.vm.box = "generic/debian12"
app.vm.box_architecture = "arm64"
app.vm.hostname = "athena"
app.vm.network :private_network, ip: "192.168.58.2"
end
end
</code>
<code>Vagrant.configure("2") do |config|
# Disable synced folders
config.vm.synced_folder ".", "/vagrant", disabled: true
# Machine setup
config.vm.define "pi4b" do |app|
app.vm.provider "libvirt" do |lv|
lv.machine_arch = "aarch64"
end
app.vm.box = "generic/debian12"
app.vm.box_architecture = "arm64"
app.vm.hostname = "athena"
app.vm.network :private_network, ip: "192.168.58.2"
end
end
</code>
Vagrant.configure("2") do |config|
# Disable synced folders
config.vm.synced_folder ".", "/vagrant", disabled: true
# Machine setup
config.vm.define "pi4b" do |app|
app.vm.provider "libvirt" do |lv|
lv.machine_arch = "aarch64"
end
app.vm.box = "generic/debian12"
app.vm.box_architecture = "arm64"
app.vm.hostname = "athena"
app.vm.network :private_network, ip: "192.168.58.2"
end
end
When running vagrant up --provider libvirt
, I get the following error:
<code>Error while creating domain: Error saving the server: Call to virDomainDefineXML failed: invalid argument: could not get preferred machine for /usr/bin/qemu-system-aarch64 type=kvm
</code>
<code>Error while creating domain: Error saving the server: Call to virDomainDefineXML failed: invalid argument: could not get preferred machine for /usr/bin/qemu-system-aarch64 type=kvm
</code>
Error while creating domain: Error saving the server: Call to virDomainDefineXML failed: invalid argument: could not get preferred machine for /usr/bin/qemu-system-aarch64 type=kvm
The latter part appears to be related to KVM (possibly a conflict with Virtualbox? No machine is running though), but I cannot find much of anything online.
Some stats on the machine in use:
<code>OS: ArchLinux (x86_64)
Kernel: 6.9.1
CPU: 12th Gen Intel i7-12700H (20) @ 4.600GHz
</code>
<code>OS: ArchLinux (x86_64)
Kernel: 6.9.1
CPU: 12th Gen Intel i7-12700H (20) @ 4.600GHz
</code>
OS: ArchLinux (x86_64)
Kernel: 6.9.1
CPU: 12th Gen Intel i7-12700H (20) @ 4.600GHz
How could I diagnose this issue? Is there another way to run an arm64 machine on Vagrant?