How to recover VMs copied before reinstall?

74 views
Skip to first unread message

Ron Hunter-Duvar

unread,
Sep 25, 2017, 7:12:53 PM9/25/17
to qubes...@googlegroups.com
Hi,

My first Qubes install ended up unbootable, and I didn't have a recent enough backup of my VMs. So I booted from a Ubuntu live cd, mounted the partitions, and copied everything off to a backup drive and did a clean reinstall.

Now I've copied my appvms back to /var/lib/qubes/appvms/, but they don't show up in the VM Manager.

Can anyone tell me how to get these appvms useable again?

Thanks,
Ron

Chris Laprise

unread,
Sep 26, 2017, 6:20:43 AM9/26/17
to Ron Hunter-Duvar, qubes...@googlegroups.com
Try using `qvm-add-appvm vmname templatename`.

--

Chris Laprise, tas...@posteo.net
https://twitter.com/ttaskett
PGP: BEE2 20C5 356E 764A 73EB 4AB3 1DC4 D106 F07F 1886

Ron Hunter-Duvar

unread,
Sep 26, 2017, 10:58:12 AM9/26/17
to qubes...@googlegroups.com, Chris Laprise


On September 26, 2017 4:20:34 AM MDT, Chris Laprise <tas...@posteo.net> wrote:
>On 09/25/2017 07:12 PM, Ron Hunter-Duvar wrote:
>> Hi,
>>
>> My first Qubes install ended up unbootable, and I didn't have a
>recent enough backup of my VMs. So I booted from a Ubuntu live cd,
>mounted the partitions, and copied everything off to a backup drive and
>did a clean reinstall.
>>
>> Now I've copied my appvms back to /var/lib/qubes/appvms/, but they
>don't show up in the VM Manager.
>>
>> Can anyone tell me how to get these appvms useable again?
>>
>> Thanks,
>> Ron
>>
>
>Try using `qvm-add-appvm vmname templatename`.

Doesn't that just create a new appvm? I want to access my existing ones from the previous install, not create new ones. I put a lot of hours into getting them set up the way I wanted them, and they contain important data I don't want to lose.

I am wondering if creating new ones of the same name, then overwriting the img files with the old ones would work.

Thanks,
Ron

One7two99

unread,
Sep 26, 2017, 11:21:06 AM9/26/17
to Ron Hunter-Duvar, qubes...@googlegroups.com, Chris Laprise
Hello Ron,


-------- Original Message --------
Subject: Re: [qubes-users] How to recover VMs copied before reinstall?
Local Time: 26 September 2017 4:58 PM

[...] I want to access my existing ones from the previous install, not create new ones. I put a lot of hours into getting them set up the way I wanted them, and they contain important data I don"t want to lose. [...]

I am also building all sys- / template- and App-VMs based on the available templates in Qubes. As I would like to rollout Qubes for friends and maybe also co-workers I have documented each step when configuring/provisioning new AppVMs or templates.

I've written a handful scripts which will take the default qubes-templates and apply all updates / packe installation and post-configuration tasks without user interaction.
This reduces time rebuilding the system but also allows another backup policy where I only store the data and reinstall everything else from my scripts.

If you're interested I can forward them to you.

[799]

Ron Hunter-Duvar

unread,
Sep 26, 2017, 11:36:10 AM9/26/17
to One7two99, 'One7two99' via qubes-users, qubes...@googlegroups.com, Chris Laprise
I'm not sure if that will help, but I'll take a look. If I can at least get my files into new appvms of the same name, it would do the trick.

Thanks,
Ron

Ron Hunter-Duvar

unread,
Sep 27, 2017, 10:56:06 PM9/27/17
to qubes...@googlegroups.com
Turns out there's an easy way to restore my files and firewall settings.
Here's what I did for each VM:

1. Create a new appvm of the same name and type as the old one (with the
old ones in a different location of course).

2. Start then stop the appvm (to ensure it's properly initialized).

3. Copy the firewall.xml, private.img and volatile.img files from the
old one to the new one.

4. Start the appvm, and everything's back where it should be (other than
menu customizations, and possibly previously installed apps).

I don't know if all these steps are required (particularly #2, and both
img files in #3), but the recipe works, so I'm sticking with it.

The hardest part was actually restoring the old appvm files, given the
deliberate roadblocks to moving files into dom0.

Thanks,
Ron

Reply all
Reply to author
Forward
0 new messages