What is the current state of VM guest creation/modification, storage pools, and metrics in Libvirt-CIM?

Hi, We have been looking into what some of the Libvirt-CIM wholes might be for our needs and possibly how we can help close some of those wholes. I recently sat in on Dan Smiths presentation on the Libvirt-CIM and need a little bit of clarification.
From Dan's presentation it sounds like the ability to create a VM configuration (currently we are most interested in Xen) already exists. Can someone help me understand what that looks like right now? I presume it involves something like establishing a configuration, adding components to it (such as memory, CPUs, storage, network, etc.), posting that configuration to host (the xenstore for Xen?), then starting the VM guest. Does this include configuring to boot from install media? How about configuring for a network boot from which to do an install? Does this interface also support modifying this configuration, either live or off-line? Is there mechanism to validate new configurations before committing them?
Another aspect Dan talked about was Resource Pools. I realize there is work going on to enhance Resource Pools. Is the current implementation of Resource Pools limited to storage pools? What type of storage is supported (iSCSI, NFS, Fibrechannel?, etc.)? An area we are looking to help augment is around guest metrics, at least those that can be collected from the host. Of particular interest are counters. Is there anyone currently working on this that I should collaborate with? I am beginning to dig into the code but I could use some quick answers. Thanks for the help. Dayne Medlyn Software Engineer Hewlett Packard

Medlyn, Dayne (VSL - Ft Collins) wrote:
Hi,
Hi Dayne, welcome to the list.
We have been looking into what some of the Libvirt-CIM wholes might be for our needs and possibly how we can help close some of those wholes. I recently sat in on Dan Smiths presentation on the Libvirt-CIM and need a little bit of clarification.
From Dan's presentation it sounds like the ability to create a VM configuration (currently we are most interested in Xen) already exists. Can someone help me understand what that looks like right now? I presume it involves something like establishing a
configuration, adding components to it (such as memory, CPUs, storage, network, etc.), posting that configuration to host (the xenstore for Xen?), then starting the VM guest.
The define procedure is done using the DefineSystem() call of the Virt_VirtualSystemManagementService provider. The DefineSystem() call takes the following parameters: SystemSettings - an instance of the Xen_VirtualSystemSettingData class ResourceSettings - an array of Xen_ResourceAllocationSettingData (RASDs) instances ReferenceConfiguration - a reference to an existing Xen_VirtualSystemSettingData instance The RASDs represent the various resources (disk, CPU, etc) you would like your guest to have. The provider then generates an XML that it passes to libvirt, and libvirt handles defining the guest. The libvirt-cim providers don't talk to the Xen components directly; everything is handled through libvirt.
Does this include configuring to boot from install media? How about configuring for a network boot from which to do an install?
With fully virtualized Xen guests, you can specify the "BootDevice" attribute of the Xen_VirtualSystemSettingData instance that is passed in for the SystemSettings parameter. The available options are "fd", "hd", "cdrom" or "network". For paravirtualized guests, the "Bootloader" and "BootloaderArgs" are used to specify which bootloader to use and what arguments to pass. For more info: http://libvirt.org/formatdomain.html#elementsOS
Does this interface also support modifying this configuration, either live or off-line?
Yes, you can add/remove/modify resources of a guest while it is running or while it is offline - as supported by the underlying virtualization platform (Xen, KVM, etc).
Is there mechanism to validate new configurations before committing them?
We don't do any validation as such. The DefineSystem() call tells libvirt to define a guest with the specified options. If libvirt is unable to define the guest, we return an error to the user accordingly.
Another aspect Dan talked about was Resource Pools. I realize there is work going on to enhance Resource Pools. Is the current implementation of Resource Pools limited to storage pools? What type of storage is supported (iSCSI, NFS, Fibrechannel?, etc.)?
We currently represent the following pools: disk, network, processor, memory, graphics device, and input device pools. Only disk and network represent actual virtual pools (as defined by libvirt). Libvirt supports the following storage types: dir, fs,netfs,disk,iscsi, logical. All of these pools show up as an instance of the DiskPool class. libvirt-cim doesn't currently support creation/deletion/modification of pools, so a user must create a pool using libvirt tools. Once the pool has been created, libvirt-cim will generate and instance of the DiskPool class to represent that pool. More info on libvirt storage pools: http://libvirt.org/formatstorage.html
An area we are looking to help augment is around guest metrics, at least those that can be collected from the host. Of particular interest are counters. Is there anyone currently working on this that I should collaborate with?
No one is currently working on metrics. There was some prior work done with Xen metrics for the sblim data-gatherer. I'm not sure the current status of these plugins though. We definitely haven't given it much thought as to whether it would be better to work with the existing data-gatherer framework, or if it would be better to develop a set of metrics providers for the libvirt-cim project itself. This is definitely a good topic for additional discussion =) -- Kaitlin Rupert IBM Linux Technology Center kaitlin@linux.vnet.ibm.com

Kaitlan
The define procedure is done using the DefineSystem() call of the Virt_VirtualSystemManagementService provider. The DefineSystem() call takes the following parameters:
SystemSettings - an instance of the Xen_VirtualSystemSettingData class ResourceSettings - an array of Xen_ResourceAllocationSettingData (RASDs) instances ReferenceConfiguration - a reference to an existing Xen_VirtualSystemSettingData instance
The RASDs represent the various resources (disk, CPU, etc) you would like your guest to have.
The provider then generates an XML that it passes to libvirt, and libvirt handles defining the guest. The libvirt-cim providers don't talk to the Xen components directly; everything is handled through libvirt.
This sounds as if it is just what we are looking for . Thanks for the detail.
Does this include configuring to boot from install media? How about configuring for a network boot from which to do an install?
With fully virtualized Xen guests, you can specify the "BootDevice" attribute of the Xen_VirtualSystemSettingData instance that is passed in for the SystemSettings parameter. The available options are "fd", "hd", "cdrom" or "network".
For paravirtualized guests, the "Bootloader" and "BootloaderArgs" are used to specify which bootloader to use and what arguments to pass.
For more info: http://libvirt.org/formatdomain.html#elementsOS
I am still a little fuzzy on network booting a paravirt guest, but I believe the details will come out as we get a bit further.
Does this interface also support modifying this configuration, either live or off-line?
Yes, you can add/remove/modify resources of a guest while it is running or while it is offline - as supported by the underlying virtualization platform (Xen, KVM, etc).
Great!
Is there mechanism to validate new configurations before committing them?
We don't do any validation as such. The DefineSystem() call tells libvirt to define a guest with the specified options. If libvirt is unable to define the guest, we return an error to the user accordingly.
This seems pretty reasonable.
Another aspect Dan talked about was Resource Pools. I realize there is work going on to enhance Resource Pools. Is the current implementation of Resource Pools limited to storage pools? What type of storage is supported (iSCSI, NFS, Fibrechannel?, etc.)?
We currently represent the following pools: disk, network, processor, memory, graphics device, and input device pools. Only disk and network represent actual virtual pools (as defined by libvirt).
Libvirt supports the following storage types: dir, fs,netfs,disk,iscsi, logical. All of these pools show up as an instance of the DiskPool class.
libvirt-cim doesn't currently support creation/deletion/modification of pools, so a user must create a pool using libvirt tools. Once the pool has been created, libvirt-cim will generate and instance of the DiskPool class to represent that pool.
More info on libvirt storage pools: http://libvirt.org/formatstorage.html
Thanks again for the detail.
An area we are looking to help augment is around guest metrics, at least those that can be collected from the host. Of particular interest are counters. Is there anyone currently working on this that I should collaborate with?
No one is currently working on metrics. There was some prior work done with Xen metrics for the sblim data-gatherer. I'm not sure the current status of these plugins though.
We definitely haven't given it much thought as to whether it would be better to work with the existing data-gatherer framework, or if it would be better to develop a set of metrics providers for the libvirt-cim project itself. This is definitely a good topic for additional discussion =)
This is what I had come to understand. As we get a little farther we will make some proposals and see how the rest of the community feels about them. Basically, I see a need for some sort of marriage between Libvirt-CIM and possible the sblim data-gatherer. Libvirt-CIM may need to gather the guest data from the host, but feed it to the sblim data-gatherer for consumption. This will take a bit more thought though. Dan suggested something similar. One more question. Daniel Veillard mentioned someone may be working on VM cloning capability. Do you know any details about it or who might be working on it? Thanks again for all your help. Dayne

DM> I am still a little fuzzy on network booting a paravirt guest, but DM> I believe the details will come out as we get a bit further. I would imagine it would be done via some cheating in dom0, which would fake the PXE client action, download the kernel and ramdisk as specified and then launch the guest out of body (i.e. without a bootloader). DM> This is what I had come to understand. As we get a little farther DM> we will make some proposals and see how the rest of the community DM> feels about them. Basically, I see a need for some sort of DM> marriage between Libvirt-CIM and possible the sblim data-gatherer. DM> Libvirt-CIM may need to gather the guest data from the host, but DM> feed it to the sblim data-gatherer for consumption. This will DM> take a bit more thought though. Dan suggested something similar. I'm not really familiar with either (a) the implementation of the data gatherer or (b) the profiles and classes needed to support metrics for a CIM client. Regarding the former, I would hope that the modules in the data gatherer can be loaded as dynamic plugins, which would mean that we could implement and maintain a data gatherer plugin in the libvirt-cim tree, and "marry" it to some of our other infrastructure. We would install it in the proper location on a system when libvirt-cim is installed, and the data gatherer would start to expose those bits. Regarding the latter, we could just implement the metrics ourselves as regular providers and not be dependent on the data gatherer at all. As always, I'd be hesitant to do something other than use a pre-existing framework for something like that, so we'd need to come up with a good justification for going this route. DM> One more question. Daniel Veillard mentioned someone may be DM> working on VM cloning capability. Do you know any details about DM> it or who might be working on it? I'm not sure what you mean exactly, which probably means my answer to your question is "no" :)... However, you should probably ask the libvirt mailing list[1]. Thanks! 1: https://www.redhat.com/mailman/listinfo/libvir-list -- Dan Smith IBM Linux Technology Center email: danms@us.ibm.com
participants (3)
-
Dan Smith
-
Kaitlin Rupert
-
Medlyn, Dayne (VSL - Ft Collins)