From 83b6dc7ea48a4290f758a9f5f151bdc7a852728c Mon Sep 17 00:00:00 2001 From: Cole Robinson Date: Wed, 2 Oct 2013 13:19:40 -0400 Subject: [PATCH] create: Incorporate non-default arch into default guest name --- virtManager/create.py | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/virtManager/create.py b/virtManager/create.py index 31767e01..f7567e51 100644 --- a/virtManager/create.py +++ b/virtManager/create.py @@ -63,6 +63,12 @@ RHEL6_OS_SUPPORT = [ ] +def pretty_arch(_a): + if _a == "armv7l": + return "arm" + return _a + + class vmmCreate(vmmGObjectUI): __gsignals__ = { "action-show-domain": (GObject.SignalFlags.RUN_FIRST, None, [str, str]), @@ -688,11 +694,6 @@ class vmmCreate(vmmGObjectUI): model = arch_list.get_model() model.clear() - def pretty_arch(_a): - if _a == "armv7l": - return "arm" - return _a - default = 0 archs = [] for guest in self.caps.guests: @@ -1557,6 +1558,10 @@ class vmmCreate(vmmGObjectUI): else: basename = variant + if self.guest.os.arch != self.conn.caps.host.arch: + basename += "-%s" % pretty_arch(self.guest.os.arch) + force_num = False + return util.generate_name(basename, self.conn.get_backend().lookupByName, start_num=force_num and 1 or 2, force_num=force_num,