How to move/migrate a VM with a Fedora-23 custom template from 3.1 to 3.2?

42 views
Skip to first unread message

Leeteqxv

unread,
Dec 11, 2016, 12:10:21 PM12/11/16
to qubes-users
I have a previous test installation of Qubes 3.1 on a separate HDD (now
external USB), which cointains a customised (cloned+extra sw installs)
Fedora-23 template used with a dedicated AppVM.

Now I have Qubes 3.2 installed on a new HDD on that machine and before
we move on to Fedora-24 (when F23 "expires" later this month), I would
like to "import" that custom template AND the related VM into the new
(fresh) 3.2 install.

I cannot be sure if I have all the necessary insights into Qubes to
assume I can just copy / paste some folders/files into the new
installation, so I would like to know exactly which folders/files are
involved, and if there are any special order/steps to take, and whatever
else is needed for this. I also think that the resulting How-To list
should be fitted into the documentation somewhere.

(PS. I have not yet upgraded the new 3.2 system to Fedora-24, so that
part is not the question here. I will do the upgrade to F24 after the
migration of the template/VM along with the rest of the system. Hence,
my question here is regarding a "migrate" between two F23-based systems,
from Q3.1 to Q3.2)

I am aware of the following docs:

https://www.qubes-os.org/doc/template/fedora/upgrade-23-to-24/
https://www.qubes-os.org/doc/upgrade-to-r3.2/

Can someone provide an ordered list of steps for this?

Thanks.

Andrew David Wong

unread,
Dec 11, 2016, 3:48:34 PM12/11/16
to Leeteqxv, qubes-users
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512
If I understand you correctly, it sounds like the built-in Qubes
backup tool (qvm-backup from the command-line, also available from the
Qubes Manager GUI) is the right tool for the job:

https://www.qubes-os.org/doc/backup-restore/

Especially this part:

https://www.qubes-os.org/doc/backup-restore/#migrating-between-two-physical-machines

- --
Andrew David Wong (Axon)
Community Manager, Qubes OS
https://www.qubes-os.org
-----BEGIN PGP SIGNATURE-----

iQIcBAEBCgAGBQJYTbuYAAoJENtN07w5UDAwZdcP/itDdBnMY1EDQiFBp8RjpvLr
SgiQtvG7IU0seIZuyTbu0OLiDpMUUNFfYhHqOaYfvMKUFLGuX0UBPoVMWZw+OtzQ
RE144c2yKOZFjdj72LY7koy25aXjXT9jlPr3SyxoBd6+au2Q8yZcQqVZIFmWXy3O
+E3ySp5aBVJu5wKblDtFtE0H4nwdPBFMIJjjFB1RfYusUiuo1vPYwM3Whec0MYcn
4ll0o645V4S0BGCJUYQSOG05DRFPx1eokKKLD0i11gIv1FrJ6At/2JPf+RTOjBxw
LAL+mogyyXXCD6IdD2IiL7RNuNTzkQCwCT5VVTBztESmryDQ5TVcD9W2x+16BzLu
vHMHC7uGkJmcdNRNq8ZAc8OjBp51vRnhoQjseLVIHPxtrxEqMLUlal6IjxNKgt+A
edMC++p1HKVW0lqexl8+hTIcsGkVQ7BjVP6LNSikfm16AsJ7sSJNfKEhWbNFu0qh
ObxOSWsM91e0+VZPnjY2o/llj5Ewss629JB8qxW6N8htuqN/aI5+0LJilqvVS9Bg
MKdNdfnEvG2ZYZLi9FAM3x9Ai8FYzRIDf1LC83eP3IF7Es+8AsWZpWZE1ueDtkva
yf0m/QaL9CMG81DvddFc6Orp40dQwZ4Z20vnY7ELTfrDnPro1abK/ADLKp3t/csN
nVEnrBFTgCUb0lXlMZk9
=cECP
-----END PGP SIGNATURE-----

Leeteqxv

unread,
Dec 12, 2016, 2:04:06 PM12/12/16
to Andrew David Wong, qubes-users
Thanks for the quick response.
That method would work while still having the old system available/bootable.
But in my case, I have replaced the old HDD with a new one (on a
laptop), and need to access the old installation by simply adding that
physical disk as a USB disk into the new system.

So I am really looking for which files/folders I need to copy from the
old system into the new installation, or, alternatively, if I can
"migrate" or point the new system to create a new Template and a new
AppVM by pointing it to a folder on the old disk to use as a template
for the creation.
How can this be done?

Marek Marczykowski-Górecki

unread,
Dec 12, 2016, 4:38:53 PM12/12/16
to Leeteqxv, Andrew David Wong, qubes-users
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
> Thanks for the quick response.
> That method would work while still having the old system available/bootable.
> But in my case, I have replaced the old HDD with a new one (on a laptop),
> and need to access the old installation by simply adding that physical disk
> as a USB disk into the new system.
>
> So I am really looking for which files/folders I need to copy from the old
> system into the new installation, or, alternatively, if I can "migrate" or
> point the new system to create a new Template and a new AppVM by pointing it
> to a folder on the old disk to use as a template for the creation.
> How can this be done?

You can copy appropriate directories from /var/lib/qubes/ related to
that VMs into your new installation (make sure to place them in exactly
the same location: appvms/ or vm-templates/), then use qvm-add-template
(for templates) and qvm-add-appvm (for appvms) to register them in
Qubes. Do not override any files, if VM with the same name already
exists, rename or remove it first.
After this operation, proceed to template upgrade procedure you've
already found.

- --
Best Regards,
Marek Marczykowski-Górecki
Invisible Things Lab
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQEcBAEBCAAGBQJYTxjpAAoJENuP0xzK19csNggH/3ooEggwxY++D9MiRdarwOPh
/POUDDdC6Mqp4bWPWnd86Mmkwm4jdOR2vFsD13D5+KTJ7ew9SCZ4vNU3S3+sxdnz
GIriztYOq4gUEsZojV9OkeziTAqWgVPFnCfzfONN6METpdh0ywz0VgZp29nldF11
8Y75+hmdJn6ndZk2z58BOM7VYgIeWG1FAEB4pbwqyN8lqUpUNcRtSmm1YzdF+0fK
rrRQ98pjJ4/7ZBmRl9lqE48th2uZDLnI9DJUiYjezkNYVbktexe2Ro7ErBsvmIo+
8CHvv7h4DsJYXJd3bGKSFN8US50PBNoN+qEsTrZ+eS+deQitOmmr4Xwal8zYoaE=
=anX/
-----END PGP SIGNATURE-----

Andrew David Wong

unread,
Dec 13, 2016, 2:07:32 AM12/13/16
to Marek Marczykowski-Górecki, Leeteqxv, qubes-users
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

On 2016-12-12 13:38, Marek Marczykowski-Górecki wrote:
> On Mon, Dec 12, 2016 at 08:04:00PM +0100, Leeteqxv wrote:
>> So I am really looking for which files/folders I need to copy
>> from the old system into the new installation, or, alternatively,
>> if I can "migrate" or point the new system to create a new
>> Template and a new AppVM by pointing it to a folder on the old
>> disk to use as a template for the creation. How can this be
>> done?
>
> You can copy appropriate directories from /var/lib/qubes/ related
> to that VMs into your new installation (make sure to place them in
> exactly the same location: appvms/ or vm-templates/), then use
> qvm-add-template (for templates) and qvm-add-appvm (for appvms) to
> register them in Qubes. Do not override any files, if VM with the
> same name already exists, rename or remove it first. After this
> operation, proceed to template upgrade procedure you've already
> found.
>

Thanks; I didn't know about these tools. In the case of AppVMs, how is
this different from creating a new AppVM with the same name as the old
one, then replacing the new private.img with the old one? Or do both
methods achieve the same effect?

- --
Andrew David Wong (Axon)
Community Manager, Qubes OS
https://www.qubes-os.org
-----BEGIN PGP SIGNATURE-----

iQIcBAEBCgAGBQJYT54lAAoJENtN07w5UDAwV+gQAKH8/g9uDe35/OGYhSOO60LJ
1PZZjNmUwHzx0rzOCWdsWWDQuJJHimgepbNOtNYDRDuwbyaukyp4nRvOoRKhcZQ9
3rMWAZYJ5X781N+vzOqv4rSqlq+4UAnbarGdg7fcBJE8A2R4nK3TVGgXgiUiKB00
OrBpvOqJjSrp1gVgIiLrVuPwlgmsQyKaVkL7HUoRhlUaG3CG+QUJJM4hDhtB5Htn
WbwXC8I4fJumQ9ysOYLDwWPxAldsJ8AZhXbPWlFAqr8tc4Dp8U2gqCQ5WC1Ltj6a
o1tiXXYuiEiDfHjsutP+e0KG6bEaxO6GoXhro9XmY3J+reIwTV72um5+xEgVbfnX
DD4Ng1UTKoBiwkmzwTGMj0MunKwg6W2IAo8pgNWb0GTpMrWXAd5ANjzIbq40SrCk
NPWggvsw7L4VaxQhVVNHjURi1U1ZGHl16e9/jrONM9AxFLMS9lIQvd9kSXAaVvci
uUNgAH+Jwc57Mbw4glvWk0SOpyaMzYW4ADXIZINWHOUNrClNKJxamuFYc250LpoB
hGzwAEDhHCTY7hXnlGdE01Fw1+KjnJtvUzYvMZN/NKIkjsBqnjTaCP7GCXI3chZc
DSV/ddSs9RkjEF4+pZA2gLWp/vxGhQMr2ZUw78ZBu2mkVbM0AD0fMwCkXe/m+Tmj
P6SfrNg0wr7ot8Vn23yn
=xhfr
-----END PGP SIGNATURE-----

Marek Marczykowski-Górecki

unread,
Dec 13, 2016, 11:28:01 AM12/13/16
to Andrew David Wong, Leeteqxv, qubes-users
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

On Mon, Dec 12, 2016 at 11:07:23PM -0800, Andrew David Wong wrote:
> On 2016-12-12 13:38, Marek Marczykowski-Górecki wrote:
> > On Mon, Dec 12, 2016 at 08:04:00PM +0100, Leeteqxv wrote:
> >> So I am really looking for which files/folders I need to copy
> >> from the old system into the new installation, or, alternatively,
> >> if I can "migrate" or point the new system to create a new
> >> Template and a new AppVM by pointing it to a folder on the old
> >> disk to use as a template for the creation. How can this be
> >> done?
> >
> > You can copy appropriate directories from /var/lib/qubes/ related
> > to that VMs into your new installation (make sure to place them in
> > exactly the same location: appvms/ or vm-templates/), then use
> > qvm-add-template (for templates) and qvm-add-appvm (for appvms) to
> > register them in Qubes. Do not override any files, if VM with the
> > same name already exists, rename or remove it first. After this
> > operation, proceed to template upgrade procedure you've already
> > found.
> >
>
> Thanks; I didn't know about these tools. In the case of AppVMs, how is
> this different from creating a new AppVM with the same name as the old
> one, then replacing the new private.img with the old one? Or do both
> methods achieve the same effect?

It's mostly the same. Most of the files (besides private.img) are
generated anyway.

- --
Best Regards,
Marek Marczykowski-Górecki
Invisible Things Lab
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQEcBAEBCAAGBQJYUCGLAAoJENuP0xzK19cs2b8H/3HjU7YAYsDptQoyGSZtGIgr
9VlLq+ROPsketKu5g8Zgd5B5lkTvME/IxY+IRVWFSf98q2mde+ygRSbRYHOAbciu
XkO39/PonoPKFJkSCD8KduBIGrxGdMzJC1S3d2+DNKQ/R80BdH4fowpGK7Q7Y677
ETjuj3qm/Om9II2dCneaPQYqGR2flAVugUKP6ReRGvw1Y/XxGSNowpJ/0wyVddxY
G6QDLodZauhZaPLJ7jFpAF4F2AwR5Of452S/WK/OQGfEbCMSEImZMUewrMcBEFGx
k3HaAPMMxALxcMqexw6lmMBXMkjS/mXZJVRGIXNvNbFXXREeQINKit19jM6SoN8=
=efwT
-----END PGP SIGNATURE-----
Reply all
Reply to author
Forward
0 new messages