[Linux-cluster] rgmanager vm.sh using virsh under RHEL5.4

Alain RICHARD alain.richard at equation.fr
Tue Nov 3 08:52:23 UTC 2009


Le 2 nov. 2009 à 20:05, Lon Hohberger a écrit :

> On Mon, 2009-11-02 at 16:44 +0100, Alain RICHARD wrote:
>
>> a) use_virsh = 1 per default
>> b) that if your resource have a path attribute, vm.sh automatically
>> revert to use_virsh=0, even if you hard code use_virsh=1 !
>> c) there is no option to indicate the xml file that virsh use to
>> create the vm. It always tries "virsh create name" where name is the
>> vm name.
>
>> The point a) is a little bit silly because if you have a RHEL 5.3
>> cluster that is using xm configuration files, your vm will no longer
>> launch after upgrade because it tries to do a "virsh create name"
>> instead of "xm create name". It would have been probably cleaner to
>> have "use_virsh = 0" per default to keep compatibility.
>
> Libvirt's Xen mode loads config files from /etc/xen.  When you run
> 'virsh start foo' it will look for the config in /etc/xen which  
> defines
> the virtual machine named 'foo'.
>
> So, effectively, either what you said above works for me or I don't
> understand your problem.  Both 'xm' and 'virsh' modes work on Xen
> domains in 5.4 (assuming you don't have a path attribute set):
>
>  http://pastebin.ca/1653460
>
> Did you mix 5.3 libvirt with 5.4 rgmanager or something?  If so, I'd
> simply keep using the vm.sh from rgmanager in 5.3.
>

I am sorry about that one : effectively virsh start xxx is able to  
read xen format config file and convert it on the fly in xml. It is  
not documentented anywhere, but I just tested that virsh start works.

>> The point b) will add compatibility to people that use the path
>> attribute in order to store vm conf files in a place shared by all
>> members of the cluster (gfs2 or nfs directory for example). It would
>> have been clearer to document this feature because it is a little bit
>> magical to see a resource with use_virsh=1 use in fact xm and not
>> virsh !!!
>
> You can't use "path" with virsh.  You are correct, though - it should
> produce an error if someone explicitly sets use_virsh="1" with a path=
> also set.  The two options can not be used together.
>

no currently if the path is defined, use_virsh is silently forced to  
"0" in the script.

> On making "virsh" mode more usable...
>
> virsh supports 2 things:
>  - Loading something by -name- from /etc/libvirt/qemu (or /etc/xen),
> and
>  - Defining transient virtual machines from a -file-
>
> vm.sh when using virsh in 5.4 supports the former, but not the latter.
> Federico Simoncelli wrote a patch to allow the latter for STABLE3:
>
> http://git.fedorahosted.org/git/?p=cluster.git;a=commit;h=ea90559c936792e22576cac7a0bd0a2a50573426
>
>

yes, this is this one I hope to see backported under RHEL5.x.

>> The point c) is very silly, because it restricts the configuration to
>> be loaded from /etc/xen even for kvm !
>
> Correct.  Well, /etc/libvirt/qemu for kvm, but... There's no way to
> define alternate locations for VM config files in rgmanager from RHEL
> 5.4.
>
>
>> Also their is no problem to use a "virsh create /path/to/file.xml"
>> under RHEL 5.4 and I have found out that the cluster 3.0 stable  
>> branch
>> have a new vm.sh file using an xmlpath attribute to solve this
>> problem. Why this version was not back ported to RHEL 5.4 ? Is there
>> any plan to do it ?
>
> No, but it sounds like there should be.
>

Should I open a case under bugzilla to ask for the backport ?

Regards,

-- 
Alain RICHARD <mailto:alain.richard at equation.fr>
EQUATION SA <http://www.equation.fr/>
Tel : +33 477 79 48 00     Fax : +33 477 79 48 01
E-Liance, Opérateur des entreprises et collectivités,
Liaisons Fibre optique, SDSL et ADSL <http://www.e-liance.fr>


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/linux-cluster/attachments/20091103/75444711/attachment.htm>


More information about the Linux-cluster mailing list