virsh: Allow starting domains by UUID

This commit is contained in:
Jiri Denemark 2011-03-11 12:07:12 +01:00
parent abfa97a225
commit 976eb124e7
2 changed files with 3 additions and 2 deletions

View File

@ -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

View File

@ -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) {