After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 689211 - Fix 2 name/title issues with unknown ISOs
Fix 2 name/title issues with unknown ISOs
Status: RESOLVED FIXED
Product: gnome-boxes
Classification: Applications
Component: general
unspecified
Other All
: Normal normal
: --
Assigned To: GNOME Boxes maintainer(s)
GNOME Boxes maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2012-11-28 10:51 UTC by Christophe Fergeau
Modified: 2016-03-31 13:57 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Don't try to use filename as libvirt VM name (2.12 KB, patch)
2012-11-28 10:51 UTC, Christophe Fergeau
committed Details | Review
Make sure domain title is in UTF-8 (1.00 KB, patch)
2012-11-28 10:51 UTC, Christophe Fergeau
committed Details | Review

Description Christophe Fergeau 2012-11-28 10:51:21 UTC
One was causing a failure to start VMs, thought about the other one while looking
at that code.
Comment 1 Christophe Fergeau 2012-11-28 10:51:22 UTC
Created attachment 230074 [details] [review]
Don't try to use filename as libvirt VM name

When creating a VM from an ISO that is unknown from libosinfo, we
use the ISO filename as the libvirt VM name. However, this has
a number of issues. First, libvirt documentation says that "The
content of the name element provides a short name for the virtual
machine.  This name should consist only of alpha-numeric characters"
The ISO filename could contain any characters, so is not a really
good fit for a VM name. Moreover, libvirt then uses this name
to create some temporary filenames with a size limit, so if the
ISO name gets too long, starting the VM will not be possible because
this filename is too long:

(gnome-boxes:6917): Boxes-DEBUG: app.vala:812: connect display failed:
Unable to start domain: internal error Monitor path
/home/teuf/.config/libvirt/qemu/lib/rhel-server-6.3-x86_64-dvd.iso?__gda__=xxxxxxxxxx_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx&ext=.iso.monitor
too big for destination
This commit uses 'boxes-unknown' as the base name for the VM instead
of the filename to avoid these issues. From an UI point of view, this
should not change anything as we show the VM title in the UI, not its
name.
Comment 2 Christophe Fergeau 2012-11-28 10:51:26 UTC
Created attachment 230075 [details] [review]
Make sure domain title is in UTF-8

When creating a VM from an unknown media, we use the filename as
the media label, and we then reuse it as the VM title we show in the
UI. Use get_utf8_filename() to make sure it's an UTF-8 string.
Comment 3 Zeeshan Ali 2012-11-28 14:18:45 UTC
Review of attachment 230074 [details] [review]:

ACK
Comment 4 Zeeshan Ali 2012-11-28 14:20:13 UTC
Review of attachment 230075 [details] [review]:

get_utf8_filename -> get_utf8_basename in the log. Otherwise good.
Comment 5 Christophe Fergeau 2012-11-28 14:41:29 UTC
Attachment 230074 [details] pushed as 59ce33b - Don't try to use filename as libvirt VM name
Attachment 230075 [details] pushed as d4c389a - Make sure domain title is in UTF-8