public inbox for cluster-cvs@sourceware.org help / color / mirror / Atom feed
From: Lon Hohberger <lon@fedoraproject.org> To: cluster-cvs-relay@redhat.com Subject: resource-agents: master - rgmanager: Allow vm.sh use of libvirt XML file Date: Mon, 22 Jun 2009 17:59:00 -0000 [thread overview] Message-ID: <20090622175837.D38D812020D@lists.fedorahosted.org> (raw) Gitweb: http://git.fedorahosted.org/git/resource-agents.git?p=resource-agents.git;a=commitdiff;h=70f5c5dcda594aa29ad07cfe23bd3342e1e7c5c5 Commit: 70f5c5dcda594aa29ad07cfe23bd3342e1e7c5c5 Parent: 17bdcb693d3908e44ab8e9d9a66a2c436a4870b2 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 13:57:56 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
reply other threads:[~2009-06-22 17:59 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20090622175837.D38D812020D@lists.fedorahosted.org \ --to=lon@fedoraproject.org \ --cc=cluster-cvs-relay@redhat.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).