[PATCH] virsh: Allow starting domains by UUID

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



---
 tools/libvirt-guests.init.sh |    2 +-
 tools/virsh.c                |    3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/tools/libvirt-guests.init.sh b/tools/libvirt-guests.init.sh
index 8823d06..e37e55f 100644
--- a/tools/libvirt-guests.init.sh
+++ b/tools/libvirt-guests.init.sh
@@ -164,7 +164,7 @@ start() {
                 if $guest_running; then
                     gettext "already active"; echo
                 else
-                    retval run_virsh $uri start "$name" >/dev/null && \
+                    retval run_virsh $uri start "$guest" >/dev/null && \
                     gettext "done"; echo
                 fi
             fi
diff --git a/tools/virsh.c b/tools/virsh.c
index a5e9c4f..b42aac4 100644
--- a/tools/virsh.c
+++ b/tools/virsh.c
@@ -1402,7 +1402,8 @@ cmdStart(vshControl *ctl, const vshCmd *cmd)
     if (!vshConnectionUsability(ctl, ctl->conn))
         return FALSE;
 
-    if (!(dom = vshCommandOptDomainBy(ctl, cmd, NULL, VSH_BYNAME)))
+    if (!(dom = vshCommandOptDomainBy(ctl, cmd, NULL,
+                                      VSH_BYNAME | VSH_BYUUID)))
         return FALSE;
 
     if (virDomainGetID(dom) != (unsigned int)-1) {
-- 
1.7.4.1

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]