Files
xen/tools/python/scripts
Alastair Tse f492dd97fb [XEND] Merge VFB support for PV and HVM guests.
This patch merges the way VFB are represented inside Xend by making
HVM VNC consoles use the VFB as its configuration object.

It preserves the way options are specified through xm but will create
a new VFB device that is used by image.py to put vnc config into
qemu-dm's command line. The parsing is moved into image.py's
parseDeviceModel() rather than in configVNC().

Through the Xen API, you can create a 'console' of protocol 'rfb' and
end up with a VNC console, on both HVM and PV guests. The location of
the connecting port is stored in the location attribute of the console
object. This is updated on each XendDomainInfo.update() if it
changes.

Also fixes missing read of the vnclisten and HVM_boot from the
config when initialised via xm. Makes sure bootable attribute for VBD
is store as an int when making SXP config.

Signed-off-by: Alastair Tse <atse@xensource.com>
2007-01-31 13:20:36 +00:00
..

Xen API Test
============

xapi.py is a simple command line tool to test the functionality of a
domain lifecycle supporting, Xen API talking version of Xend.

Creating a VM is slightly more work under the Xen API. The differences
with this and xm is:

1. None of the devices are created during vm-create. You must use
   vbd-create and vif-create to attach a new device to the VM.

2. VM's that are created using vm-create will not start by
   default. You must use vm-start to "start" the domain.

3. VM's that are created using vm-create will not be removed on
   shutdown. You must remove it using vm-delete.

Example Configuration Files
---------------------------

xapi.py uses a simple python configuration file similar to xm in the
face of the lack of any other reasonable format.

All the fields are directly mapped to the arguments that are in the
Xen API constructore for the respective classes.

xapi.domcfg.py: example configuration for a paravirtualised domain.
xapi.vbdcfg.py: example configuration for a file based block device.
xapi.vifcfg.py: example configuration for a simple bridged network
                device.

Example Session
---------------

xapi.py vm-list
xapi.py vm-create xapi.domcfg.py
xapi.py vbd-create <DomainName> xapi.vbdcfg.py
xapi.py vif-create <DomainName> xapi.vifcfg.py

Notes
-----

Currently lacking:

1. Any real authentication. XendAuthSessions need to be filled in with
   a proper authentication implementation either using PAM or other
   means.