Libvirt for LDoms (Logical Domains) support =========================================== ARC Exposure: open 1. Background The Libvirt for LDoms software to provide libvirt interfaces for LDoms hypervisor was already released at Sun Download Center [1]. The LDoms support was added to libvirt version 0.3.2 and virtinst version 0.103.0, and was released as the Solaris 10 packages to support LDoms 1.0.1 and 1.0.2. This fast-track RFE will add the same LDoms support to libvirt version 0.4.0 which was put back to the Nevada xVM gate with Xen 3.1.2 and virtinst version 0.300.1 which will be put back soon. The purpose of this RFE is to provide the Libvirt for LDoms support for use in Open Solaris environment and will be put back to the Nevada xVM gate. It is not targeting an S10 putback. It is just targeting for the Nevada xVM gate (/ws/xvm-gate) for use in Open Solaris environment. [1] - Libvirt for LDoms 1.0.1 is available for customer download at: http://www.sun.com/servers/coolthreads/ldoms/get.jsp Please see the References section below for the available documentation for Libvirt for LDoms 1.0.1. 2. Overview Libvirt is an open source management library that interacts with virtualization capabilities. The libvirt for LDoms software will add the LDoms driver as a supported hypervisor in the libvirt driver system. With the LDoms support, the libvirt library will interact with the LDoms Manager software via its XML-based control interface to retrieve the LDoms data or request CPU/memory resource updates. It will also support some lifecycle commands (such as create, start, destroy, ..etc) on the guest domain. virsh is included in libvirt. virsh is built on top of libvirt and allows a user to interact with the hypervisor and guest domains. With the LDoms support, a user can run virsh to interact with the LDoms hypervisor as below: /usr/bin/virsh -c ldoms:///default virt-install will allow a user to install a guest operating system on LDoms system: /usr/sbin/virt-install --connect=ldoms:///default 3. Library Interfaces The LDoms Manager provides a command-line interface and also exports a XML based control interface. The libvirt LDoms driver will use this XML interface to communicate with the LDoms Manager to retrieve the LDoms data and request the CPU/memory resource updates or LDoms life cycle actions. The current (version 1.0.1 and 1.0.2) LDoms Manager's XML interface is using the socket connection. ---------------------------------------------------------------------------- | Imported Interface | Stability | Comments | +-----------------------------+-----------------+--------------------------+ | LDoms Manager 1.0.1/1.0.2 | Consolidation | LDoms Libvirt bundled with| | XML/CLI interfaces | Private | LDoms Manager | +-----------------------------+-------------------------+------------------+ ---------------------------------------------------------------------------- | exported Interface | Stability | Comments | +-------------------------------+---------------------+--------------------+ | libvirt/virsh | Volatile | Updated to support | | | | LDoms | +-------------------------------+---------------------+--------------------+ | virt-install | Volatile | Updated to support | | | | LDoms | +-------------------------------+---------------------+--------------------+ 4. Supported virsh Commands The following virsh commands will be supported for LDoms. help print help console connect to the guest console create create a domain from an XML file start start an inactive or bound domain destroy destroy a domain define define (but don't start) a domain from an XML file domid convert a domain name or UUID to domain id domuuid convert a domain name or id to domain UUID dominfo domain information domname convert a domain id or UUID to domain name domstate domain state dumpxml domain information in XML hostname print the hypervisor hostname list list domains nodeinfo node information quit quit this interactive terminal shutdown gracefully shutdown a domain setmem change memory allocation setvcpus change number of virtual CPUs undefine undefine an inactive domain vcpuinfo domain vcpu information version show version 5. Supported virt-install Options The following virt-install options will be supported for LDoms. -n NAME, --name=NAME Name of the guest instance -r MEMORY, --ram=MEMORY Memory to allocate for guest instance --vcpus=VCPUS Number of vcpus to configure for your guest --check-cpu Check that vcpus do not exceed physical CPUs -f DISKFILE, --file=DISKFILE File to use as the disk image -s DISKSIZE, --file-size=DISKSIZE Size of the disk image -m MAC, --mac=MAC Fixed MAC address for the guest --connect=CONNECT Connect to hypervisor with URI -d, --debug Print debugging information -h, --help show help message 6. Deliverables The following files will be updated to support the LDoms usr/bin/virsh usr/include/libvirt/libvirt.h usr/include/libvirt/virterror.h usr/lib/libvirt.so.0.4.0 usr/lib/python2.4/vendor-packages/libvirt.py usr/lib/python2.4/vendor-packages/libvirtmod.so usr/sbin/virt-install 7. References PSARC/2007/157 libvirt - a LGPL library to control guest domains PSARC/2008/165 xVM Hypervisor Remote Access (includes Xen 3.1.2/libvirt 0.4.0 putback) Libvirt for LDoms 1.0.1 Functional Spec: http://sunwebcollab.east.sun.com/gm/folder-1.11.1727657 Libvirt for LDoms 1.0.1 Admin Guide: http://docs.sun.com/app/docs/doc/820-3838-10 Note: This Admin guide is for LDoms Libvirt. For more general Libvirt info, please refer to the open source web site: http://libvirt.org/