[gnome-boxes] Don't try to use filename as libvirt VM name
- From: Christophe Fergeau <teuf src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-boxes] Don't try to use filename as libvirt VM name
- Date: Wed, 28 Nov 2012 14:41:18 +0000 (UTC)
commit 59ce33b52683b579c52c17079f147641aa241972
Author: Christophe Fergeau <cfergeau redhat com>
Date: Wed Nov 28 11:28:51 2012 +0100
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.
https://bugzilla.gnome.org/show_bug.cgi?id=689211
src/vm-creator.vala | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/src/vm-creator.vala b/src/vm-creator.vala
index e876d5a..8ea1111 100644
--- a/src/vm-creator.vala
+++ b/src/vm-creator.vala
@@ -265,7 +265,7 @@ private class Boxes.VMCreator {
private async void create_domain_name_and_title_from_media (out string name, out string title) throws GLib.Error {
var base_title = install_media.label;
title = base_title;
- var base_name = (install_media.os != null) ? install_media.os.short_id : base_title;
+ var base_name = (install_media.os != null) ? install_media.os.short_id : "boxes-unknown";
name = base_name;
var pool = yield get_storage_pool ();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]