How to migrate a qubes system to another laptop?

Hi, here’s the question context: I just installed Qubes and fully updated it, I also have another laptop with Qubes which is very old and everything needs updating except dom0. I’ve already backed up all I wanted to from the old system.

How can I migrate the new system to the old one? Do I make a backup of all Qubes (including dom0) and just restore them on the other machine? If so, what happens with the qubes that already exist (same names), do they get overwritten? Are there any qubes I shouldn’t migrate (e.g. does restoring sys-usb from another, quite different, machine work properly)?

About the old TemplateVMs, can I just delete these on the old system (use “Delete qube”) and migrate in the updated ones with Restore, or do I need to do some kind of installation / uninstallation?

To ask the same question in other way: can I just delete all qubes on the old system (use “Delete qube”) except dom0, then Restore all qubes from another machine, and expect everything to work? If not, what is the best way to go about it? Thank you!

1 Like

With some exceptions, that process will work fine.

  • Templates installed with the package manager will need to be
    uninstalled with it. This should be `dnf remove qubes-template-.

  • If you replace sys-usb/sys-net (and any other VM with PCI devices) you
    will have to manually reconfigure the PCI devices.

  • If you don’t delete the VMs on the receiving machine, the newly
    created ones will be named vmname1 instead of being overwritten.

1 Like

Thank you, I did and it worked without big issues. I didn’t change sys-usb, so using the old one. Uninstalled the templates… I’m curious if the new templates will get automatic notification for updating from dom0, since they haven’t been “installed”, only copied over.

The only bug I’ve discovered so far was the Applications in the menu for the new qubes going haywire, which was easy to refresh.

1 Like

Hi. Just adding here a link to the Qubes migration tool in documentation in case another user comes by the thread and is not yet aware of it:

2 Likes

Instead of Backup and Restore, could I simply move the SSD/NVMe to the new PC? Or use CloneZilla to clone to another drive?

1 Like

You can, but you’ll need to fix the PCI devices passthrough to your qubes:

This would be the least effort, but I’m wondering if anyone tried to Clone Qubes with CloneZilla or some other Disk Cloning Software… I cloned a lot of disks but I had a tough time with cloning a Proxmox SSD (numerous tools, none booted afterwards)… But if there aren’t experiences then I’ll test it and report back…

If you want to clone the Qubes OS disk to another disk that has the same or bigger size then you can just use dd to write the old disk to the new disk. And then extend the partition/LVM on the new disk if it was bigger.

CloneZilla can also clone with dd, resize afterwards from Qubes OS?

No idea, you can install Qubes OS in a standalone qube and test it.

Cloned Qubes to another nvme with CloneZilla, but when starting qubes I get python errors in journalctl like "UnicodeEncodeError: ‘ascii’ codec can’t encode character ‘\xe4’.

Update, had to configure the strict reset for ethernet passthrough device now all qubes seem to be working…

So migration with CloneZilla from internal nvme to external nvme (via USB) was succesfully… New nvme is bigger, can I resize the partition afterwards?

Everything seems to work on another Laptop, but both share the same Gen Intel Processor…

You can search how to resize the LVM thin pool in any Linux OS and it should be applicable to Qubes OS.

1 Like