Cloning AppVm to Secondary Drive fail on R4.0

38 views
Skip to first unread message

yon...@gmail.com

unread,
Apr 1, 2018, 12:46:23 AM4/1/18
to qubes-users
I'm trying to clone an existing VM to a pool on a secondary drive.

I followed the instructions on https://www.qubes-os.org/doc/secondary-storage/

But when I run the `qvm-clone` I get the following error -
$ qvm-clone -v -P storage extra storage
2018-04-01 00:20:36,421 [MainProcess app.clone_vm:390] storage: Cloning private volume
Traceback (most recent call last):
File "/usr/bin/qvm-clone", line 5, in <module>
sys.exit(main())
File "/usr/lib/python3.5/site-packages/qubesadmin/tools/qvm_clone.py", line 73, in main
app.clone_vm(src_vm, new_name, new_cls=args.cls, pool=pool, pools=pools)
File "/usr/lib/python3.5/site-packages/qubesadmin/app.py", line 391, in clone_vm
dst_volume.clone(src_volume)
File "/usr/lib/python3.5/site-packages/qubesadmin/storage.py", line 229, in clone
self._qubesd_call('CloneTo', payload=token)
File "/usr/lib/python3.5/site-packages/qubesadmin/storage.py", line 76, in _qubesd_call
payload_stream=payload_stream)
File "/usr/lib/python3.5/site-packages/qubesadmin/app.py", line 483, in qubesd_call
return self._parse_qubesd_response(return_data)
File "/usr/lib/python3.5/site-packages/qubesadmin/base.py", line 102, in _parse_qubesd_response
raise exc_class(format_string, *args)
qubesadmin.exc.StoragePoolException: b' Please use a single volume group name ("qubes_root0" or "qubes_-storage0").\n Run `lvcreate --help\' for more information.\n'


Running `qvm-create` on the secondary pool seem to work with no issues

awokd

unread,
Apr 1, 2018, 3:21:39 AM4/1/18
to yon...@gmail.com, qubes-users
On Sun, April 1, 2018 4:46 am, yon...@gmail.com wrote:
> I'm trying to clone an existing VM to a pool on a secondary drive.
>
>
> I followed the instructions on
> https://www.qubes-os.org/doc/secondary-storage/

This line?
qvm-clone -P pool_name old_name new_name

> But when I run the `qvm-clone` I get the following error -
> $ qvm-clone -v -P storage extra storage

> raise exc_class(format_string, *args) qubesadmin.exc.StoragePoolException:
> b' Please use a single volume group name ("qubes_root0" or
> "qubes_-storage0").\n Run `lvcreate --help\' for more information.\n'
>
>
>
> Running `qvm-create` on the secondary pool seem to work with no issues

You're right, the documentation isn't very clear there on what those old
and new names are for. I think you might be specifying multiple pool
names.

Can you try these steps instead and see if it works?

First, get a list of your pool names with `qvm-pool`. Then, clone your
existing VM to the target pool with:

qvm-clone -P <targetpoolname> <sourceVMname> <cloneVMname>


ıuoʎ

unread,
Apr 2, 2018, 2:53:02 AM4/2/18
to aw...@danwin1210.me, qubes-users
Sorry I guess I wasn't very clear from the command since I only going to run a single VM on the pool I thought naming it the same
The following command didn't work as well -
qvm-clone -P storage extra extra-clone

You can see from the error message that lvcreate complains the command is called with both volum groups (the original where extra vm sits on (qubes_root0) and the one where the new vm should be created on (qubes_-storage0) I tried running it in verbose mode to get the actual command that is being called but it is never being logged.

As a workaround I used qvm-perf to change the default pool to storage and than restored the VM from backup.

I guess this is a bug in qvm-clone so I'll open a github issue

Reply all
Reply to author
Forward
0 new messages