0

I am moving GNOME Boxes virtual machines from Fedora to Guix following the guide on Fedora wiki.

On the Fedora workstation:

$ virsh list --all
 Id   Name           State
-------------------------------
 -    win10          shut off
$ cd ~
$ virsh dumpxml win10 >win10.xml
$ mv .local/share/gnome-boxes/images/win10 win10

Then, I moved win10 and win10.xml to the home directory at the new machine. On that Guix system:

$ guix install gnome-boxes
$ cd ~
$ mv win10 .local/share/gnome-boxes/images/win10
$ guix install libvirt
$ virsh create win10.xml
error: Failed to create domain from win10.xml
error: Cannot check QEMU binary /usr/bin/qemu-system-x86_64: No such file or directory

qemu-system-x84_64 is located in a different place:

$ type qemu-system-x86_64
qemu-system-x86_64 is /run/current-system/profile/bin/qemu-system-x86_64

So, how do I complete importing the virtual machine?

Roman Riabenko
  • 2,145
  • 3
  • 15
  • 39

1 Answers1

1

The path to qemu-system-x86_64 is specified in the XML file. Open it in an editor of your choice, find the place where the path is specified and adjust it according to the path on your system. On a Guix system, the path should be:

<domain type='kvm'>
  …
  <devices>
    <emulator>/run/current-system/profile/bin/qemu-system-x86_64</emulator>
    …
  </devices>
  <seclabel type='dynamic' model='selinux' relabel='yes'/>
</domain>

But this will bring the next error message when trying virsh create on the edited XML file:

$ virsh create win10.xml
error: Failed to create domain from win10.xml
error: unsupported configuration: Security driver model 'selinux' is not available

Open the XML file again and remove the line mentioning selinux. Try virsh create on your XML file again and it should create the virtual machine this time. Be ready that the machine may start right away in the background.

Roman Riabenko
  • 2,145
  • 3
  • 15
  • 39