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

2009-09-15 Thread Yuji NISHIDA

Hi Daniel,

I didn't realize that I even did not follow the manner of XML.
I have worked with this problem and got a small patch to handle ID  
in OpenVZ functionality.
I found it is working well with the XML script included ID in domain  
tag.


I am concerned that I had to edit the common file domain_conf.c.
I still believe I should keep it away from this problem for  
compatibility with the others.

How do you think can I avoid this?


diff --git a/src/domain_conf.c b/src/domain_conf.c
index 5ae0775..f74961f 100644
--- a/src/domain_conf.c
+++ b/src/domain_conf.c
@@ -2492,7 +2492,7 @@ static virDomainDefPtr virDomainDefParseXML 
(virConnectPtr conn,

 return NULL;
 }

-if (!(flags  VIR_DOMAIN_XML_INACTIVE))
+// if (!(flags  VIR_DOMAIN_XML_INACTIVE))
 if((virXPathLong(conn, string(./@id), ctxt, id))  0)
 id = -1;
 def-id = (int)id;
diff --git a/src/openvz_conf.c b/src/openvz_conf.c
index be94b9e..d23f173 100644
--- a/src/openvz_conf.c
+++ b/src/openvz_conf.c
@@ -425,17 +425,18 @@ int openvzLoadDomains(struct openvz_driver  
*driver) {

 char uuidstr[VIR_UUID_STRING_BUFLEN];
 virDomainObjPtr dom = NULL;
 char temp[50];
+char name[64];

 if (openvzAssignUUIDs()  0)
 return -1;

-if ((fp = popen(VZLIST  -a -ovpsid,status -H 2/dev/null, r))  
== NULL) {
+if ((fp = popen(VZLIST  -a -ovpsid,name,status -H 2/dev/null,  
r)) == NULL) {
 openvzError(NULL, VIR_ERR_INTERNAL_ERROR, %s, _(popen  
failed));

 return -1;
 }

 while(!feof(fp)) {
-if (fscanf(fp, %d %s\n, veid, status) != 2) {
+if (fscanf(fp, %d %s\n, veid, name, status) != 3) {
 if (feof(fp))
 break;

@@ -465,7 +466,7 @@ int openvzLoadDomains(struct openvz_driver  
*driver) {

 dom-pid = veid;
 dom-def-id = dom-state == VIR_DOMAIN_SHUTOFF ? -1 : veid;

-if (virAsprintf(dom-def-name, %i, veid)  0)
+if (virAsprintf(dom-def-name, %s, name)  0)
 goto no_memory;

 openvzGetVPSUUID(veid, uuidstr, sizeof(uuidstr));
diff --git a/src/openvz_driver.c b/src/openvz_driver.c
index a8c24ba..c0c1e0f 100644
--- a/src/openvz_driver.c
+++ b/src/openvz_driver.c
@@ -101,6 +101,7 @@ static int openvzDomainDefineCmd(virConnectPtr conn,
  virDomainDefPtr vmdef)
 {
 int narg;
+char str_id[10];

 for (narg = 0; narg  maxarg; narg++)
 args[narg] = NULL;
@@ -130,6 +131,11 @@ static int openvzDomainDefineCmd(virConnectPtr  
conn,

 ADD_ARG_LIT(VZCTL);
 ADD_ARG_LIT(--quiet);
 ADD_ARG_LIT(create);
+
+sprintf( str_id, %d, vmdef-id );
+ADD_ARG_LIT(str_id);
+
+ADD_ARG_LIT(--name);
 ADD_ARG_LIT(vmdef-name);

 if (vmdef-nfss == 1 
@@ -1229,7 +1235,11 @@ static int openvzListDefinedDomains 
(virConnectPtr conn,

 char vpsname[32];
 char buf[32];
 char *endptr;
-const char *cmd[] = {VZLIST, -ovpsid, -H, -S, NULL};
+const char *cmd[] = {VZLIST, -oname, -H, -S, NULL};
+int cnt = 0;
+char name_buf[32];
+
+

 /* the -S options lists only stopped domains */
 ret = virExec(conn, cmd, NULL, NULL,
@@ -1241,14 +1251,14 @@ static int openvzListDefinedDomains 
(virConnectPtr conn,

 }

 while(got  nnames){
-ret = openvz_readline(outfd, buf, 32);
+ret = openvz_readline(outfd, buf, 64);
 if(!ret) break;
-if (virStrToLong_i(buf, endptr, 10, veid)  0) {
-openvzError(conn, VIR_ERR_INTERNAL_ERROR,
-_(Could not parse VPS ID %s), buf);
-continue;
+cnt = 0;
+while( buf[cnt] != ' ' ){
+ name_buf[cnt] = buf[cnt];
+ cnt++;
 }
-snprintf(vpsname, sizeof(vpsname), %d, veid);
+snprintf(vpsname, sizeof(vpsname), %d, name_buf);
 if (!(names[got] = strdup(vpsname)))
 goto no_memory;
 got ++;
--
1.5.2.2

-
Yuji Nishida
nish...@nict.go.jp

--
Libvir-list mailing list
Libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list


Re: [libvirt] Python binding to virConnectListInterfaces

2009-09-15 Thread Shahar Klein
OK, Thanks

How about listing interfaces for a VM(virDomainListInterfaces )
will you accept such an API?





From: Daniel Veillard veill...@redhat.com
To: Shahar Klein shaharkl...@yahoo.com
Cc: libvir-list@redhat.com
Sent: Monday, September 14, 2009 4:25:37 PM
Subject: Re: [libvirt] Python binding to virConnectListInterfaces

On Mon, Sep 14, 2009 at 03:26:01AM -0700, Shahar Klein wrote:
 
 
 Hi
 
 I'm trying to implement virConnectListInterfaces for the ESX driver
 (actually the esx_interface driver)
 but the python generator does not write the code for this function

  yes, basically it doesn't know how to handle char **const names
parameter.

 in generator.py this function is in a special table called: skip_impl
 
 and there is a comment saying:
 # Class methods which are written by hand in libvir.c but the Python-level
 # code is still automatically generated (so they are not in skip_function())
 
 I'm not sure what does it mean 

  add the function name there so that the generator won't try to add the
bindings

 should I implement in libvir.c? 

yes and

 and I'm done?

add an entry for the function in python/libvirt-python-api.xml
that's an XML description of the intefaces fow which bindings are
implemented manually.
I guess if you have the 3 you should be all set. See for example
how virConnectListDomains is handled, that should be fairly similar
except with strings.

Daniel

-- 
Daniel Veillard  | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
dan...@veillard.com  | Rpmfind RPM search engine http://rpmfind.net/
http://veillard.com/ | virtualization library  http://libvirt.org/



  --
Libvir-list mailing list
Libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list


[libvirt] [PATCH v2] network: add 'bootp' and 'tftp' config

2009-09-15 Thread Paolo Bonzini
Currently, libvirtd will start a dnsmasq process for the virtual
network, but (aside from killing the dnsmasq process and replacing it),
there's no way to define tftp boot options.

This change introduces the appropriate tags to the dhcp configuration:

 network
   namedefault/name
   bridge name=virbr%d /
   forward/
   ip address=192.168.122.1 netmask=255.255.255.0
 tftp root=/var/lib/tftproot /
 dhcp
   range start=192.168.122.2 end=192.168.122.254 /
   bootp file=pxeboot.img/
 /dhcp
   /ip
 /network

When the attributes are present, these are passed to the
arguments to dnsmasq:

 dnsmasq [...] --enable-tftp --tftp-root /srv/tftp --dhcp-boot pxeboot.img
   ^^^ ^^^
  from tftp / from bootp /


Possible future features in this field include the following:

- At present, only local tftp servers are supported (ie, dnsmasq runs as
the tftp server), but we could improve this in future by adding a
server= attribute to bootp.

- Currently, the BOOTP file cannot be assigned to a specific range or
host.  Even if this was implemented, it would still make sense to
allow bootp appearing directly within the dhcp element, providing
a global default.

Signed-off-by: Jeremy Kerr j...@ozlabs.org
Signed-off-by: Paolo Bonzini pbonz...@redhat.com

2009-09-15  Paolo Bonzini  pbonz...@redhat.com
Jeremy Kerr  j...@ozlabs.org

* docs/formatnetwork.html.in: Document new tags.
* docs/formatnetwork.html: Regenerate.
* docs/schemas/network.rng: Update.
* src/network_conf.c (virNetworkDefFree): Free new fields.
(virNetworkDHCPRangeDefParseXML): Parse bootp.
(virNetworkIPParseXML): New, parsing dhcp and tftp.
(virNetworkDefParseXML): Use virNetworkIPParseXML instead of
virNetworkDHCPRangeDefParseXML.
(virNetworkDefFormat): Pretty print new fields.
* src/network_conf.h (struct _virNetworkDef): Add netboot fields.
* src/network_driver.c (networkBuildDnsmasqArgv): Add
TFTP and BOOTP arguments.

* tests/Makefile.am (EXTRA_DIST): Add networkschemadata.
* tests/networkschematest: Look in networkschemadata.
* tests/networkschemadata/netboot-network.xml: New.
---

Compared to v1, I fixed wrong HTML that was pointed out to me
offline by Jiri Denemark.  Note that make will give errors
for it but will _not_ abort.

 docs/formatnetwork.html |   15 ++-
 docs/formatnetwork.html.in  |   17 ++--
 docs/schemas/network.rng|   10 
 src/network_conf.c  |   60 +-
 src/network_conf.h  |3 +
 src/network_driver.c|   14 ++
 tests/Makefile.am   |1 +
 tests/networkschemadata/netboot-network.xml |   12 +
 tests/networkschematest |2 +-
 9 files changed, 124 insertions(+), 10 deletions(-)
 create mode 100644 tests/networkschemadata/netboot-network.xml

diff --git a/docs/formatnetwork.html b/docs/formatnetwork.html
index 845e558..e97b9be 100644
--- a/docs/formatnetwork.html
+++ b/docs/formatnetwork.html
@@ -235,7 +235,13 @@
address will be their default route. The codenetmask/code
attribute defines the significant bits of the network address,
again specified in dotted-decimal format.  span class=sinceSince 
0.3.0/span
-  /dddtcodedhcp/code/dtddImmediately within the 
codeip/code element there is an
+  /dddtcodetftp/code/dtddImmediately within
+   the codeip/code element there is an optional codetftp/code
+   element. The presence of this element and of its attribute
+   coderoot/code enables TFTP services.  The attribute specifies
+   the path to the root directory served via TFTP.
+   span class=sinceSince 0.7.1/span
+  /dddtcodedhcp/code/dtddAlso within the codeip/code 
element there is an
optional codedhcp/code element. The presence of this element
enables DHCP services on the virtual network. It will further
contain one or more coderange/code elements.
@@ -253,7 +259,12 @@
 assigned to that host (via the codeip/code attribute), and the
name to be given that host by the DHCP server (via the
 codename/code attribute).  span class=sinceSince 0.4.5/span
-  /dd/dl
+  /dddtcodebootp/code/dtddThe optional codebootp/code
+   element specifies BOOTP options to be provided by the DHCP server.
+   Only one attribute is supported, codefile/code, giving the file
+   to be used for the boot image).  The BOOTP options currently have to
+   be the same for all address ranges and statically assigned 
addresses.span class=sinceSince 0.7.1./span
+/dd/dl
 h2
   a name=examples id=examplesExample configuration/a
 /h2
diff --git 

Re: [libvirt] RFE storage cloning across connections.

2009-09-15 Thread Daniel P. Berrange
On Sun, Sep 13, 2009 at 10:08:48PM +, J?hann B. Gu?mundsson wrote:
 Virt-manager now supports migration and VM cloning however cloning only 
 works within a connection though so you can't clone to another machine. It 
 certainly would be a nice addition if supports storage cloning across 
 connections.

To support cloning between machines would essentially require the client
app to download the entire storage volume over one connection and upload
it over the second. I don't really much like this as an idea, although
our new data streaming APIs would make it fairly easy to add.

For somes types of pool, virt-manager could in fact do cloning between
machines / connections, without needing API support. eg, if using an
iSCSI pool, a SCSI FibreChannel, a NFS / GFS / GlusterFS pool these
are all shared storage mechanism. virt-manager ought to be able to 
work out that pool X on one connection, is the same as pool Y on the
second connection, and thus just do the clone completely within pool X
and just refresh pool Y to see the new volume.If the source pool
is tied to the local machine (eg local disk, LVM, non-network FS),
then it could go via a second networked pool that is shared. 

Ultimately I think that if someone has more than a handful of hosts 
running virtualization, then it is very likely that they have got
networked/multi-host-accessible storage of some kind which would allow
for cross-connection cloning without this being needed in libvirt API
directly

Regards,
Daniel
-- 
|: Red Hat, Engineering, London   -o-   http://people.redhat.com/berrange/ :|
|: http://libvirt.org  -o-  http://virt-manager.org  -o-  http://ovirt.org :|
|: http://autobuild.org   -o- http://search.cpan.org/~danberr/ :|
|: GnuPG: 7D3B9505  -o-  F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|

--
Libvir-list mailing list
Libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list


Re: [libvirt] Trouble booting Xen VM with NFS root file system

2009-09-15 Thread Daniel P. Berrange
On Thu, Sep 10, 2009 at 03:15:44PM +0200, Matthias Schmidt wrote:
 Hi,
 
 I'm currently trying to boot a Xen VM with the root file system on NFS
 via libvirt.  Previously we used a small python script and xm create to
 boot a number of VMs (which worked fine).  Now I'm trying to integrate
 that functionality in a python project which uses libvirt, but
 sadly booting the VMs fail.
 
 The small script constructs a Xen command line which looks like the
 following:
 
 create =(/usr/sbin/xm create /foo.cfg \
  kernel=%s ramdisk=%s memory=64\
  root=/dev/nfs nfs_server=%s nfs_root=%s name=%s vif='mac=%s'\
  dhcp='dhcp' vcpus=1 extra='init=/stateless.sh xencons=tty1'\
  )%(vm_kernel, vm_ramdisk, vm_nfs_server, vm_nfs_root, hostname, vif)
 
 kernel and ramdisk are the path to the installed version, vm_nfs_server is the
 IP address of the NFS server and vm_nfs_root the path to the operating system
 installation (which is a Debian Linux).  Firing up the script brings up
 all VMs with a read-only NFS root file system.
 
 Now I tried to do this with libvirt, but all attempts failed with the
 following error popping up after the VM boots (after a certain
 time(out)):

It is hard to tell if this is just a configuration error, or an actual
libvirt Xen bug since there are a great many variables here. I think it
would be best to file a BZ against libvirt and include the following

 - The output of 'xm list --long GUESTNAME' when launched using 'xm'
 - The output of 'xm list --long GUESTNAME' when launched using libvirt
 - The /var/log/xen/xend.log file
 - The libvirt XML you used to launch the guest, or virsh dumpxml
 - The /foo.cfg file used with xm

Regards,
Daniel
-- 
|: Red Hat, Engineering, London   -o-   http://people.redhat.com/berrange/ :|
|: http://libvirt.org  -o-  http://virt-manager.org  -o-  http://ovirt.org :|
|: http://autobuild.org   -o- http://search.cpan.org/~danberr/ :|
|: GnuPG: 7D3B9505  -o-  F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|

--
Libvir-list mailing list
Libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list


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

2009-09-15 Thread Daniel P. Berrange
On Tue, Sep 15, 2009 at 03:40:09PM +0900, Yuji NISHIDA wrote:
 Hi Daniel,
 
 I didn't realize that I even did not follow the manner of XML.
 I have worked with this problem and got a small patch to handle ID  
 in OpenVZ functionality.
 I found it is working well with the XML script included ID in domain  
 tag.
 
 I am concerned that I had to edit the common file domain_conf.c.
 I still believe I should keep it away from this problem for  
 compatibility with the others.
 How do you think can I avoid this?

The 'id' value is not intended to be settable by the end user,
which is why the domain_conf.c parser does not parse it by
default. 

So for your usage in OpenVZ, you'll need to auto-assign an 'id'
value when creating a new guest. eg, get a list of existing
OpenVZ guest 'id' values and then pick the first one which is
not used.

 diff --git a/src/openvz_driver.c b/src/openvz_driver.c
 index a8c24ba..c0c1e0f 100644
 --- a/src/openvz_driver.c
 +++ b/src/openvz_driver.c
 @@ -130,6 +131,11 @@ static int openvzDomainDefineCmd(virConnectPtr  
 conn,
  ADD_ARG_LIT(VZCTL);
  ADD_ARG_LIT(--quiet);
  ADD_ARG_LIT(create);
 +
 +sprintf( str_id, %d, vmdef-id );
 +ADD_ARG_LIT(str_id);
 +
 +ADD_ARG_LIT(--name);
  ADD_ARG_LIT(vmdef-name);

This is where you need to pull in an auto-assigned ID value
instead of using vmdef-id.


Regards,
Daniel
-- 
|: Red Hat, Engineering, London   -o-   http://people.redhat.com/berrange/ :|
|: http://libvirt.org  -o-  http://virt-manager.org  -o-  http://ovirt.org :|
|: http://autobuild.org   -o- http://search.cpan.org/~danberr/ :|
|: GnuPG: 7D3B9505  -o-  F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|

--
Libvir-list mailing list
Libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list


Re: [libvirt] [PATCH v2] network: add 'bootp' and 'tftp' config

2009-09-15 Thread Paolo Bonzini

On 09/15/2009 11:43 AM, Daniel P. Berrange wrote:

I think we possibly ought to movetftp  one level higher up, outside
of theip  tag, since you can have a TFTP server regardless of whether
we've configured IP/dhcp details, and in the future we may well have
multipleip  tags.


In principle, the i...@address attribute would be the address to which the 
TFTP server would bind.  So if you have multiple ip tags you would 
also start multiple TFTP servers, each bound to a different address and 
possibly with a different root.


At that point, we may certainly introduce the possibility to specify the 
tftp tag one level up to easily specify a default (just like bootp). 
 However, given the current capabilities of libvirt it seems to me that 
this is the most logical schema.


Paolo

--
Libvir-list mailing list
Libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list


Re: [libvirt] [PATCH v2] network: add 'bootp' and 'tftp' config

2009-09-15 Thread Daniel P. Berrange
On Tue, Sep 15, 2009 at 12:09:53PM +0200, Paolo Bonzini wrote:
 On 09/15/2009 11:43 AM, Daniel P. Berrange wrote:
 I think we possibly ought to movetftp  one level higher up, outside
 of theip  tag, since you can have a TFTP server regardless of whether
 we've configured IP/dhcp details, and in the future we may well have
 multipleip  tags.
 
 In principle, the i...@address attribute would be the address to which the 
 TFTP server would bind.  So if you have multiple ip tags you would 
 also start multiple TFTP servers, each bound to a different address and 
 possibly with a different root.

Ah yes, that is a good point. In that case ACK to your 3rd patch

Regards,
Daniel
-- 
|: Red Hat, Engineering, London   -o-   http://people.redhat.com/berrange/ :|
|: http://libvirt.org  -o-  http://virt-manager.org  -o-  http://ovirt.org :|
|: http://autobuild.org   -o- http://search.cpan.org/~danberr/ :|
|: GnuPG: 7D3B9505  -o-  F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|

--
Libvir-list mailing list
Libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list


[libvirt] RFC: Rename / move / delete files in GIT

2009-09-15 Thread Daniel P. Berrange
With the 0.7.1 relesae out of the way I'd like to suggest that we take 
this time to move around some files in GIT to correct some long standing
wierd/bad naming decisions :-)


The qemud/ directory is better named 'daemon', and some of the things
in there should really have been in the src/ directory. So...

 * qemud/ - daemon/
 * qemud/qemud.{h,c} daemon/main.{h,c}
 * qemud/default-network.xml -  src/network/default.xml
 * qemud/libvirtd_qemu.aug src/qemu/qemu.aug
 * qemud/test_libvirtd_qemu.aug src/qemu/test_qemu.aug
 * qemud/remote_protocol.x - src/remote/remote_protocol.x


In the src/ directory we should move the rest of the drivers into their
own sub-directories. Basically want one sub directory for each of the
'mod_LTLIBRARIES' declared in the src/Makefile.am. This will ensure we
keep separate build dependancies, not accidentally including files that
we shouldn't.

 * src/qemu_*.{c,h} - src/qemu/
 * src/xen_unified.{c,h} - src/xen/xen_driver.{c,h}
 * src/xend_*, src/xm_* src/xen_*  - src/xen/
 * src/test.{c,h} - src/test/test_driver.{c,h}
 * src/storage*.{c,h} - src/storage/
 * src/security*.{c,h} - src/security/
 * src/remote_internal.{c,h} - src/remote/remote_driver.{c,h}
 * src/interface_driver.c - src/interface/netcf_driver.c
 * src/network_driver.c - src/network/network_driver.c
 * src/lxc_* - src/lxc/
 * src/openvz_* - src/openvz/
 * src/node_device* - src/nodedev/

That would just leave all the shared source files in src/. We could
leave them there, or create a src/util/  directory for that stuff.

Move virsh into the tools directory

 * src/virsh.c - tools/virsh.c
 * docs/virsh.pod - tools/virsh.pod
 * virsh.1:   delete from GIT

Sanitise naming in python/ directory, to make it clear which are the
manually overriden methods.

 * python/libvir.c - python/override-api.c
 * python/libvir.py - python/override-api.py
 * python/libvirt-python-api.xml python/override-api.xml
 * python/libvirt_wrap.h - python/types.h
 * python/virConnect.py - python/override-virConnect.py

Cleanup the docs/ directory 

 * docs/*.html.in   - docs/website/
 * docs/*.html:   delete from GIT
 * docs/devhelp:  delete from GIT
 * docs/html: delete from GIT
 * docs/libvirt-{api,refs}.xml: delete from GIT
 * docs/examples/ - examples/
 * docs/test*xml - examples/xml/test/
 * docs/storage - examples/xml/storage/

Remove include/libvirt/libvirt.h from GIT

For there places where I list 'delete from GIT', we would ensure that
when you run 'make dist' the files are still included in the tar.gz

NB, we would also update the cron job that deploys the website on
libvirt.org soo that it runs 'make' in the docs/website directory
to generate the .html files.

Regards,
Daniel
-- 
|: Red Hat, Engineering, London   -o-   http://people.redhat.com/berrange/ :|
|: http://libvirt.org  -o-  http://virt-manager.org  -o-  http://ovirt.org :|
|: http://autobuild.org   -o- http://search.cpan.org/~danberr/ :|
|: GnuPG: 7D3B9505  -o-  F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|

--
Libvir-list mailing list
Libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list


Re: [libvirt] RFC: Rename / move / delete files in GIT

2009-09-15 Thread Paolo Bonzini



  * qemud/ -  daemon/
  * qemud/qemud.{h,c} daemon/main.{h,c}
  * qemud/default-network.xml -   src/network/default.xml
  * qemud/libvirtd_qemu.aug src/qemu/qemu.aug
  * qemud/test_libvirtd_qemu.aug src/qemu/test_qemu.aug
  * qemud/remote_protocol.x -  src/remote/remote_protocol.x


100% agreed (I would have chosen libvirtd/ and libvirtd/libvirtd.{h,c} 
but that's my taste).



In the src/ directory we should move the rest of the drivers into their
own sub-directories. Basically want one sub directory for each of the
'mod_LTLIBRARIES' declared in the src/Makefile.am.


This is a good idea.  Do you plan to make separate makefiles too?

Also, it would be nice to rename moddir to modexecdir; the name is 
awful, but it ensures that Automake's make install-exec installs them 
rather than make install-data.


From the manual:

   Variables using the standard directory prefixes `data', `info',
  `man', `include', `oldinclude', `pkgdata', or `pkginclude' are
  installed by `install-data'.

   Variables using the standard directory prefixes `bin', `sbin',
  `libexec', `sysconf', `localstate', `lib', or `pkglib' are installed
   by `install-exec'.

   For instance, `data_DATA' files are installed by `install-data',
   while `bin_PROGRAMS' files are installed by `install-exec'.

   Any variable using a user-defined directory prefix with `exec' in
   the name (e.g., `myexecbin_PROGRAMS') is installed by `install-exec'.
   All other user-defined prefixes are installed by `install-data'.


Move virsh into the tools directory

  * src/virsh.c -  tools/virsh.c
  * docs/virsh.pod -  tools/virsh.pod
  * virsh.1:   delete from GIT


Yes!


  * docs/examples/ -  examples/
  * docs/test*xml -  examples/xml/test/
  * docs/storage -  examples/xml/storage/


Also very appreciated.


For there places where I list 'delete from GIT', we would ensure that
when you run 'make dist' the files are still included in the tar.gz


You can use distcheck-hook for that.

Paolo

--
Libvir-list mailing list
Libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list


Re: [libvirt] [PATCH 00/11] Generic data stream handling

2009-09-15 Thread Chris Lalancette
Daniel P. Berrange wrote:
 The immediate use case for this data stream code is Chris' QEMU
 migration patchset.
 
 The next use case is to allow serial console access to be tunnelled
 over libvirtd, eg to make  'virsh console GUEST' work remotely.
 This use case is why I included the support for non-blocking data
 streams and event loop integration (not required for Chris'
 migration use case)
 
 Anyway, assuming Chris confirms that I've not broken his code, then
 patches 1-6 are targetted for this next release.

I'm sorry for the very long delay in getting back to this.  I've been playing
around with my tunnelled migration patches on top of this code, and I just can't
seem to make the new nonblocking stuff work properly.  I'm getting a couple of
behaviors that are highly undesirable:

1)  Immediately after starting the stream, I get a virStreamRecv() callback on
the destination side.  The problem is that this is wrong for migration; there's
no data that I can read *from* the destination qemu process which makes any
sense.  While I could implement the method and just throw away the data, that
doesn't seem right to me.  This leads to...

2)  A crash in libvirtd on the source side of the destination.  It doesn't
happen every single time, but when it has happened I've traced it down to the
fact that src/remote_internal.c:remoteDomainEventFired() can get called *after*
conn-privateData has been set to NULL, leading to a SEGV on NULL pointer
dereference.  I can provide a core-dump for this if needed.

3) (minor) The python bindings refuse to build with these patches in place.
It's probably just a matter of fixing up the generator.py, but it needs to be 
done.

I've uploaded the code that I'm trying out at the moment to:

http://gitorious.org/~clalance/libvirt/clalance-staging/commits/tunnelled-migration

Dan, can you take a look and make any suggestions about where I might be going
wrong?  If you want to test out the tunnelled migration yourself, you'll need to
make sure you at least have the exec non-blocking patch (i.e. c/s
907500095851230a480b14bc852c4e49d32cb16d from the upstream qemu repo) in place.
 I have a qemu F-11 package with this patch in it available at:

http://people.redhat.com/clalance/qemu-exec-nonblock

-- 
Chris Lalancette

--
Libvir-list mailing list
Libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list


[libvirt] [PATCH] doc: don't emit trailing blanks into generated and VC'd NEWS file

2009-09-15 Thread Jim Meyering
Daniel Veillard reported that the generated and VC'd NEWS file
was causing trouble because the latest version contains trailing
spaces, which conflicts with our server-side hook to prevent that.

Here's the fix to avoid emitting those trailing spaces:

From 8110d304f49a217021371321ade0026ccd2627e1 Mon Sep 17 00:00:00 2001
From: Jim Meyering meyer...@redhat.com
Date: Tue, 15 Sep 2009 15:01:26 +0200
Subject: [PATCH] doc: don't emit trailing blanks into generated and VC'd NEWS 
file

* docs/Makefile.am ($(top_builddir)/NEWS): Filter out trailing
white space.
---
 docs/Makefile.am |1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/docs/Makefile.am b/docs/Makefile.am
index 9ac2f6d..1125931 100644
--- a/docs/Makefile.am
+++ b/docs/Makefile.am
@@ -131,6 +131,7 @@ $(top_builddir)/NEWS: $(top_srcdir)/docs/news.xsl 
$(top_srcdir)/docs/news.html.i
  $(XSLTPROC) --nonet $(top_srcdir)/docs/news.xsl   \
 $(top_srcdir)/docs/news.html.in\
   | perl -0777 -pe 's/\n\n+$$/\n/' \
+  | perl -pe 's/[ \t]+$//' \
$...@-t  mv $...@-t $@ ; fi );

 clean-local:
--
1.6.5.rc1.171.g3f463

--
Libvir-list mailing list
Libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list


[libvirt] Release of libvirt-0.7.1

2009-09-15 Thread Daniel Veillard
  Okay, it's finally out of the box and available as usual at
ftp://libvirt.org/libvirt/

There is a fair amount of new features and improvement, not surprizing
considering 0.7.0 was 1.5 months ago. And of course many bug fixes and
cleanups:

* New Features:
- Add an internal secret XML handling API (Miloslav Trmač)
- VBox 3.0.6 API change support (Pritesh Kothari)
- also allow use of XZ for Qemu image compression (Jim Meyering)
- Multipath storage support module (Dave Allan)
- VBox add Storage Volume support (Pritesh Kothari)
- Support configuration of huge pages in guests (Daniel P. Berrange)
- Add support for encrypted (qcow) volume creation. (Miloslav Trmač)
- Secret manipulation public API (Miloslav Trmač)
- support lzop save compression for qemu (Charles Duffy)
- Support new PolicyKit 1.0 API (Daniel P. Berrange)
- Compressed save image format for Qemu. (Chris Lalancette)
- QEmu add host PCI device hotplug support (Mark McLoughlin)

* Portability:
- Fix win32 platform build (Daniel P. Berrange)

* Documentation:
- Minor comment changes (Laine Stump)
- Fix up virNodeGetCellsFreeMemory (Chris Lalancette)
- Fix some typos  remove unhelpful acronyms in QEMU docs (Daniel P. Berrange)
- Add documentation about the QEMU driver security features (Daniel P. Berrange)
- Remove 'the the' typo in docs (Daniel P. Berrange)
- Fix some URLs in virsh manpage (Mark McLoughlin)
- Add link to AbiCloud web management system (Daniel P. Berrange)
- Update logging documentation (Amy Griffis)

* Bug Fixes:
- VBox bug when starting machine from old versions (Pritesh Kothari)
- ESX avoid potential leaks (Matthias Bolte)
- Fix more OOM handling bugs (Daniel P. Berrange)
- Fix logging buffer overrun read (Daniel P. Berrange)
- Fix misc thread locking bugs / bogus warnings (Daniel P. Berrange)
- Fix regression from Avoid polling on FDs with no events (Chris Lalancette)
- Close logfile fd after spawning qemu (Ryota Ozaki)
- Check for libssh2 = 1.0 for phy driver (Maximilian Wilhelm)
- Avoid another leak in src/xend_internal.c (Matthias Bolte)
- Avoid a leak in xenDaemonLookupByID (Matthias Bolte)
- VBox fix minor bugs in display and added OOM checks (Pritesh Kothari)
- Some close/fclose/closedir calls are missing (Matthias Bolte)
- lxc_container.c: avoid a leak on error paths (Jim Meyering)
- Fix several memory leaks (Ryota Ozaki)
- Fix a memory leak in virsh (Laine Stump)
- Fix ID field in virDomainPtr after starting Xen VM (Daniel P. Berrange)
- Fix memory leak of monitor character device (Daniel P. Berrange)
- Automatically set correct ownership of QEMU state directories (Daniel P. 
Berrange)
- Avoid polling on FDs with no events enabled (Daniel P. Berrange)
- esx_vi: return -1 upon failure, as intended (Matthias Bolte)
- python: let libvirt_virConnectDomainEventCallback indicate success (Jim 
Meyering)
- uml_conf.c: don't return an uninitialized pointer (Jim Meyering)
- storage_backend.c: assure clang that inputvol can't be NULL (Jim Meyering)
- libvir.c: avoid NULL dereference in virStoragePoolSetAutostart (Jim Meyering)
- lxc: avoid NULL dereference upon getmntent failure (Jim Meyering)
- storage_backend_fs: avoid NULL dereference on opendir failure (Jim Meyering)
- Fix bugs in virDomainMigrate v2 code. (Chris Lalancette)
- VMware ESX: Don't warn on some query parameter (Matthias Bolte)
- Don't blindly reorder disk drives (Daniel P. Berrange)
- Fix sexpr2string() to handle empty list. (Jim Fehlig)
- Fix driver entry table for UML numa APIs (Daniel P. Berrange)
- Fix crash in virsh vol-key command (Pritesh Kothari)
- 517157 fix selinux problem with images on NFS (Darryl L. Pierce)
- Fix phypOpen() escape_specialcharacters (Mattias Bolte)
- Power Hypervisor: fix potential segfault (Mattias Bolte)
- Fix bridge/tap system error reporting (Mark McLoughlin)
- Reset PCI host devices after hot-unplug (Mark McLoughlin)
- Reset unmanaged PCI host devices before hotplug (Mark McLoughlin)
- Fix up connection reference counting. (Chris Lalancette)
- Fix LXC driver crash when kernel doesn't support clone (Daniel P. Berrange)
- Make LXC / UML drivers robust against NUMA topology brokenness (Daniel P. 
Berrange)
- Run 'cont' on successful migration finish. (Chris Lalancette)
- Fix QEMU domain status after restore. (Chris Lalancette)
- Handle kernels with no ipv6 support (Mark McLoughlin)
- Set perms on /var/lib/libvirt/boot to 0711 (Mark McLoughlin)
- chown kernel/initrd before spawning qemu (Mark McLoughlin)
- Several fixes to libvirtd's log setup (Amy Griffis)
- Fix memleak if esxOpen fails (Matthias Bolte)

* Improvements:
- Add UUID definition required by storage encryption import (Daniel P. Berrange)
- Make secrets RNG more strict (Daniel P. Berrange)
- Fill in secret UUID for qcow encryption (Daniel P. Berrange)
- Add usage type/id as a public API property of virSecret (Daniel P. Berrange)
- Fix UUID handling in secrets/storage encryption APIs (Daniel P. Berrange)
- Save vcpuinfo in status file (Daniel P. Berrange)
- Restart 

Re: [libvirt] RFC: Rename / move / delete files in GIT

2009-09-15 Thread Daniel Veillard
On Tue, Sep 15, 2009 at 11:38:19AM +0100, Daniel P. Berrange wrote:
 With the 0.7.1 relesae out of the way I'd like to suggest that we take 
 this time to move around some files in GIT to correct some long standing
 wierd/bad naming decisions :-)
 
 
 The qemud/ directory is better named 'daemon', and some of the things
 in there should really have been in the src/ directory. So...
 
  * qemud/ - daemon/
  * qemud/qemud.{h,c} daemon/main.{h,c}
  * qemud/default-network.xml -  src/network/default.xml
  * qemud/libvirtd_qemu.aug src/qemu/qemu.aug
  * qemud/test_libvirtd_qemu.aug src/qemu/test_qemu.aug
  * qemud/remote_protocol.x - src/remote/remote_protocol.x

  ACK, though daemon/main.{h,c} could be libvirtd.{h,c}, not a big deal
  though


 In the src/ directory we should move the rest of the drivers into their
 own sub-directories. Basically want one sub directory for each of the
 'mod_LTLIBRARIES' declared in the src/Makefile.am. This will ensure we

  ACK

 keep separate build dependancies, not accidentally including files that
 we shouldn't.
 
  * src/qemu_*.{c,h} - src/qemu/
  * src/xen_unified.{c,h} - src/xen/xen_driver.{c,h}
  * src/xend_*, src/xm_* src/xen_*  - src/xen/
  * src/test.{c,h} - src/test/test_driver.{c,h}
  * src/storage*.{c,h} - src/storage/
  * src/security*.{c,h} - src/security/
  * src/remote_internal.{c,h} - src/remote/remote_driver.{c,h}
  * src/interface_driver.c - src/interface/netcf_driver.c
  * src/network_driver.c - src/network/network_driver.c
  * src/lxc_* - src/lxc/
  * src/openvz_* - src/openvz/
  * src/node_device* - src/nodedev/

  yup sounds fine to me

 That would just leave all the shared source files in src/. We could
 leave them there, or create a src/util/  directory for that stuff.

  I'm fine keeping in the main dir for the moment.

 Move virsh into the tools directory
 
  * src/virsh.c - tools/virsh.c
  * docs/virsh.pod - tools/virsh.pod

  Could be left in docs, both places are IMHO adequate

  * virsh.1:   delete from GIT

  Okay but we need to make sure it's generated for EXTRA_DIST / dist

 Sanitise naming in python/ directory, to make it clear which are the
 manually overriden methods.
 
  * python/libvir.c - python/override-api.c
  * python/libvir.py - python/override-api.py
  * python/libvirt-python-api.xml python/override-api.xml
  * python/virConnect.py - python/override-virConnect.py

  okay

  * python/libvirt_wrap.h - python/types.h

  the types are wrappers, the problem is that types.h is so
generic that it's more likely to raise portability problems,
I would avoid that change

 Cleanup the docs/ directory 
 
  * docs/*.html.in   - docs/website/

  Hum ... I'm not that fond of that, sure it's used for the website
but it's still the main documentation, and I like to have the full docs
tree checkout being the website. If you search the .xml they are on the
web too, at a predictable place.

  * docs/*.html:   delete from GIT
  * docs/devhelp:  delete from GIT
  * docs/html: delete from GIT

  It's not that much of churn, I don't remember any time where this
generated a problem, and this makes the EXTRA_DIST / dist more complex.
I'm not convinced it will really heklp that much, nor save much
bandwidth either.

  * docs/libvirt-{api,refs}.xml: delete from GIT

  Disagree, I want those to be in git to see diff, and also to make sure
one can rebuild the python bindings on a platfor where the generation
may fail.

  * docs/examples/ - examples/
  * docs/test*xml - examples/xml/test/
  * docs/storage - examples/xml/storage/

  okay

 Remove include/libvirt/libvirt.h from GIT

  Since the generation of that file is really a direct output of
running configure, okay

 For there places where I list 'delete from GIT', we would ensure that
 when you run 'make dist' the files are still included in the tar.gz

  Yes but still I would prefer to keep some of it in git.

 NB, we would also update the cron job that deploys the website on
 libvirt.org soo that it runs 'make' in the docs/website directory
 to generate the .html files.

  I'm not fond of a subdirectory for the web site. I really think
everything out of doc should be reachable with a trivial http:// url

Daniel

-- 
Daniel Veillard  | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
dan...@veillard.com  | Rpmfind RPM search engine http://rpmfind.net/
http://veillard.com/ | virtualization library  http://libvirt.org/

--
Libvir-list mailing list
Libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list


Re: [libvirt] [PATCH] doc: don't emit trailing blanks into generated and VC'd NEWS file

2009-09-15 Thread Daniel Veillard
On Tue, Sep 15, 2009 at 03:02:49PM +0200, Jim Meyering wrote:
 Daniel Veillard reported that the generated and VC'd NEWS file
 was causing trouble because the latest version contains trailing
 spaces, which conflicts with our server-side hook to prevent that.
 
 Here's the fix to avoid emitting those trailing spaces:

  ACK, thanks !

Daniel

-- 
Daniel Veillard  | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
dan...@veillard.com  | Rpmfind RPM search engine http://rpmfind.net/
http://veillard.com/ | virtualization library  http://libvirt.org/

--
Libvir-list mailing list
Libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list


Re: [libvirt] RFC: Rename / move / delete files in GIT

2009-09-15 Thread Daniel Veillard
On Tue, Sep 15, 2009 at 02:07:58PM +0200, Paolo Bonzini wrote:
 For there places where I list 'delete from GIT', we would ensure that
 when you run 'make dist' the files are still included in the tar.gz

 You can use distcheck-hook for that.

  please use dist-hook, not distcheck-hook, as it's really
make dist which is used to generate the tarball,

  thanks

Daniel

-- 
Daniel Veillard  | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
dan...@veillard.com  | Rpmfind RPM search engine http://rpmfind.net/
http://veillard.com/ | virtualization library  http://libvirt.org/

--
Libvir-list mailing list
Libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list


Re: [libvirt] Python binding to virConnectListInterfaces

2009-09-15 Thread Shahar Klein
understood

so, is that a bug?

virsh # list
 Id Name State
--
 16 rh53 running
256 smallLinux   running
336 diskless linux   running

virsh # dominfo 16
Id: 16
Name:   rh53
UUID:   564dea41-bf37-44d6-2c9e-c6009be71aa6
OS Type:hvm
State:  running
CPU(s): 1
Max memory: 393216 kB
Used memory:393216 kB

virsh # 
virsh # dumpxml 16
error: internal error Datastore URL '' has unexpected prefix, expecting 
'/vmfs/volumes/' prefix





From: Daniel P. Berrange berra...@redhat.com
To: Shahar Klein shaharkl...@yahoo.com
Cc: veill...@redhat.com; libvir-list@redhat.com
Sent: Tuesday, September 15, 2009 12:05:49 PM
Subject: Re: [libvirt] Python binding to virConnectListInterfaces

On Tue, Sep 15, 2009 at 01:55:40AM -0700, Shahar Klein wrote:
 OK, Thanks
 
 How about listing interfaces for a VM(virDomainListInterfaces )
 will you accept such an API?


That information is already available in the XML for a guest so there is
no need for any API

Regards
Daniel
-- 
|: Red Hat, Engineering, London   -o-  http://people.redhat.com/berrange/ :|
|: http://libvirt.org  -o-  http://virt-manager.org  -o-  http://ovirt.org :|
|: http://autobuild.org   -o-http://search.cpan.org/~danberr/ :|
|: GnuPG: 7D3B9505  -o-  F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|



  --
Libvir-list mailing list
Libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list


Re: [libvirt] RFC: Rename / move / delete files in GIT

2009-09-15 Thread Daniel P. Berrange
On Tue, Sep 15, 2009 at 02:07:58PM +0200, Paolo Bonzini wrote:
 
   * qemud/ -  daemon/
   * qemud/qemud.{h,c} daemon/main.{h,c}
   * qemud/default-network.xml -   src/network/default.xml
   * qemud/libvirtd_qemu.aug src/qemu/qemu.aug
   * qemud/test_libvirtd_qemu.aug src/qemu/test_qemu.aug
   * qemud/remote_protocol.x -  src/remote/remote_protocol.x
 
 100% agreed (I would have chosen libvirtd/ and libvirtd/libvirtd.{h,c} 
 but that's my taste).
 
 In the src/ directory we should move the rest of the drivers into their
 own sub-directories. Basically want one sub directory for each of the
 'mod_LTLIBRARIES' declared in the src/Makefile.am.
 
 This is a good idea.  Do you plan to make separate makefiles too?

I'm undecided, but it is probably best to just keep a single Makefile.am 
in src/  because that will let make parallelize the build better which
is important when I build with 'make -j 16' :-)

In fact in many ways it'd be nice to have a 100% non-recursive make
so we can express the true build dependancies for everything instead
of having to rely on SUBDIR build ordering for things like python/
depending on apibuild.py under docs/  But one step at a time. 

 Also, it would be nice to rename moddir to modexecdir; the name is 
 awful, but it ensures that Automake's make install-exec installs them 
 rather than make install-data.

I don't particularly care about the name choice, so fine to rename
it to modexecdir instead.

Daniel
-- 
|: Red Hat, Engineering, London   -o-   http://people.redhat.com/berrange/ :|
|: http://libvirt.org  -o-  http://virt-manager.org  -o-  http://ovirt.org :|
|: http://autobuild.org   -o- http://search.cpan.org/~danberr/ :|
|: GnuPG: 7D3B9505  -o-  F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|

--
Libvir-list mailing list
Libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list


[libvirt] ESX driver does not support vmxnet3

2009-09-15 Thread Shahar Klein
diff --git a/src/esx/esx_vmx.c b/src/esx/esx_vmx.c
index 70e9305..6bd6b93 100644
--- a/src/esx/esx_vmx.c
+++ b/src/esx/esx_vmx.c
@@ -1409,10 +1409,11 @@ esxVMX_ParseEthernet(virConnectPtr conn, virConfPtr 
conf, int controller,
 if (virtualDev != NULL 
 STRCASENEQ(virtualDev, vlance) 
 STRCASENEQ(virtualDev, vmxnet) 
+STRCASENEQ(virtualDev, vmxnet3) 
 STRCASENEQ(virtualDev, e1000)) {
 ESX_ERROR(conn, VIR_ERR_INTERNAL_ERROR,
   Expecting VMX entry '%s' to be 'vlance' or 'vmxnet' or 
-  'e1000' but found '%s', virtualDev_name, virtualDev);
+  'vmxnet3' or 'e1000' but found '%s', virtualDev_name, 
virtualDev);
 goto failure;
 }



  --
Libvir-list mailing list
Libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list


Re: [libvirt] [PATCH 00/11] Generic data stream handling

2009-09-15 Thread Daniel P. Berrange
On Tue, Sep 15, 2009 at 02:35:02PM +0200, Chris Lalancette wrote:
 
 I've uploaded the code that I'm trying out at the moment to:
 
 http://gitorious.org/~clalance/libvirt/clalance-staging/commits/tunnelled-migration
 
 Dan, can you take a look and make any suggestions about where I might be going
 wrong?  

I've not look at your migration code yet, but there's a mistake in your
change to the test driver.

http://gitorious.org/~clalance/libvirt/clalance-staging/commit/e77dc1f1ba4e18b4fc6a70198c2f3b253609dc42

The test driver is delibrately not using saferead/write because those
helpers do not handle  EAGAIN. If you get EGAIN they'll return -1 and
you are left with no idea how much data you've written which is not
helpful :-) At very least this will cause the stream to terminate with
an error message. If I got something wrong, perhaps its causing a crash.

Daniel
-- 
|: Red Hat, Engineering, London   -o-   http://people.redhat.com/berrange/ :|
|: http://libvirt.org  -o-  http://virt-manager.org  -o-  http://ovirt.org :|
|: http://autobuild.org   -o- http://search.cpan.org/~danberr/ :|
|: GnuPG: 7D3B9505  -o-  F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|

--
Libvir-list mailing list
Libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list


[libvirt] guests and pulseaudio fighting over audio devices

2009-09-15 Thread Dave Allan
I noticed that when a KVM guest created with virt-manager is running on 
F10, sound on the physical host stops working.  When all VMs are 
shutdown, sound starts working again.  Removing the sound tag from the 
VM XML allows sound to work while the VM is booted.  To further 
complicate troubleshooting, if audio is already playing when the guest 
is started it keeps playing, since pulse already has the device open.


The message in /var/log/messages when I try to play audio is:

pulseaudio[6492]: module-alsa-sink.c: Error opening PCM device front:0: 
Device or resource busy


strace of pulseaudio shows:

open(/dev/snd/pcmC0D0p, O_RDWR|O_NONBLOCK) = -1 EBUSY (Device or 
resource busy)


but fuser and lsof show nothing.  A trivial test program also sees 
Device or resource busy when trying to open /dev/snd/pcmC0D0p


I am in favor of removing the sound tag from the default 
configuration, since I don't use sound from within guests and I do use 
sound on my desktop, but perhaps this behavior is specific to my 
configuration.  I haven't investigated it exhaustively.  What does 
everybody else think?


Dave

--
Libvir-list mailing list
Libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list


Re: [libvirt] Passing -no-kvm-irqchip to KVM/QEMU guests

2009-09-15 Thread Garry Dolley
On Sun, Sep 13, 2009 at 09:33:01PM -0400, Jim Paris wrote:
 Garry Dolley wrote:
  Dear libvirt,
  
  Is there a way to tell a KVM/QEMU guest managed by libvirt to start
  with the -no-kvm-irqchip argument?
  
  I have some FreeBSD 7 guests with timing issues, and if I try to
  start the VMs manually with -no-kvm-irqchip, the timing issues go
  away (the only known workaround right now).
  
  However, if the guest is managed by libvirt, I have found no way to
  pass this command line option.
  
  I'm running libvirt 0.6.4 on Ubuntu 9.04
 
 As a hack, you can point the XML file to a wrapper script instead of
 the KVM binary, where the script would contain e.g.:
 
   #!/bin/sh
   exec /usr/bin/kvm $@ -no-kvm-irqchip

Hi Jim,

Thanks for this suggestion, it worked like a charm!

Now, while this is still a hacky way to solve this problem, would
anyone be interested in seeing a patch that would either:

1) Allow one to append arbitrary command line arguments to the
   emulator, like:

 ...
 emulator/usr/bin/kvmemulator
 emulator_args-no-kvm-irqchip/emulator_args
 ...

   I don't like the name emulator_args much either, but just as an
   example.

2) Have an option in the XML file specifically for
   '-no-kvm-irqchip'; I'm not sure where it would go.  Maybe under
   features, yet it isn't really a feature, more like lack of a
   feature ;)

Suggestions welcome.

I've been waiting to find some itch to scratch where I can
contribute to libvirt code directly (instead of just doc patches),
so this seems to fit the bill.

-- 
Garry Dolley
ARP Networks, Inc. | http://www.arpnetworks.com | (818) 206-0181
Data center, VPS, and IP Transit solutions
Member Los Angeles County REACT, Unit 336 | WQGK336
Blog http://scie.nti.st

--
Libvir-list mailing list
Libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list


Re: [libvirt] Python binding to virConnectListInterfaces

2009-09-15 Thread Shahar Klein
It's my ESX4i testing server
with 3 datastores
one local and 2 over NFS mounts that are not responding
Plus this ESX4i server is quite messed up with cloning tests
I made before discovering the OVA-templates

I'll clean and try again and will make a mental note
to test NFS datastore diconnections 

Thanks
Shahar




From: Matthias Bolte matthias.bo...@googlemail.com
To: Shahar Klein shaharkl...@yahoo.com
Cc: Daniel P. Berrange berra...@redhat.com; veill...@redhat.com; 
libvir-list@redhat.com
Sent: Tuesday, September 15, 2009 7:56:43 PM
Subject: Re: [libvirt] Python binding to virConnectListInterfaces

2009/9/15 Shahar Klein shaharkl...@yahoo.com:
 understood
 so, is that a bug?
 virsh # list
  Id Name State
 --
  16 rh53 running
 256 smallLinux   running
 336 diskless linux   running
 virsh # dominfo 16
 Id: 16
 Name:   rh53
 UUID:   564dea41-bf37-44d6-2c9e-c6009be71aa6
 OS Type:hvm
 State:  running
 CPU(s): 1
 Max memory: 393216 kB
 Used memory:393216 kB
 virsh #
 virsh # dumpxml 16
 error: internal error Datastore URL '' has unexpected prefix, expecting
 '/vmfs/volumes/' prefix


This message indicates that your ESX server has a datastore with URL
set to an empty string. This is unexpected.

Goto https://your-esx-server/mob then goto content - rootFolder -
childEntity - datastore. For each datastore element check the
info.url property, if one of them is an empty string or unset then
this is the cause for this error message.

If this is really the case for you, the question is: Is an empty URL
valid, or is this a configuration issue with you ESX server?

Matthias



  --
Libvir-list mailing list
Libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list