[libvirt] How to clone a domain using Java API?

2010-07-08 Thread Ganesh Pagade
Couldn't find any Java API or even any function in libvirt documentation:
http://libvirt.org/html/libvirt-libvirt.html
In case there is no API present can someone please point how this can be
achieved using existing Java APIs to get the same behavior as virt-clone?

Thanks,
-Ganesh
--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] Alternative to XML Creation and Parsing?

2010-05-04 Thread Ganesh Pagade
Resending, as the previous one hasn't appeared after waiting for more than a
day. My apologies if this is duplicate.

Hello,

We plan to develop a fancy GUI which would help creating and managing
VMs/Domains for RHEL 5.4 KVM.

However looking at the schemas provided in docs/schemas/ (Ex:
domain.rng) generating
the XML file from the inputs taken from the GUI and pass it on to
virDomainDefineXML() turns out to be a huge tasks in itself. I was wondering
if there is an better way for me to provide my configurations to the library
and also to read data from it (instead of creating, parsing XMLs)? If an
alternate approach exist, are there any limitations with it?

Also the schema given in docs/schemas/ would be generic for all hyper visor.
How can I identify the tags applicable only for a particular hyper visor?

I found:
virConnectDomainXMLFromNative(virConnectPtr conn, const char * nativeFormat,
const char * nativeConfig, unsigned int flags)

in API reference, which could solve my first problem but couldn't figure out
what nativeFormat would be.

Any inputs/pointers would be highly appreciated.

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

[libvirt] Alternative to XML Creation and Parsing?

2010-05-03 Thread Ganesh Pagade
Hello,

We plan to develop a fancy GUI which would help creating and managing
VMs/Domains for RHEL 5.4 KVM.

However looking at the schemas provided in docs/schemas/ (Ex:
domain.rng) generating
the XML file from the inputs taken from the GUI and pass it on to
virDomainDefineXML() turns out to be a huge tasks in itself. I was wondering
if there is an better way for me to provide my configurations to the library
and also to read data from it (instead of creating, parsing XMLs)? If an
alternate approach exist, are there any limitations with it?

Also the schema given in docs/schemas/ would be generic for all hyper visor.
How can I identify the tags applicable only for a particular hyper visor?

I found:
virConnectDomainXMLFromNative(virConnectPtr conn, const char * nativeFormat,
const char * nativeConfig, unsigned int flags)

in API reference, which could solve my first problem but couldn't figure out
what nativeFormat would be.

Any inputs/pointers would be highly appreciated.

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

Re: [libvirt] hellolibvirt: no hypervisor driver available for xen:///

2010-04-14 Thread Ganesh Pagade
Thanks Daniel. After installing xen-devel and rebuilding libvirt, the sample
program worked.

-Ganesh

On Wed, Apr 14, 2010 at 2:48 PM, Daniel P. Berrange berra...@redhat.comwrote:

 On Tue, Apr 13, 2010 at 11:37:01PM +0530, Ganesh Pagade wrote:
  Hi,
 
  I downloaded and built the latest libvirt source code 0.8. I installed
 the
  library in a custom directory libvirt-0.8.0-install/ keeping all other
  configurations default.
 
  After this I tried to execute the example hellolibvirt:
 
  [hellolibvirt]# ./hellolibvirt xen
  Attempting to connect to hypervisor
  libvir: Remote error : unable to connect to
  '/root/ganeshp/libvirt-0.8.0-install/var/run/libvirt/libvirt-sock',
 libvirtd
  may need to be started: Connection refused
  No connection to hypervisor
  Parameter error when attempting to get last error
 
  My libvirtd was running from /etc/init.d/libvirtd. Still why is it trying
 to
  connect to the newly built libvirtd?
 
  I stopped the /etc/init.d/libvirtd and started my newly built daemon:
  [hellolibvirt]# /root/ganeshp/libvirt-0.8.0-install/sbin/libvirtd start 
  04:47:07.534: warning : qemudStartup:1574 : Unable to create cgroup for
  driver: No such device or address
  04:47:07.540: error : parse_socket:126 : cannot open
  /sys/devices/system/cpu/cpu1/topology/physical_package_id: No such file
 or
  directory
  04:47:07.540: warning : qemudCapsInit:1068 : Failed to get host CPU
  04:47:07.544: warning : lxcStartup:1835 : Unable to create cgroup for
  driver: No such device or address
 
  After this I tried running hellolibvirt example again:
  [hellolibvirt]# ./hellolibvirt xen
  Attempting to connect to hypervisor
  04:48:43.166: error : virLibConnError:450 : no hypervisor driver
 available
  for xen:///
  libvir: error : no hypervisor driver available for xen:///
  libvir: error : no hypervisor driver available for xen:///

 This means you have built libvirt without Xen support. It should have told
 you after you ran 'configure' which drivers were enabled.

 Daniel
 --
 |: Red Hat, Engineering, London-o-
 http://people.redhat.com/berrange/ :|
 |: http://libvirt.org -o- http://virt-manager.org -o-
 http://deltacloud.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] hellolibvirt: no hypervisor driver available for xen:///

2010-04-13 Thread Ganesh Pagade
Hi,

I downloaded and built the latest libvirt source code 0.8. I installed the
library in a custom directory libvirt-0.8.0-install/ keeping all other
configurations default.

After this I tried to execute the example hellolibvirt:

[hellolibvirt]# ./hellolibvirt xen
Attempting to connect to hypervisor
libvir: Remote error : unable to connect to
'/root/ganeshp/libvirt-0.8.0-install/var/run/libvirt/libvirt-sock', libvirtd
may need to be started: Connection refused
No connection to hypervisor
Parameter error when attempting to get last error

My libvirtd was running from /etc/init.d/libvirtd. Still why is it trying to
connect to the newly built libvirtd?

I stopped the /etc/init.d/libvirtd and started my newly built daemon:
[hellolibvirt]# /root/ganeshp/libvirt-0.8.0-install/sbin/libvirtd start 
04:47:07.534: warning : qemudStartup:1574 : Unable to create cgroup for
driver: No such device or address
04:47:07.540: error : parse_socket:126 : cannot open
/sys/devices/system/cpu/cpu1/topology/physical_package_id: No such file or
directory
04:47:07.540: warning : qemudCapsInit:1068 : Failed to get host CPU
04:47:07.544: warning : lxcStartup:1835 : Unable to create cgroup for
driver: No such device or address

After this I tried running hellolibvirt example again:
[hellolibvirt]# ./hellolibvirt xen
Attempting to connect to hypervisor
04:48:43.166: error : virLibConnError:450 : no hypervisor driver available
for xen:///
libvir: error : no hypervisor driver available for xen:///
libvir: error : no hypervisor driver available for xen:///
No connection to hypervisor
Parameter error when attempting to get last error

I do not understand why the program is not able to find the xen driver. I am
able to launch VMM GUI and create VMs using xen connection. The system
already has xen hypervisor (3.1.0).

Even the newly built virsh gives similar errors. Whereas /usr/bin/virsh
works perfectly fine.

Am I missing some configuration or dependency? Any pointers/suggestion would
greatly help. Thanks.

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

[libvirt] libvirt: C++ or Java?

2010-04-11 Thread Ganesh Pagade
Hello,

I am planning to develop a management application for managing Redhat Xen
and Redhat KVM hypervisors. I am evaluating the Java bindings versus the C++
version of libvirt. As part of evaluation, I could not find meaningful
answers to the questions below. Hence, I thought that people on this mailing
list would be the most appropriate to comment on them. Can you please let me
know your views?

1. Are all functions that are available in C API available in Java?
2. Are Java bindings added along with every enhancement to C API?
3. If answer to above question is negative, typically how long does it takes
for the addition of Java bindings for the enhancement?
4. Most of libvirt based third party management applications use which of
Java bindings or C API?
5. What are your good/bad experiences while using either of C API or Java
bindings?
6. What is your concluding personal recommendation?

And finally, since libvirt is a Redhat Emerging Technology project, does
Redhat or any other third party service providers provide paid assistance,
support?

Appreciate your time. Thanks.

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