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

[libvirt] Re: OpenVZ : The restriction of domain name should be addressed

2009/7/24 Daniel P. Berrange <berrange redhat com>

We should make use of this --name parameter then - I guess it didn't
exist when we first wrote the driver. It is useful to users to have
separate ID vs Name parameters - and in fact the current reusing of
'ID' for the name, causes a little confusion in virsh's lookup routines because it can't tell whether the parameter its given is a name or an
ID, since they are identical.

There is still a question of how to specify both a name and CTID in XML
By default, CTID can be obtained as openvzGimmeFirstUnusedCTID(), but
I think that there exists a number of persons interested in giving CTIDs

Well, can <domain id=''> be used for CTID remaining <name> for
alphabetical domain name?

I worte a small patch and tried with following XML setting.

### Patch ###
--- a/src/openvz_driver.c
+++ b/src/openvz_driver.c
@@ -130,9 +130,6 @@
-    ADD_ARG_LIT(vmdef->id);
-    ADD_ARG_LIT("--name");

### XML ###
<domain id='100'>

I found the type of id was identified as number( obj->type == XPATH_NUMBER ) in virXPathLongBase,
but it is clearly string before converted.
I think correct path is to go in the first if context( obj->type == XPATH_STRING ) and run strtol.

Then I tried with following XML.

### XML ###
<domain id=100>

I got following error.

AttValue: " or ' expected

I'm not sure from which function should return this result.

Maybe this is the first step to go forward.
I am doubting openvz*LookupBy* functions be also modified, right?

Yuji Nishida
nishidy nict go jp

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