Re: [libvirt] libvir: Xen error

2008-09-01 Thread Alain Barthe
2008/8/28 mantra UNIX [EMAIL PROTECTED]

 Thank you Richard.


Thank you for what ?

If you got an answer off list, please share it, I have the same problem and
got no solutions.

Best regards.

Alain.




 On 8/27/08, Richard W.M. Jones [EMAIL PROTECTED] wrote:

 On Mon, Aug 25, 2008 at 02:30:37PM -0500, mantra UNIX wrote:
   Hello everyone,
 
   I get the following error when i try to redtart a domain;
 
   # virsh list
   libvir: Xen error : Domain not found: xenUnifiedDomainLookupByID
 
   I am using RHEL5.2 on i386, I have searched for the error on web
   and on RedHat but could not find any.

 The bug report is a bit unclear.  How did you restart the domain?
 (eg. from inside the guest?  using a virsh command?)  Did you wait
 after restarting the domain?

 Can you also post the output of:

 xm list --long

 Rich.

 --
 Richard Jones, Emerging Technologies, Red Hat
 http://et.redhat.com/~rjones http://et.redhat.com/%7Erjones
 virt-df lists disk usage of guests without needing to install any
 software inside the virtual machine.  Supports Linux and Windows.
 http://et.redhat.com/~rjones/virt-df/http://et.redhat.com/%7Erjones/virt-df/




 --
 Regards,
 mantra - Instrument of Thought

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


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


[libvirt] Re: libvirt vs XenAPI

2008-09-01 Thread atif bajwa
Hi!

I am looking to add support for Xen. Please guide me which is best method to
connect to remote system(host) from windows client. What privileges and
binaries will be required for client program to read data only.

If possible please list supported libvirt versions that can be port to
windows. Also list xen-based-hypervisor distributions that I can get remote
access with libvirt windows based client.

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


[libvirt] Remote access from libvirt windows client

2008-09-01 Thread atif bajwa
Hi!

I am looking to add support for Xen. Please guide me which is best method to
connect to remote system(host) from windows client. What privileges and
binaries will be required for client program to read data only.

If possible please list supported libvirt versions that can be port to
windows. Also list xen-based-hypervisor distributions that I can get remote
access with libvirt windows based client.

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


Re: [libvirt] remote driver?

2008-09-01 Thread Daniel P. Berrange
On Mon, Sep 01, 2008 at 12:29:16PM +0900, Jun Koi wrote:
 Hi,
 
 I am connecting to libvirtd with virsh using qemu:///system connection
 type. However, it seems virsh uses remote driver for all the action
 on the VM. So this means qemu:///system considers all the action is
 done remotely even if it is on the same physical machine?
 
 I really expected that it uses QEMU driver, but that is not the
 case. So I wonder in which case QEMU driver is used?

The QEMU driver is what we call a 'stateful' driver, which means it only
lives within the libvirtd daemon, and applications communicate with the
QEMU driver indirectly via the 'remote' driver. 'remote' was probably
a bad name for this driver - its really just doing local RPC calls over
a UNIX domain socket and is very fast.  So the behaviour you see is
totally expected  nothing to worry about.

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] libvirt vs XenAPI

2008-09-01 Thread Atsushi SAKAI
Hi, Atif

If you want to natively use Xen API,
I will recommend to use it directly.
If you want to use archtecture neutral API,
You should use libvirt.


Libvirt pros and cons
pros:any Xen version is supported (like 3.y.z or 2.y)
cons:architecuture neutral API. specific functionality is not always supported.

And this list may be helpful.
http://libvirt.org/hvsupport.html

Thanks
Atsushi SAKAI


atif bajwa [EMAIL PROTECTED] wrote:

 Hi!
 
 I am looking to integrate the Xen Management. Please guide me advantages of
 using libvirt over XenAPI and please list xen-based-hypervisor
 distributions(versions) that will be supported with libvirt. And what is
 future of libvirt as XenSource is more focused on XenAPI.
 
 Regards,
 Atif


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


Re: [libvirt] Remote access from libvirt windows client

2008-09-01 Thread Atsushi SAKAI
Hi, Atif

At this moment, 0.4.4 is not working correctly.
Hourly cvs-snapshot is better solution.
http://libvirt.org/downloads.html

If you want to compile on MinGW, Please see following Mail.
https://www.redhat.com/archives/libvir-list/2008-June/msg00145.html

If you want to compile on Cygwin,
You should turn off HAVE_WINSOCK2_H after autogen.sh


Thanks
Atsushi SAKAI


atif bajwa [EMAIL PROTECTED] wrote:

 Hi!
 
 I am looking to add support for Xen. Please guide me which is best method to
 connect to remote system(host) from windows client. What privileges and
 binaries will be required for client program to read data only.
 
 If possible please list supported libvirt versions that can be port to
 windows. Also list xen-based-hypervisor distributions that I can get remote
 access with libvirt windows based client.
 
 Regards,
 Atif


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


Re: [libvirt] libvirt vs XenAPI

2008-09-01 Thread atif bajwa
Thanks,

Please guide me list of supported distributions with versions that I can use
libvirt with.

Regards,
Atif

On Mon, Sep 1, 2008 at 11:12 AM, Atsushi SAKAI [EMAIL PROTECTED]wrote:

 Hi, Atif

 If you want to natively use Xen API,
 I will recommend to use it directly.
 If you want to use archtecture neutral API,
 You should use libvirt.


 Libvirt pros and cons
 pros:any Xen version is supported (like 3.y.z or 2.y)
 cons:architecuture neutral API. specific functionality is not always
 supported.

 And this list may be helpful.
 http://libvirt.org/hvsupport.html

 Thanks
 Atsushi SAKAI


 atif bajwa [EMAIL PROTECTED] wrote:

  Hi!
 
  I am looking to integrate the Xen Management. Please guide me advantages
 of
  using libvirt over XenAPI and please list xen-based-hypervisor
  distributions(versions) that will be supported with libvirt. And what is
  future of libvirt as XenSource is more focused on XenAPI.
 
  Regards,
  Atif



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


Re: [libvirt] libvirt vs XenAPI

2008-09-01 Thread Daniel P. Berrange
On Mon, Sep 01, 2008 at 10:59:09AM +0200, atif bajwa wrote:
 I am looking to integrate the Xen Management. Please guide me advantages of
 using libvirt over XenAPI and please list xen-based-hypervisor
 distributions(versions) that will be supported with libvirt. And what is
 future of libvirt as XenSource is more focused on XenAPI.

There are many benefits to using libvirt instead of XenAPI

 - Avoids your application being locked into a particular hypervisor
   allowing you to port your application to KVM, OpenVZ, LXC (native Linux
   containers) and any hypervisor supported by libvirt in future

 - livirt works with every version of Xen 3.0.x or later, XenAPI is
   only usable in Xen 3.1.0 and later and thus not available in some
   distros such as RHEL-5/CentOS-5

 - The same API can be used both locally, and remotely. Local access
   is highly efficient making direct hypercalls whereever possible
   giving order of magnitude better response time than XenAPI.

 - Remote access can be secured using SSL + x509 certificates, SSH
   tunnel, Kerberos GSSAPI single sign on, username + password

 - Guarenteed stable API, so applications written against libvirt
   will continue to work indefinitely into the future

There's probably more points I can come up with, but that's enough for now.

As for the future, libvirt is now available in every major Linux distro,
and used by a wide range of tools developed by numerous companies  has
contributors from across the open source community, both independant and
vendor sponsered. There is an ever increasing set of language bindings for
the API (Python, Perl, Java, OCaml, Ruby) and mappings into the CIM / DMTF
framework for virtualzation, and new work to provide an AMQP binding. And 
of course this is also ongoing work to expand the API functionality and add
new hypervisor drivers. There's a healthy todo list of ideas we'll be
addressing over the next year or so...

   http://wiki.libvirt.org/page/Todo

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] Question about migration on KVM/Qemu

2008-09-01 Thread Chris Lalancette
Atsushi SAKAI wrote:
 Hi,
 
 I have a question about migration on KVM/Qemu.
From src/qemu_driver.c, domainMigrateX is not defined.
 
 But from news on 0.3.2, KVM migration is supported.
 http://libvirt.org/news.html
 
 Where is the code which performs migration on KVM/Qemu.

Hm, that's a little odd.  As far as I know, KVM migration isn't supported yet.

There are some patches from Rich Jones (that he's posted a few times), but there
is a bug in upstream KVM that prevents them from working properly.
Unfortunately, upstream KVM/Qemu have decided to re-do their implementation of
migration, so we can't commit to Rich Jones' patches until that gets sorted
upstream.

Chris Lalancette

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


Re: [libvirt] libvirt vs XenAPI

2008-09-01 Thread atif bajwa
Thanks,

You mentioned that libvirt works with every version of Xen 3.0.x or later,
if you can list me list of Linux distros or verify if following list if ok
with remote access.

1. Solaris SPARC 81/9/10
2. Solaris x64/x86 9/10
3. Red Hat RHEL AS/ES/WS 3/4/5
4. Novell SUSE  SLES 8/9/10

Regards,
Atif

On Mon, Sep 1, 2008 at 11:23 AM, Daniel P. Berrange [EMAIL PROTECTED]wrote:

 On Mon, Sep 01, 2008 at 10:59:09AM +0200, atif bajwa wrote:
  I am looking to integrate the Xen Management. Please guide me advantages
 of
  using libvirt over XenAPI and please list xen-based-hypervisor
  distributions(versions) that will be supported with libvirt. And what is
  future of libvirt as XenSource is more focused on XenAPI.

 There are many benefits to using libvirt instead of XenAPI

  - Avoids your application being locked into a particular hypervisor
   allowing you to port your application to KVM, OpenVZ, LXC (native Linux
   containers) and any hypervisor supported by libvirt in future

  - livirt works with every version of Xen 3.0.x or later, XenAPI is
   only usable in Xen 3.1.0 and later and thus not available in some
   distros such as RHEL-5/CentOS-5

  - The same API can be used both locally, and remotely. Local access
   is highly efficient making direct hypercalls whereever possible
   giving order of magnitude better response time than XenAPI.

  - Remote access can be secured using SSL + x509 certificates, SSH
   tunnel, Kerberos GSSAPI single sign on, username + password

  - Guarenteed stable API, so applications written against libvirt
   will continue to work indefinitely into the future

 There's probably more points I can come up with, but that's enough for now.

 As for the future, libvirt is now available in every major Linux distro,
 and used by a wide range of tools developed by numerous companies  has
 contributors from across the open source community, both independant and
 vendor sponsered. There is an ever increasing set of language bindings for
 the API (Python, Perl, Java, OCaml, Ruby) and mappings into the CIM / DMTF
 framework for virtualzation, and new work to provide an AMQP binding. And
 of course this is also ongoing work to expand the API functionality and add
 new hypervisor drivers. There's a healthy todo list of ideas we'll be
 addressing over the next year or so...

   http://wiki.libvirt.org/page/Todo

 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/http://search.cpan.org/%7Edanberr/:|
 |: 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] Question about migration on KVM/Qemu

2008-09-01 Thread Atsushi SAKAI
Hi, Chris

Thanks for your reply.

Please let me clearify,
You mean oVirt does not support migration at this moment,
Since Migration of KVM/Qemu is not supported on libvirt.

Thanks
Atsushi SAKAI


Chris Lalancette [EMAIL PROTECTED] wrote:

 Atsushi SAKAI wrote:
  Hi,
  
  I have a question about migration on KVM/Qemu.
 From src/qemu_driver.c, domainMigrateX is not defined.
  
  But from news on 0.3.2, KVM migration is supported.
  http://libvirt.org/news.html
  
  Where is the code which performs migration on KVM/Qemu.
 
 Hm, that's a little odd.  As far as I know, KVM migration isn't supported yet.
 
 There are some patches from Rich Jones (that he's posted a few times), but 
 there
 is a bug in upstream KVM that prevents them from working properly.
 Unfortunately, upstream KVM/Qemu have decided to re-do their implementation of
 migration, so we can't commit to Rich Jones' patches until that gets sorted
 upstream.
 
 Chris Lalancette


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


[libvirt] Confirm libvirt supported distro?

2008-09-01 Thread atif bajwa
Hi!

I have a list of Linux distributions with Xen support. Please confirm
libvirt (remote access, = version 0.3.0 ) support.

1. Solaris SPARC 81/9/10
2. Solaris x64/x86 9/10
3. Red Hat RHEL AS/ES/WS 3/4/5
4. Novell SUSE  SLES 8/9/10

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


Re: [libvirt] libvirt vs XenAPI

2008-09-01 Thread atif bajwa
Thanks but does libvirt support windows port with any released build or not?

I am little surprised should be?. I need to make a decision to use libvirt
or Xen API, (clearly runnable from windows) . If libvirt does windows port,
which of the following distributions are supported as remote hosts.

Regards,
Atif

On Mon, Sep 1, 2008 at 1:39 PM, Richard W.M. Jones [EMAIL PROTECTED]wrote:

 On Mon, Sep 01, 2008 at 12:06:07PM +0200, atif bajwa wrote:
  1. Solaris SPARC 81/9/10
  2. Solaris x64/x86 9/10
  3. Red Hat RHEL AS/ES/WS 3/4/5
  4. Novell SUSE  SLES 8/9/10

 Those should all be supported as libvirt clients.

 To address another point, we'll have better support for Windows in
 future (ie. you won't need to build it from source).  The dependency
 is this project: http://fedoraproject.org/wiki/SIGs/MinGW
 See also: http://wiki.libvirt.org/page/TodoWindowsSupport

 Rich.

 --
 Richard Jones, Emerging Technologies, Red Hat
 http://et.redhat.com/~rjones
 virt-df http://et.redhat.com/%7Erjonesvirt-df lists disk usage of guests
 without needing to install any
 software inside the virtual machine.  Supports Linux and Windows.
 http://et.redhat.com/~rjones/virt-df/http://et.redhat.com/%7Erjones/virt-df/

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


Re: [libvirt] libvirt vs XenAPI

2008-09-01 Thread Richard W.M. Jones
On Mon, Sep 01, 2008 at 01:58:09PM +0200, atif bajwa wrote:
 On Mon, Sep 1, 2008 at 1:39 PM, Richard W.M. Jones [EMAIL PROTECTED]wrote:
  To address another point, we'll have better support for Windows in
  future (ie. you won't need to build it from source).  The dependency
  is this project: http://fedoraproject.org/wiki/SIGs/MinGW
  See also: http://wiki.libvirt.org/page/TodoWindowsSupport

 Thanks but does libvirt support windows port with any released build or not?

You can compile libvirt (client only) on Windows -- see Atsushi's
previous email for links to how to do this.

If you follow this link you will see the current status of Windows
builds (ie, binaries that you can download from libvirt.org):
http://wiki.libvirt.org/page/TodoWindowsSupport

  On Mon, Sep 01, 2008 at 12:06:07PM +0200, atif bajwa wrote:
   1. Solaris SPARC 81/9/10
   2. Solaris x64/x86 9/10
   3. Red Hat RHEL AS/ES/WS 3/4/5
   4. Novell SUSE  SLES 8/9/10
 
  Those should all be supported as libvirt clients.

 I am little surprised should be?. I need to make a decision to use libvirt
 or Xen API, (clearly runnable from windows) . If libvirt does windows port,
 which of the following distributions are supported [...]

should be as in, we haven't compiled it on every single one of
those, but since they are all Un*x distributions, there should be no
problem.  If you find a problem, please post about it on the mailing
list.

If you want commercial support, Red Hat support libvirt client 
server on RHEL 5, and I guess we either do now or could in the future
support libvirt client on RHEL 3/4 too (talk to Red Hat sales or your
account manager).  Solaris and SUSE are supported by Sun and Novell
respectively, so you would need to talk to them.

 as remote hosts.

I'm a bit confused by what you mean here though.  For example RHEL 3/4
don't have any support for virtualization of the host, so there
wouldn't be any point in running them as libvirtd servers.  Unless you
are compiling qemu on them or something like that.

Libvirt as a client and libvirt(d) as a server are completely
different things.

Rich.

-- 
Richard Jones, Emerging Technologies, Red Hat  http://et.redhat.com/~rjones
Read my OCaml programming blog: http://camltastic.blogspot.com/
Fedora now supports 64 OCaml packages (the OPEN alternative to F#)
http://cocan.org/getting_started_with_ocaml_on_red_hat_and_fedora

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


Re: [libvirt] libvirt vs XenAPI

2008-09-01 Thread Richard W.M. Jones
On Mon, Sep 01, 2008 at 02:40:38PM +0200, atif bajwa wrote:
 2. List of distributions supported by libvirt as server. The list refers to
 this part of question.

This part doesn't make sense.  There is no hypervisor support in RHEL
3 or 4 (for example) so running libvirtd on RHEL 3 or 4 may be
possible, but would be pointless.

Rich.

-- 
Richard Jones, Emerging Technologies, Red Hat  http://et.redhat.com/~rjones
Read my OCaml programming blog: http://camltastic.blogspot.com/
Fedora now supports 64 OCaml packages (the OPEN alternative to F#)
http://cocan.org/getting_started_with_ocaml_on_red_hat_and_fedora

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


Re: [libvirt] libvirt vs XenAPI

2008-09-01 Thread atif bajwa
Yes, you are correct for RHEL  3 but Xen 3.x is download-able for RHEL 4.1,
4.4, 4.5, 5, 5.1, 5.2 and similarly for Novell SLES 9.2, 9.3, 10, 10 SP1, 10
SP2 and OpenSUSE 10, 10.3, 11

Additionally, I got similar information from Sun xVM Ops Center managed
systems which integrates libvirt.

Regards,
Atif

On Mon, Sep 1, 2008 at 3:10 PM, Richard W.M. Jones [EMAIL PROTECTED]wrote:

 On Mon, Sep 01, 2008 at 02:40:38PM +0200, atif bajwa wrote:
  2. List of distributions supported by libvirt as server. The list refers
 to
  this part of question.

 This part doesn't make sense.  There is no hypervisor support in RHEL
 3 or 4 (for example) so running libvirtd on RHEL 3 or 4 may be
 possible, but would be pointless.

 Rich.

 --
 Richard Jones, Emerging Technologies, Red Hat
 http://et.redhat.com/~rjones http://et.redhat.com/%7Erjones
 Read my OCaml programming blog: http://camltastic.blogspot.com/
 Fedora now supports 64 OCaml packages (the OPEN alternative to F#)
 http://cocan.org/getting_started_with_ocaml_on_red_hat_and_fedora

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


[libvirt] Unable to find node's mem and cpu api

2008-09-01 Thread jovialGuy _
hey,

I am unable to find the api in java and perl binding to find the host node's
current memory and cpu information. Any body has any idea where I can find
the information?

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


[libvirt] PATCH: Only pass in emulator if user requested it

2008-09-01 Thread Daniel P. Berrange
Previouly with Xen we would only specify an emulator path to XenD if there
was one provided in the XML. With the new domain XML routines we will always
lookup the default emulator path internally using our capabilities data.
So XenD sees an explicit emulator path even if the user didn't request one.

This works fine, except for paravirt guests where you only want to have
the text console active, and not the graphical framebuffer. In this 
scenario, XenD starts QEMU-DM to handle the text console, but it crashes
because PVFB isn't configured.

This patch switches us back to the old behaviour where we only pass an
emulator to XenD if the user actually specified one - XenD is intelligent
enough to auto-configure a QEMU instance for paravirt framebuffers as
needed.

The logic looking up the default emulator did live in the generic XML
parsing routines. This patch removes it from the XML parsing stage,
and pushes it down into the individual drivers at time of use (if they
so desire).

 src/domain_conf.c  |   47 +++--
 src/domain_conf.h  |5 ++
 src/lxc_driver.c   |   10 -
 src/qemu_conf.c|6 +++
 src/qemu_driver.c  |   15 +--
 src/xm_internal.c  |   20 --
 tests/xmconfigdata/test-paravirt-net-e1000.xml |1 
 tests/xmconfigdata/test-paravirt-new-pvfb.xml  |1 
 tests/xmconfigdata/test-paravirt-old-pvfb.xml  |1 
 tests/xml2sexprdata/xml2sexpr-fv-kernel.xml|1 
 tests/xml2sexprdata/xml2sexpr-pv-vfb-new.sexpr |2 -
 11 files changed, 62 insertions(+), 47 deletions(-)

Daniel

diff -r d1308575c2d3 src/domain_conf.c
--- a/src/domain_conf.c Mon Sep 01 14:48:19 2008 +0100
+++ b/src/domain_conf.c Mon Sep 01 15:00:46 2008 +0100
@@ -1917,24 +1917,6 @@ static virDomainDefPtr virDomainDefParse
 }
 
 def-emulator = virXPathString(conn, string(./devices/emulator[1]), 
ctxt);
-if (!def-emulator) {
-const char *type = virDomainVirtTypeToString(def-virtType);
-if (!type) {
-virDomainReportError(conn, VIR_ERR_INTERNAL_ERROR,
- %s, _(unknown virt type));
-goto error;
-}
-const char *emulator = virCapabilitiesDefaultGuestEmulator(caps,
-   
def-os.type,
-   
def-os.arch,
-   type);
-
-if (emulator 
-!(def-emulator = strdup(emulator))) {
-virDomainReportError(conn, VIR_ERR_NO_MEMORY, NULL);
-goto error;
-}
-}
 
 /* analysis of the disk devices */
 if ((n = virXPathNodeSet(conn, ./devices/disk, ctxt, nodes))  0) {
@@ -3404,4 +3386,33 @@ char *virDomainConfigFile(virConnectPtr 
 }
 
 
+const char *virDomainDefDefaultEmulator(virConnectPtr conn,
+virDomainDefPtr def,
+virCapsPtr caps) {
+const char *type;
+const char *emulator;
+
+type = virDomainVirtTypeToString(def-virtType);
+if (!type) {
+virDomainReportError(conn, VIR_ERR_INTERNAL_ERROR,
+ %s, _(unknown virt type));
+return NULL;
+}
+
+emulator = virCapabilitiesDefaultGuestEmulator(caps,
+   def-os.type,
+   def-os.arch,
+   type);
+
+if (!emulator) {
+virDomainReportError(conn, VIR_ERR_INTERNAL_ERROR,
+ _(no emulator for domain %s os type %s on 
architecture %s),
+ type, def-os.type, def-os.arch);
+return NULL;
+}
+
+return emulator;
+}
+
+
 #endif /* ! PROXY */
diff -r d1308575c2d3 src/domain_conf.h
--- a/src/domain_conf.h Mon Sep 01 14:48:19 2008 +0100
+++ b/src/domain_conf.h Mon Sep 01 15:00:57 2008 +0100
@@ -556,6 +556,11 @@ virDomainNetDefPtr virDomainNetDefParseX
 virDomainNetDefPtr virDomainNetDefParseXML(virConnectPtr conn,
 xmlNodePtr node);
 
+const char *virDomainDefDefaultEmulator(virConnectPtr conn,
+virDomainDefPtr def,
+virCapsPtr caps);
+
+
 VIR_ENUM_DECL(virDomainVirt)
 VIR_ENUM_DECL(virDomainBoot)
 VIR_ENUM_DECL(virDomainFeature)
diff -r d1308575c2d3 src/lxc_driver.c
--- a/src/lxc_driver.c  Mon Sep 01 14:48:19 2008 +0100
+++ b/src/lxc_driver.c  Mon Sep 01 15:12:34 2008 +0100
@@ -623,6 +623,8 @@ static int lxcControllerStart(virConnect
 int status;
 fd_set keepfd;
 char appPtyStr[30];
+const char *emulator;
+lxc_driver_t *driver = conn-privateData;
 
 FD_ZERO(keepfd);
 
@@ -650,7 +652,13 @@ 

Re: [libvirt] Unable to find node's mem and cpu api

2008-09-01 Thread Richard W.M. Jones
On Mon, Sep 01, 2008 at 04:54:04PM +0200, jovialGuy _ wrote:
 I am unable to find the api in java and perl binding to find the host node's
 current memory and cpu information. Any body has any idea where I can find
 the information?

I'm not certain about whether the Java  Perl bindings support them,
but these are the calls you should use:

http://libvirt.org/html/libvirt-libvirt.html#virNodeGetInfo
http://libvirt.org/html/libvirt-libvirt.html#virNodeGetCellsFreeMemory
http://libvirt.org/html/libvirt-libvirt.html#virNodeGetFreeMemory

For CPU usage of the host, libvirt doesn't specifically provide that
information.  If the hypervisor is Xen, then you can get information
about CPU usage of Dom0 (usually what is meant by the host) using:

http://libvirt.org/html/libvirt-libvirt.html#virDomainGetInfo

but that won't work for QEMU/KVM where the host node is just the
Linux kernel.  (In the local case, you can extract that information
you need just by looking in /proc or using ordinary Linux tools).

Also read this: http://et.redhat.com/~rjones/virt-top/faq.html#calccpu

Rich.

-- 
Richard Jones, Emerging Technologies, Red Hat  http://et.redhat.com/~rjones
virt-top is 'top' for virtual machines.  Tiny program with many
powerful monitoring features, net stats, disk stats, logging, etc.
http://et.redhat.com/~rjones/virt-top

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


Re: [libvirt] Unable to find node's mem and cpu api

2008-09-01 Thread jovialGuy _
Great!

I have Xen hypervisor. Can I can memory information from domain 0 instance
as well.  How to get physical utilization of each CPU attached  to host? I
know this is being handled in virt-top but how?

- Jovial

On Mon, Sep 1, 2008 at 5:04 PM, Richard W.M. Jones [EMAIL PROTECTED]wrote:

 On Mon, Sep 01, 2008 at 04:54:04PM +0200, jovialGuy _ wrote:
  I am unable to find the api in java and perl binding to find the host
 node's
  current memory and cpu information. Any body has any idea where I can
 find
  the information?

 I'm not certain about whether the Java  Perl bindings support them,
 but these are the calls you should use:

 http://libvirt.org/html/libvirt-libvirt.html#virNodeGetInfo
 http://libvirt.org/html/libvirt-libvirt.html#virNodeGetCellsFreeMemory
 http://libvirt.org/html/libvirt-libvirt.html#virNodeGetFreeMemory

 For CPU usage of the host, libvirt doesn't specifically provide that
 information.  If the hypervisor is Xen, then you can get information
 about CPU usage of Dom0 (usually what is meant by the host) using:

 http://libvirt.org/html/libvirt-libvirt.html#virDomainGetInfo

 but that won't work for QEMU/KVM where the host node is just the
 Linux kernel.  (In the local case, you can extract that information
 you need just by looking in /proc or using ordinary Linux tools).

 Also read this: 
 http://et.redhat.com/~rjones/virt-top/faq.html#calccpuhttp://et.redhat.com/%7Erjones/virt-top/faq.html#calccpu

 Rich.

 --
 Richard Jones, Emerging Technologies, Red Hat
 http://et.redhat.com/~rjones
 virt-top http://et.redhat.com/%7Erjonesvirt-top is 'top' for virtual
 machines.  Tiny program with many
 powerful monitoring features, net stats, disk stats, logging, etc.
 http://et.redhat.com/~rjones/virt-tophttp://et.redhat.com/%7Erjones/virt-top

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


Re: [libvirt] Unable to find node's mem and cpu api

2008-09-01 Thread Richard W.M. Jones
On Mon, Sep 01, 2008 at 05:26:28PM +0200, jovialGuy _ wrote:
 I have Xen hypervisor. Can I can memory information from domain 0 instance
 as well.

Yes, although because of the Xen model where dom0 is just a special
guest, the amount of memory used by dom0 isn't indicative of the
amount of memory available for new guests.  Only the hypervisor knows
that, and we don't expose it through libvirt [1].

 How to get physical utilization of each CPU attached  to host? I
 know this is being handled in virt-top but how?

It's really really complicated.  I could explain it here, but that
would amount to an imprecise description of what is precisely
described in the virt-top code itself.  So you're better off just
going and reading that code to find out how to do it.

http://hg.et.redhat.com/virt/applications/virt-top--devel/?f=ab5dd3923798;file=virt-top/virt_top.ml
lines 595--678.

See also the virt-top FAQ:
http://et.redhat.com/~rjones/virt-top/faq.html

Rich.

[1] AFAIK -- perhaps we do through the NUMA calls?

-- 
Richard Jones, Emerging Technologies, Red Hat  http://et.redhat.com/~rjones
Read my OCaml programming blog: http://camltastic.blogspot.com/
Fedora now supports 64 OCaml packages (the OPEN alternative to F#)
http://cocan.org/getting_started_with_ocaml_on_red_hat_and_fedora

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