HP BL680c XenServer Software Development Kit Guide 4.1.0 - Page 19
Where to look next, Argument, Description
UPC - 884420396314
View all HP BL680c manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 19 highlights
Overview of the XenServer API Argument uuid Description the uuid of the VM; required only if not using the reference For example: curl http://root:foo@xenserver/export&uuid=[VM UUID]&task_id= [task ID] -o export To export just the metadata, use the URI http://server/export_metadata The import protocol is similar, using HTTP(S) PUT. The [session_id] and [task_id] arguments are as for the export. The [ref] and [uuid] are not used; a new reference and uuid will be generated for the VM. There are some additional parameters: Argument restore force sr_id Description if this parameter is true, the import is treated as replacing the original VM the implication of this currently is that the MAC addresses on the VIFs are exactly as the export was, which will lead to conflicts if the original VM is still being run. if this parameter is true, any checksum failures will be ignored (the default is to destroy the VM if a checksum error is detected) The reference of an SR into which the VM should be imported. The default behaviour is to import into the Pool.default_SR. To import just the metadata, use the URI http://server/import_metadata 3.5. Where to look next In this chapter we have presented a brief high-level overview of the API and its object-model. The aim here is not to present the detailed semantics of the API, but just to provide enough background for you to start reading the code samples of the next chapter and to find your way around the more detailed XenEnterprise Management API reference document. There are a number of places you can find more information: • The Administrators Guide contains an overview of the xe CLI. Since a good deal of xe commands are a thin veneer over the API, playing with xe is a good way to start finding your way around the API object model described in this chapter. • The code samples in the next chapter provide some concrete instances of API coding in a variety of client languages. • The XenEnterprise Management API reference document provides a more detailed description of the API semantics as well as describing the the format of XML/RPC messages on the wire. and • There are a few scripts that use the API in the XenServer Host dom0 itself. For example, "/opt/xensource/libexec/shutdown" is a python program that cleanly shuts VMs down. This script is invoked when the host itself is shutdown. 13