Index: docs/api.html.in =================================================================== RCS file: docs/api.html.in diff -N docs/api.html.in --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ docs/api.html.in 14 Apr 2009 13:34:06 -0000 @@ -0,0 +1,136 @@ + + + +

The libvirt API concepts

+ +

This page describes the main principles and architecture choices + behind the definition of the libvirt API: +

+

Objects exposed

+

As defined in the goals section, libvirt + API need to expose all the resources needed to manage the virtualization + support of recent operating systems. The first object manipulated though + the API is virConnectPtr which represent a connection to + an hypervisor. Any application using libvirt is likely to start using the + API by calling one of the virConnectOpen functions. You will note that those functions take + a name argument which is actually an URI to select the right hypervisor to + open, this is needed to allow remote connections and also select between + different possible hypervisors (for example on a Linux system it may be + possible to use both KVM and LinuxContainers on the same node). A NULL + name will default to a preselected hypervisor but it's probably not a + wise thing to do in most cases. See the connection + URI page for a full descriptions of the values allowed.

+

Once the application obtained a virConnectPtr + connection to the + hypervisor it can then use it to manage domains and related resources + available for virtualization like storage and networking. All those are + exposed as first class objects, and connected to the hypervisor connection + (and the node or cluster where it is available).

+

+ first class objects exposed by the API +

+

The figure above shows the five main objects exported by the API:

+ +

Most object manipulated by the library can also be represented using + XML descriptions. This is used primarily to create those object, but is + also helpful to modify or save their description back.

+

Domains, network and storage pools can be either active + i.e. either running or available for immediate use, or + defined in which case they are inactive but there is + a permanent definition available in the system for them. Based on this + thay can be activated dynamically in order to be used.

+

Most kind of object can also be named in various ways:

+

+ +

Functions and naming + conventions

+

The naming of the functions present in the library is usually + made of a prefix describing the object associated to the function + and a verb describing the action on that object.

+

For each first class object you will find apis + for the following actions:

+ +

For more in-depth details of the storage related APIs see + the storage management page, +

The libvirt drivers

+

+

+ The libvirt driver architecture +

+

Daemon and remote access

+

+

+ The libvirt daemon and remote architecture +

+ + Index: docs/api.html =================================================================== RCS file: docs/api.html diff -N docs/api.html --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ docs/api.html 14 Apr 2009 13:34:06 -0000 @@ -0,0 +1,242 @@ + + + + + + + + + libvirt: The libvirt API concepts + + + + +
+ +
+

The libvirt API concepts

+

This page describes the main principles and architecture choices + behind the definition of the libvirt API: +

+ +

+ Objects exposed +

+

As defined in the goals section, libvirt + API need to expose all the resources needed to manage the virtualization + support of recent operating systems. The first object manipulated though + the API is virConnectPtr which represent a connection to + an hypervisor. Any application using libvirt is likely to start using the + API by calling one of the virConnectOpen functions. You will note that those functions take + a name argument which is actually an URI to select the right hypervisor to + open, this is needed to allow remote connections and also select between + different possible hypervisors (for example on a Linux system it may be + possible to use both KVM and LinuxContainers on the same node). A NULL + name will default to a preselected hypervisor but it's probably not a + wise thing to do in most cases. See the connection + URI page for a full descriptions of the values allowed.

+

+

+

Once the application obtained a virConnectPtr + connection to the + hypervisor it can then use it to manage domains and related resources + available for virtualization like storage and networking. All those are + exposed as first class objects, and connected to the hypervisor connection + (and the node or cluster where it is available).

+

+ first class objects exposed by the API

+

The figure above shows the five main objects exported by the API:

+ +

Most object manipulated by the library can also be represented using + XML descriptions. This is used primarily to create those object, but is + also helpful to modify or save their description back.

+

Domains, network and storage pools can be either active + i.e. either running or available for immediate use, or + defined in which case they are inactive but there is + a permanent definition available in the system for them. Based on this + thay can be activated dynamically in order to be used.

+

Most kind of object can also be named in various ways:

+

+

+ +

+ Functions and naming + conventions +

+

The naming of the functions present in the library is usually + made of a prefix describing the object associated to the function + and a verb describing the action on that object.

+

For each first class object you will find apis + for the following actions:

+ +

For more in-depth details of the storage related APIs see + the storage management page, +

+

+ The libvirt drivers +

+

+

+ The libvirt driver architecture

+

+ Daemon and remote access +

+

+

+ The libvirt daemon and remote architecture

+
+
+ + + Index: docs/archdomain.html =================================================================== RCS file: /data/cvs/libxen/docs/archdomain.html,v retrieving revision 1.9 diff -u -r1.9 archdomain.html --- docs/archdomain.html 2 Apr 2009 12:01:11 -0000 1.9 +++ docs/archdomain.html 14 Apr 2009 13:34:06 -0000 @@ -52,6 +52,10 @@
  • + API concepts +
    +
  • +
    Domains
  • Index: docs/archnetwork.html =================================================================== RCS file: /data/cvs/libxen/docs/archnetwork.html,v retrieving revision 1.9 diff -u -r1.9 archnetwork.html --- docs/archnetwork.html 2 Apr 2009 12:01:11 -0000 1.9 +++ docs/archnetwork.html 14 Apr 2009 13:34:06 -0000 @@ -52,6 +52,10 @@
  • + API concepts +
    +
  • +
    Domains
  • Index: docs/archnode.html =================================================================== RCS file: /data/cvs/libxen/docs/archnode.html,v retrieving revision 1.9 diff -u -r1.9 archnode.html --- docs/archnode.html 2 Apr 2009 12:01:11 -0000 1.9 +++ docs/archnode.html 14 Apr 2009 13:34:06 -0000 @@ -52,6 +52,10 @@
  • + API concepts +
    +
  • +
    Domains
  • Index: docs/archstorage.html =================================================================== RCS file: /data/cvs/libxen/docs/archstorage.html,v retrieving revision 1.9 diff -u -r1.9 archstorage.html --- docs/archstorage.html 2 Apr 2009 12:01:11 -0000 1.9 +++ docs/archstorage.html 14 Apr 2009 13:34:06 -0000 @@ -52,6 +52,10 @@
  • + API concepts +
    +
  • +
    Domains
  • Index: docs/goals.html =================================================================== RCS file: /data/cvs/libxen/docs/goals.html,v retrieving revision 1.1 diff -u -r1.1 goals.html --- docs/goals.html 2 Apr 2009 12:01:11 -0000 1.1 +++ docs/goals.html 14 Apr 2009 13:34:06 -0000 @@ -52,6 +52,10 @@
  • + API concepts +
    +
  • +
    Domains
  • Index: docs/intro.html =================================================================== RCS file: /data/cvs/libxen/docs/intro.html,v retrieving revision 1.48 diff -u -r1.48 intro.html --- docs/intro.html 2 Apr 2009 12:01:11 -0000 1.48 +++ docs/intro.html 14 Apr 2009 13:34:06 -0000 @@ -52,6 +52,10 @@
  • + API concepts +
    +
  • +
    Domains
  • Index: docs/libvirt-daemon-arch.fig =================================================================== RCS file: docs/libvirt-daemon-arch.fig diff -N docs/libvirt-daemon-arch.fig --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ docs/libvirt-daemon-arch.fig 14 Apr 2009 13:34:06 -0000 @@ -0,0 +1,112 @@ +#FIG 3.2 Produced by xfig version 3.2.5 +Landscape +Center +Inches +Letter +100.00 +Single +-2 +1200 2 +6 6707 1063 8622 1542 +2 2 0 1 0 7 50 -1 -1 4.000 0 0 7 0 0 5 + 6707 1063 8622 1063 8622 1542 6707 1542 6707 1063 +4 0 0 50 -1 16 19 0.0000 4 168 503 6826 1422 xen\001 +-6 +6 6707 1662 8622 2140 +2 2 0 1 0 7 50 -1 -1 4.000 0 0 7 0 0 5 + 6707 1662 8622 1662 8622 2140 6707 2140 6707 1662 +4 0 0 50 -1 16 19 0.0000 4 240 766 6826 2021 qemu\001 +-6 +6 6707 2260 8622 2739 +2 2 0 1 0 7 50 -1 -1 4.000 0 0 7 0 0 5 + 6707 2260 8622 2260 8622 2739 6707 2739 6707 2260 +4 0 0 50 -1 16 19 0.0000 4 240 1006 6826 2619 openvz\001 +-6 +6 6707 2859 8622 3338 +2 2 0 1 0 7 50 -1 -1 4.000 0 0 7 0 0 5 + 6707 2859 8622 2859 8622 3338 6707 3338 6707 2859 +4 0 0 50 -1 16 19 0.0000 4 239 407 6826 3218 lxc\001 +-6 +6 6707 3457 8622 3936 +2 2 0 1 0 7 50 -1 -1 4.000 0 0 7 0 0 5 + 6707 3457 8622 3457 8622 3936 6707 3936 6707 3457 +4 0 0 50 -1 16 19 0.0000 4 215 527 6826 3816 test\001 +-6 +6 6707 4056 8622 4535 +2 2 0 1 0 7 50 -1 -1 4.000 0 0 7 0 0 5 + 6707 4056 8622 4056 8622 4535 6707 4535 6707 4056 +4 0 0 50 -1 16 19 0.0000 4 215 958 6826 4415 remote\001 +-6 +6 15445 1063 17361 1542 +2 2 0 1 0 7 50 -1 -1 4.000 0 0 7 0 0 5 + 15445 1063 17361 1063 17361 1542 15445 1542 15445 1063 +4 0 0 50 -1 16 19 0.0000 4 168 503 15565 1422 xen\001 +-6 +6 15445 1662 17361 2140 +2 2 0 1 0 7 50 -1 -1 4.000 0 0 7 0 0 5 + 15445 1662 17361 1662 17361 2140 15445 2140 15445 1662 +4 0 0 50 -1 16 19 0.0000 4 240 766 15565 2021 qemu\001 +-6 +6 15445 2260 17361 2739 +2 2 0 1 0 7 50 -1 -1 4.000 0 0 7 0 0 5 + 15445 2260 17361 2260 17361 2739 15445 2739 15445 2260 +4 0 0 50 -1 16 19 0.0000 4 240 1006 15565 2619 openvz\001 +-6 +6 15445 2859 17361 3338 +2 2 0 1 0 7 50 -1 -1 4.000 0 0 7 0 0 5 + 15445 2859 17361 2859 17361 3338 15445 3338 15445 2859 +4 0 0 50 -1 16 19 0.0000 4 239 407 15565 3218 lxc\001 +-6 +6 15445 3457 17361 3936 +2 2 0 1 0 7 50 -1 -1 4.000 0 0 7 0 0 5 + 15445 3457 17361 3457 17361 3936 15445 3936 15445 3457 +4 0 0 50 -1 16 19 0.0000 4 215 527 15565 3816 test\001 +-6 +6 15445 4056 17361 4535 +2 2 0 1 0 7 50 -1 -1 4.000 0 0 7 0 0 5 + 15445 4056 17361 4056 17361 4535 15445 4535 15445 4056 +4 0 0 50 -1 16 19 0.0000 4 215 958 15565 4415 remote\001 +-6 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 1200 1781 3115 1781 3115 2739 1200 2739 1200 1781 +2 1 0 1 0 7 50 -1 -1 4.000 0 0 -1 1 0 2 + 0 0 1.00 95.77 191.54 + 3115 2260 5031 2260 +2 1 0 1 0 7 50 -1 -1 4.000 0 0 -1 1 0 4 + 0 0 1.00 95.77 191.54 + 8622 4295 9819 4295 10298 2260 10777 2260 +2 1 0 1 0 7 50 -1 -1 4.000 0 0 -1 1 0 4 + 0 0 1.00 95.77 191.54 + 5031 2260 5988 2260 6347 4295 6707 4295 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 5031 824 8861 824 8861 4774 5031 4774 5031 824 +2 1 0 5 0 7 50 -1 -1 12.000 0 0 -1 0 0 2 + 5031 824 5031 4774 +2 1 2 5 0 7 50 -1 -1 3.000 0 0 -1 0 0 2 + 5988 824 5988 4774 +2 1 0 1 0 7 50 -1 -1 4.000 0 0 -1 1 0 2 + 0 0 1.00 95.77 191.54 + 12692 2260 13769 2260 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 10777 1781 12692 1781 12692 2739 10777 2739 10777 1781 +2 1 0 1 0 7 50 -1 -1 4.000 0 0 -1 1 0 4 + 0 0 1.00 95.77 191.54 + 13769 2260 14727 2260 14966 3098 15445 3098 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 13769 824 17600 824 17600 4774 13769 4774 13769 824 +2 1 0 5 0 7 50 -1 -1 12.000 0 0 -1 0 0 2 + 13769 824 13769 4774 +2 1 2 5 0 7 50 -1 -1 3.000 0 0 -1 0 0 2 + 14727 824 14727 4774 +4 0 0 50 -1 16 19 0.0000 4 311 1532 1320 2260 Application\001 +4 0 0 50 -1 16 16 0.0000 4 192 455 3594 2140 URI\001 +4 0 0 50 -1 16 19 5.3233 4 239 1436 5869 5133 Driver API\001 +4 0 0 50 -1 16 19 5.3233 4 239 1484 5031 5133 Public API\001 +4 0 0 50 -1 16 19 5.3233 4 311 1508 7425 5133 Driver Impl\001 +4 0 0 50 -1 16 22 0.0000 4 287 910 5869 584 libvirt\001 +4 0 0 50 -1 16 16 0.0000 4 192 1125 3594 2619 lxc://host/\001 +4 0 0 50 -1 16 19 0.0000 4 239 910 10896 2260 libvirtd\001 +4 0 0 50 -1 16 19 5.3233 4 239 1436 14607 5133 Driver API\001 +4 0 0 50 -1 16 19 5.3233 4 239 1484 13769 5133 Public API\001 +4 0 0 50 -1 16 19 5.3233 4 311 1508 16164 5133 Driver Impl\001 +4 0 0 50 -1 16 22 0.0000 4 287 910 14607 584 libvirt\001 Index: docs/libvirt-daemon-arch.gif =================================================================== RCS file: docs/libvirt-daemon-arch.gif diff -N docs/libvirt-daemon-arch.gif Binary files /dev/null and libvirt-daemon-arch.gif differ Index: docs/libvirt-driver-arch.fig =================================================================== RCS file: docs/libvirt-driver-arch.fig diff -N docs/libvirt-driver-arch.fig --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ docs/libvirt-driver-arch.fig 14 Apr 2009 13:34:06 -0000 @@ -0,0 +1,62 @@ +#FIG 3.2 Produced by xfig version 3.2.5 +Landscape +Center +Inches +Letter +100.00 +Single +-2 +1200 2 +6 1200 225 10950 8147 +6 8208 1291 10646 1900 +2 2 0 1 0 7 50 -1 -1 4.000 0 0 7 0 0 5 + 8208 1291 10646 1291 10646 1900 8208 1900 8208 1291 +4 0 0 50 -1 16 24 0.0000 4 214 639 8360 1748 xen\001 +-6 +6 8208 2054 10646 2662 +2 2 0 1 0 7 50 -1 -1 4.000 0 0 7 0 0 5 + 8208 2054 10646 2054 10646 2662 8208 2662 8208 2054 +4 0 0 50 -1 16 24 0.0000 4 305 975 8360 2510 qemu\001 +-6 +6 8208 2815 10646 3424 +2 2 0 1 0 7 50 -1 -1 4.000 0 0 7 0 0 5 + 8208 2815 10646 2815 10646 3424 8208 3424 8208 2815 +4 0 0 50 -1 16 24 0.0000 4 305 1280 8360 3272 openvz\001 +-6 +6 8208 3577 10646 4187 +2 2 0 1 0 7 50 -1 -1 4.000 0 0 7 0 0 5 + 8208 3577 10646 3577 10646 4187 8208 4187 8208 3577 +4 0 0 50 -1 16 24 0.0000 4 304 518 8360 4033 lxc\001 +-6 +6 8208 4339 10646 4948 +2 2 0 1 0 7 50 -1 -1 4.000 0 0 7 0 0 5 + 8208 4339 10646 4339 10646 4948 8208 4948 8208 4339 +4 0 0 50 -1 16 24 0.0000 4 274 670 8360 4795 test\001 +-6 +6 8208 5100 10646 5710 +2 2 0 1 0 7 50 -1 -1 4.000 0 0 7 0 0 5 + 8208 5100 10646 5100 10646 5710 8208 5710 8208 5100 +4 0 0 50 -1 16 24 0.0000 4 274 1219 8360 5557 remote\001 +-6 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 1200 2206 3637 2206 3637 3424 1200 3424 1200 2206 +2 1 0 1 0 7 50 -1 -1 4.000 0 0 -1 1 0 2 + 0 0 1.00 121.88 243.75 + 3637 2815 6075 2815 +2 1 0 1 0 7 50 -1 -1 4.000 0 0 -1 1 0 4 + 0 0 1.00 121.88 243.75 + 6075 2815 7294 2815 7598 3881 8208 3881 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 6075 987 10950 987 10950 6014 6075 6014 6075 987 +2 1 0 5 0 7 50 -1 -1 12.000 0 0 -1 0 0 2 + 6075 987 6075 6014 +2 1 2 5 0 7 50 -1 -1 3.000 0 0 -1 0 0 2 + 7294 987 7294 6014 +4 0 0 50 -1 16 24 0.0000 4 395 1950 1352 2815 Application\001 +4 0 0 50 -1 16 20 0.0000 4 244 579 4246 2662 URI\001 +4 0 0 50 -1 16 20 0.0000 4 244 792 4246 3272 lxc:///\001 +4 0 0 50 -1 16 24 5.3233 4 304 1828 7142 6472 Driver API\001 +4 0 0 50 -1 16 24 5.3233 4 304 1889 6075 6472 Public API\001 +4 0 0 50 -1 16 24 5.3233 4 395 1920 9121 6472 Driver Impl\001 +4 0 0 50 -1 16 28 0.0000 4 366 1157 7142 682 libvirt\001 +-6 Index: docs/libvirt-driver-arch.gif =================================================================== RCS file: docs/libvirt-driver-arch.gif diff -N docs/libvirt-driver-arch.gif Binary files /dev/null and libvirt-driver-arch.gif differ Index: docs/libvirt-object-model.fig =================================================================== RCS file: docs/libvirt-object-model.fig diff -N docs/libvirt-object-model.fig --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ docs/libvirt-object-model.fig 14 Apr 2009 13:34:06 -0000 @@ -0,0 +1,61 @@ +#FIG 3.2 Produced by xfig version 3.2.5 +Landscape +Center +Inches +Letter +100.00 +Single +-2 +1200 2 +6 1200 1200 10274 6975 +6 4500 1200 6974 2025 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 4500 1200 6974 1200 6974 2025 4500 2025 4500 1200 +4 0 0 50 -1 16 17 0.0000 4 202 1679 4603 1613 virConnectPtr\001 +-6 +6 1200 3675 3675 4500 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 1200 3675 3675 3675 3675 4500 1200 4500 1200 3675 +4 0 0 50 -1 16 17 0.0000 4 202 1595 1303 4087 virDomainPtr\001 +-6 +6 1200 6150 3675 6975 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 1200 6150 3675 6150 3675 6975 1200 6975 1200 6150 +4 0 0 50 -1 16 17 0.0000 4 202 1667 1303 6562 virNetworkPtr\001 +-6 +6 7799 3675 10274 4500 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 7799 3675 10274 3675 10274 4500 7799 4500 7799 3675 +4 0 0 50 -1 16 17 0.0000 4 262 2155 7902 4087 virStoragePoolPtr\001 +-6 +6 7799 6150 10274 6975 +2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 7799 6150 10274 6150 10274 6975 7799 6975 7799 6150 +4 0 0 50 -1 16 17 0.0000 4 262 2000 7902 6562 virStorageVolPtr\001 +-6 +3 0 0 1 0 7 50 -1 -1 0.000 0 1 0 3 + 0 0 1.00 82.50 164.99 + 4706 2025 4706 4087 3675 4087 + 0.000 1.000 0.000 +3 0 0 1 0 7 50 -1 -1 0.000 0 1 0 3 + 0 0 1.00 82.50 164.99 + 6768 2025 6768 4087 7799 4087 + 0.000 1.000 0.000 +3 0 0 1 0 7 50 -1 -1 0.000 0 1 0 3 + 0 0 1.00 82.50 164.99 + 6562 2025 6562 6562 7799 6562 + 0.000 1.000 0.000 +3 0 0 1 0 7 50 -1 -1 0.000 0 1 0 3 + 0 0 1.00 82.50 164.99 + 4912 2025 4912 6562 3675 6562 + 0.000 1.000 0.000 +3 0 0 1 0 7 50 -1 -1 0.000 0 1 0 2 + 0 0 1.00 82.50 164.99 + 8933 4500 8933 6150 + 0.000 0.000 +4 0 0 50 -1 16 17 0.0000 4 143 155 3881 3985 n\001 +4 0 0 50 -1 16 17 0.0000 4 143 155 3881 6459 n\001 +4 0 0 50 -1 16 17 0.0000 4 143 155 7387 6459 n\001 +4 0 0 50 -1 16 17 0.0000 4 143 155 7387 3985 n\001 +4 0 0 50 -1 16 17 0.0000 4 143 155 8727 5944 n\001 +-6 Index: docs/libvirt-object-model.gif =================================================================== RCS file: docs/libvirt-object-model.gif diff -N docs/libvirt-object-model.gif Binary files /dev/null and libvirt-object-model.gif differ Index: docs/page.xsl =================================================================== RCS file: /data/cvs/libxen/docs/page.xsl,v retrieving revision 1.9 diff -u -r1.9 page.xsl --- docs/page.xsl 8 May 2008 14:20:07 -0000 1.9 +++ docs/page.xsl 14 Apr 2009 13:34:06 -0000 @@ -8,6 +8,22 @@ + + + + + + + + + + + + + + + + @@ -143,16 +159,7 @@
    - - - - - - - - - - +
  • + API concepts + The libvirt API concepts +
  • Domains Managing virtual machines
  • Index: docs/sitemap.html.in =================================================================== RCS file: /data/cvs/libxen/docs/sitemap.html.in,v retrieving revision 1.5 diff -u -r1.5 sitemap.html.in --- docs/sitemap.html.in 2 Apr 2009 12:01:11 -0000 1.5 +++ docs/sitemap.html.in 14 Apr 2009 13:34:06 -0000 @@ -61,6 +61,10 @@ Terminology and goals of libvirt API
  • + API concepts + The libvirt API concepts +
  • +
  • Domains Managing virtual machines
  • Index: src/xm_internal.c =================================================================== RCS file: /data/cvs/libxen/src/xm_internal.c,v retrieving revision 1.123 diff -u -r1.123 xm_internal.c --- src/xm_internal.c 3 Apr 2009 12:38:52 -0000 1.123 +++ src/xm_internal.c 14 Apr 2009 13:34:07 -0000 @@ -1624,7 +1624,7 @@ const char *filename; xenXMConfCachePtr entry; virBuffer mapbuf = VIR_BUFFER_INITIALIZER; - char *mapstr = NULL; + char *mapstr = NULL, *mapsave = NULL; int i, j, n, comma = 0; int ret = -1; char *cpuset = NULL; @@ -1679,6 +1679,7 @@ } mapstr = virBufferContentAndReset(&mapbuf); + mapsave = mapstr; if (VIR_ALLOC_N(cpuset, maxcpu) < 0) { virReportOOMError(domain->conn); @@ -1700,7 +1701,7 @@ ret = 0; cleanup: - VIR_FREE(mapstr); + VIR_FREE(mapsave); VIR_FREE(cpuset); xenUnifiedUnlock(priv); return (ret);