Re: [libvirt] Adding VirtualBox support to libvirt

2009-02-26 Thread Pritesh Kothari
Hi, As mentioned in the earlier mail, I have started the work on adding Virtualbox support to libvirt. I have completed almost all the basic functionality. Currently I can start, shutdown, reboot, list and suspend/resume the domains. Now I am in the process writing code for creating/defining

Re: [libvirt] Adding VirtualBox support to libvirt

2009-02-26 Thread Daniel P. Berrange
On Thu, Feb 26, 2009 at 03:26:34PM +0100, Pritesh Kothari wrote: Hi, As mentioned in the earlier mail, I have started the work on adding Virtualbox support to libvirt. I have completed almost all the basic functionality. Currently I can start, shutdown, reboot, list and suspend/resume

Re: [libvirt] Adding VirtualBox support to libvirt

2009-02-26 Thread John Levon
On Thu, Feb 26, 2009 at 03:26:34PM +0100, Pritesh Kothari wrote: Is the XML format for defining the Domains common to all the hypervisors? If not then how should I start about defining it for Virtualbox? Hi Pritesh. The XML format is not exactly the same between the hypervisors, but large

Re: [libvirt] Adding VirtualBox support to libvirt

2009-02-26 Thread Pritesh Kothari
Hi Daniel, As of 0.6.0, the libvirtd daemon is fully multi-threaded. This means that many API calls can be using your driver concurrently. So every driver API call you have (ie those registered in the 'virDriver' struct must use one or more mutexs to ensure safe access to internal state.

Re: [libvirt] Adding VirtualBox support to libvirt

2009-02-26 Thread Pritesh Kothari
Hi John, Generally, if you can, use the generic parts. If you need to specify something specific to VBox you have three options: 1. work out a hypervisor-agnostic abstraction for what you're trying to define (preferred), then use that 1. define a vbox-specific ref as you above 2. if it's

Re: [libvirt] Adding VirtualBox support to libvirt

2009-02-26 Thread Daniel P. Berrange
On Thu, Feb 26, 2009 at 05:20:55PM +0100, Pritesh Kothari wrote: Hi John, Generally, if you can, use the generic parts. If you need to specify something specific to VBox you have three options: 1. work out a hypervisor-agnostic abstraction for what you're trying to define (preferred),

Re: [libvirt] Adding VirtualBox support to libvirt

2009-02-26 Thread John Levon
On Thu, Feb 26, 2009 at 05:20:55PM +0100, Pritesh Kothari wrote: What exactly does the tag os_typexen/os_type exactly mean? how can xen, hvm, etc be an os type? It's a horrible wart. OS type really means v12n method, and it means either paravirt or HVM here. Presumably vbox wouldn't

Re: [libvirt] Adding VirtualBox support to libvirt

2009-02-26 Thread John Levon
On Thu, Feb 26, 2009 at 05:00:47PM +0100, Pritesh Kothari wrote: I think it depends on exactly how you are doing it - best to just post the patches and we can discuss whether it looks reasonable then. Why did you dlopen() instead of just linking to it directly ? Basically my code depends

Re: [libvirt] Adding VirtualBox support to libvirt

2009-02-26 Thread Daniel P. Berrange
On Thu, Feb 26, 2009 at 11:52:18AM -0500, John Levon wrote: On Thu, Feb 26, 2009 at 05:00:47PM +0100, Pritesh Kothari wrote: I think it depends on exactly how you are doing it - best to just post the patches and we can discuss whether it looks reasonable then. Why did you dlopen()

[libvirt] Adding VirtualBox support to libvirt

2008-12-03 Thread Pritesh Kothari
Hi, I am in the process of adding support for virtualbox in libvirt. Basically Virtualbox exports its API through XPCOM. Now to simplify things I was thinking of using C++ and already existing xpcom component in virtualbox but since libvirt exports C API i am not sure if i should use C

Re: [libvirt] Adding VirtualBox support to libvirt

2008-12-03 Thread Daniel Veillard
On Wed, Dec 03, 2008 at 02:20:44PM +0100, Pritesh Kothari wrote: Hi, I am in the process of adding support for virtualbox in libvirt. Basically Virtualbox exports its API through XPCOM. Now to simplify things I was thinking of using C++ and already existing xpcom component in virtualbox