Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign upQubes storage pools of type LVM issues #3438
Comments
andrewdavidwong
added
bug
C: core
C: installer
labels
Jan 2, 2018
andrewdavidwong
added this to the Release 4.0 milestone
Jan 2, 2018
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
zander
Jan 7, 2018
@andrewdavidwong can you please remove the 'installer' tag? This is about the qvm-* commands only. Thanks!
zander
commented
Jan 7, 2018
|
@andrewdavidwong can you please remove the 'installer' tag? This is about the qvm-* commands only. Thanks! |
andrewdavidwong
removed
the
C: installer
label
Jan 7, 2018
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
marmarek
Jan 7, 2018
Member
Requesting qvm-pool -i POOL lists the size of zero when just created. It is a number much larger than the physical size after some usage. Similarly, the 'usage' shows a much higher number than it should.
I can't reproduce the latter, it shows me the right number, the same as "LSize" column in lvs output. Anything special about your pool?
I can't reproduce the latter, it shows me the right number, the same as "LSize" column in |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
marmarek
Jan 7, 2018
Member
Storing a VM (template) on a LVM based pool causes qvm-start to show a bug in timing.
Calling qvm-start normally will not return until the VM fully started and is operational. This is not the case on a lvm based pool. The qvm-start command returns immediately and as a side-effect the qemu bios window is shown.
This is an important functional issue as this means disposable VMs can't be stored on such a pool due to the timing issue causing them to exit before really having been started.
This isn't related to LVM. The template has a set of "features" (see qvm-features). If qrexec is not set there, qvm-start does not wait for qrexec startup. Similary, if gui is not set there, gui-agent is assumed to be missing and emulated VGA is used.
Those features should be set during template installation, but if weren't, you can set them manually.
This isn't related to LVM. The template has a set of "features" (see |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
marmarek
Jan 7, 2018
Member
Qubes creates a snapshot at every start which turns into a backup partition when it exits. The problem is that qubes never garbage collects old backups. They continue getting created and sudo lvs gets quite lengthy after some time.
What is revisions_to_keep value in that pool?
What is |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
zander
Jan 7, 2018
Requesting qvm-pool -i POOL lists the size of zero when just created. It is a number much larger
than the physical size after some usage. Similarly, the 'usage' shows a much higher number than it
should.
I can't reproduce the latter, it shows me the right number, the same as "LSize" column in lvs output.
You are right, this is due to the usage of GiB in lvs where I expected GB. The only issue really here seems to be that the values at the beginning were zero. (I know that for a fact, I copy pasted that in an email).
Maybe just an issue of not calculating stuff until a VM actually uses the pool.
I'll update the issue above to avoid confusing people coming in later.
zander
commented
Jan 7, 2018
You are right, this is due to the usage of GiB in lvs where I expected GB. The only issue really here seems to be that the values at the beginning were zero. (I know that for a fact, I copy pasted that in an email). I'll update the issue above to avoid confusing people coming in later. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
zander
Jan 7, 2018
What is revisions_to_keep value in that pool?
Confusing :)
qvm-pool doesn't list it. In the <pools> section of qubes.xml there is no mention either.
On each individual domain/volume that uses this pool, the xml-attribute is set to 1 (except for volatile, which is zero, for obvious reasons).
Oh, and I set it to two initially.
zander
commented
Jan 7, 2018
•
Confusing :) qvm-pool doesn't list it. In the On each individual domain/volume that uses this pool, the xml-attribute is set to 1 (except for volatile, which is zero, for obvious reasons). Oh, and I set it to two initially. |
zander commentedJan 1, 2018
•
edited
Edited 2 times
-
zander
edited Jan 7, 2018 (most recent)
-
zander
edited Jan 7, 2018
This is a list of issues found in usage of pools in Qubes4RC3, as per private email I register them here to allow everyone to keep track of these;
This is the purpose of VmCreationManager, but that covers only vm creation...
Per design, creating a pool creates a corresponding dir under /usr/lib/qubes/appvms
I’ve had two issues with that.
template is not on the same pool. AND it will leave the directory behind.
I expect failures to not leave a dir behind. Either check first or clean up on fail.
Which naturally leads to;
creating a new VM will cause an internal exception if the dir in /usr/lib/qubes
already exists. I expect this to end up with a user-visible error from the API.
Creating a qvm pool with argument revisions_to_keep=0 will cause the qvm-
create later to exit based on it not being able to make a backup or
something.
Error detection should happen in the qvm-pool command.
Calling qvm-create with the root-pool being different from the pool the template is in gives you;
app: Error creating VM: Can't clone a snapshot volume root to pool qubes_ssdI think what it meant to say is that the root has to be in the same pool as
the template it is based on.
This is probably just a case of improving the error message.
Requesting
qvm-pool -i POOLlists thesizeof zero when just created.Qubes creates a snapshot at every start which turns into a backup partition when it exits. The problem is that qubes never garbage collects old backups. They continue getting created and
sudo lvsgets quite lengthy after some time.