GNOME Bugzilla – Bug 689211
Fix 2 name/title issues with unknown ISOs
Last modified: 2016-03-31 13:57:48 UTC
One was causing a failure to start VMs, thought about the other one while looking at that code.
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.
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.
Review of attachment 230074 [details] [review]: ACK
Review of attachment 230075 [details] [review]: get_utf8_filename -> get_utf8_basename in the log. Otherwise good.
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