qvm-trim-template fails on long-named VM's

35 views
Skip to first unread message

Jeremy Rand

unread,
Dec 6, 2015, 11:53:31 PM12/6/15
to qubes-users
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

I have a Fedora 21 TemplateVM that I'm trying to upgrade to Fedora 23.
This TemplateVM has a fairly long name, though one that is completely
allowed by the Qubes VM Manager GUI. The clone and distro-sync steps
went just fine. Upon trying to trim the template, I got this:

$ qvm-trim-template fedora-23-openjdk-ant-git
Disk usage before:
8488996 /var/lib/qubes/vm-templates/fedora-23-openjdk-ant-git/root.img
Creating temporary VM...
Traceback (most recent call last):
File "/usr/bin/qvm-trim-template", line 160, in <module>
main()
File "/usr/bin/qvm-trim-template", line 98, in main
netvm=None,
File "/usr/lib64/python2.7/site-packages/qubes/qubes.py", line 346,
in add_new_vm
vm = vm_cls(qid=qid, collection=self, **kwargs)
File
"/usr/lib64/python2.7/site-packages/qubes/modules/000QubesVm.py", line
314, in __init__
raise QubesException(msg)
qubes.qubes.QubesException: 'fedora-23-openjdk-ant-git-fstrim' is
invalid VM name (invalid characters, over 31 chars long, or one of
'none', 'true', 'false')

I was able to rename the TemplateVM to something shorter using Qubes
VM Manager, at which point the qvm-trim-template command worked fine.
I was then able to rename it back to the longer name.

While the workaround is obvious to people who are reasonably skilled,
this is still a usability issue, given that some users won't
understand what's going on, and it's inconvenient even for the users
who do see how to fix it.

Any chance qvm-trim-template could be patched so that the temporary VM
has a name which is no longer than the argument VM?

Cheers,
- -Jeremy Rand
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQIcBAEBCAAGBQJWZRClAAoJEAHN/EbZ1y06jzIQAMtRBkuhmxvHXS2XLpsr6Inq
/r0RxlmU1q3CGFm8rOZfp3RjdLrulG2c9z8mIAHJCMDQWubi9fuSYhM1ltFyjr66
AbnOBEduSwXgrFvpz2BgYaloLteqY9ILL9bLkZmidJWpic/IlCSHXplv0axheY+y
ACASO2Z4ewR/oZqvPn1tDD+EXw7Efih7VFMR0huMUK5b46R63EdFW6VimnbYQh0G
I1XozGLVYU5TH2YJajRWwYj2z8axdP1Fs7fFk4pOkfagM9N+8DKZYDf+IRnLzI5N
gZOy2yVzDgAU8eJdU1V3lTPYL5ShZwn9ot7QHRt1a93hbbxGSlIXqaZizFlAuaer
zR6zpORKi0NOrEVEFQ7pLRF3hfNekg+Hf3Bt0jWZj6oQn6ZZ/gi9Ubmh5YW9cuo8
vLl9D18ewSKOvLT/qxrA8LNutpE1DvZeWWAe+UsWMHAtANPt1q93BKtQEpNTqXAm
dMSrd4dMeoquc9qVljD8JZqQ50qoog8ZOuGYzSzuou7j+NXA/VM3C4jnAQxPqRos
Snd6F3pt1vE61qC6keVSo6d8aqBAv/lybPOZUEFw10qZfu8EaO7kGrdTsVQ2G2UH
Dk4KmJfKFKd+qMNs2FBYgkzNOrsM31gGlOUSJszaRM1a/YchGZKeuS1ScnMa7Yso
5SHmABKLqOoiwbnnqmE/
=Avmq
-----END PGP SIGNATURE-----

Tim W

unread,
Dec 7, 2015, 12:43:00 AM12/7/15
to qubes-users

I have seen this 31 char limit affecting old Mac's.  But where is the limit coming from here? 

Marek Marczykowski-Górecki

unread,
Jan 20, 2016, 8:45:11 PM1/20/16
to Jeremy Rand, qubes-users
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Tracking it here:
https://github.com/QubesOS/qubes-issues/issues/1655

- --
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

iQEcBAEBCAAGBQJWoDgeAAoJENuP0xzK19csbpUH/0JQ9CojHn5D3guzpR8RxOAC
R3uxQ2nYIdG7uGkuj9UaQ8OT498ZwR+fYHi3iLMrZEkVoohDErFtfqRkpeszrPqd
/Iq8DBGNHQ6ALgkj4jF60M59rVY1UbEwnB8M81s6CAUNn1XZF5qUQGiaam1SRF/Q
5c2X77bV/rGylPlLEv+E0AkvxFeHS9bJwpOK93wAsuFVtfdPcq/5oaN/pEQUaZnF
Rh02m3ynPpJU2SbWUM+iiRO9g3CyxyM4oohFIY0IJGa/+HzrS97zZxADSMyBexEj
kNEqxyP4haA6zt0Ao7uHYj/DhEfzJ1kXk2kerlSpNGqhhyrEqBR7TTG79n/SEZw=
=mwKT
-----END PGP SIGNATURE-----
Reply all
Reply to author
Forward
0 new messages