public inbox for cluster-cvs@sourceware.org
help / color / mirror / Atom feed
* cluster: STABLE3 - rgmanager: Allow vm.sh use of libvirt XML file
@ 2009-06-22 13:34 Lon Hohberger
  0 siblings, 0 replies; only message in thread
From: Lon Hohberger @ 2009-06-22 13:34 UTC (permalink / raw)
  To: cluster-cvs-relay

Gitweb:        http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=ea90559c936792e22576cac7a0bd0a2a50573426
Commit:        ea90559c936792e22576cac7a0bd0a2a50573426
Parent:        f4f9663512d77e5388b6a98b454a8d5a369a30c7
Author:        Federico Simoncelli <federico.simoncelli@gmail.com>
AuthorDate:    Mon Jun 22 09:22:43 2009 -0400
Committer:     Lon Hohberger <lhh@redhat.com>
CommitterDate: Mon Jun 22 09:32:04 2009 -0400

rgmanager: Allow vm.sh use of libvirt XML file

This allows use of libvirt XML files to create transient
virtual machines instead of statically defined virtual
machines.  This allows putting libvirt XML files on, for
example, cluster file systems.

Signed-off-by: Federico Simoncelli <federico.simoncelli@gmail.com>
Signed-off-by: Lon Hohberger <lhh@redhat.com>
---
 rgmanager/src/resources/vm.sh |   17 ++++++++++++++++-
 1 files changed, 16 insertions(+), 1 deletions(-)

diff --git a/rgmanager/src/resources/vm.sh b/rgmanager/src/resources/vm.sh
index 8285cd6..f0e474d 100644
--- a/rgmanager/src/resources/vm.sh
+++ b/rgmanager/src/resources/vm.sh
@@ -131,6 +131,15 @@ meta_data()
             <content type="integer" default="1"/>
         </parameter>
 
+	<parameter name="xmlfile">
+	    <longdesc lang="en">
+	    	Use xmlfile to create the vm (libvirt)
+	    </longdesc>
+	    <shortdesc lang="en">
+	    </shortdesc>
+            <content type="string"/>
+	</parameter>
+
 	<parameter name="migrate">
 	    <longdesc lang="en">
 	    	Migration type live or pause, default = live.
@@ -338,7 +347,13 @@ do_virsh_start()
 		return 1
 	fi
 
-	cmdline="virsh $(build_virsh_cmdline start)"
+	if [ -n "$OCF_RESKEY_xmlfile" -a -f "$OCF_RESKEY_xmlfile" ]; then
+		# TODO: try to use build_virsh_cmdline for the hypervisor_uri
+		cmdline="virsh create $OCF_RESKEY_xmlfile"
+	else
+		cmdline="virsh $(build_virsh_cmdline start)"
+	fi
+
 	ocf_log debug "$cmdline"
 
 	$cmdline


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2009-06-22 13:34 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-06-22 13:34 cluster: STABLE3 - rgmanager: Allow vm.sh use of libvirt XML file Lon Hohberger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).