Xen Prototype
3.1 Virtual Machine Server
3.1.2 Access to the Virtual Machine Server
In order to use the capabilities offered by the Virtual Machine Server one has to develop clients for it. A client for the Virtual Machine Server must create a SOAP message with the desired service and its parameters.
To ease the development of clients a class namedHorizonXenClientwas developed. For each service defined on the class VirtualMachineServer a method for the creation of message payloads is created on the HorizonXen-Client class. This is the API (Application Programing Interface) for the HorizonXenClient.
The possible message payloads are:
3.1.2.1 public OMElement createVirtualMachinePayload(String phyServer, String vmName, String vmIP, String vmRAM);
This method creates a payload for the request of the service create-VirtualMachine, based on the name of the physical machine (phyServer) that will host the new virtual machine, on the name of this new virtual machine (vmName), on the desired IP address (vmIP), and on the desired RAM size (vmRAM).
The method returns an XML message, represented by an object of the class OMElement, with the operation result, either success or failure.
3.1.2.2 public OMElement createVirtualNetworkPayload(Vector
<String> phyServers, Vector<String> VMNames, Vector
<String> IPs, Vector<String> RAMs, Vector<String> net-Interface);
This method creates a payload for the request of the service create-VirtualNetwork, based on a list with the names of the physical machines (phyServers) that will host the new virtual machines, on a list with the names of the new virtual machines (VMNames), on a list with the desired IP addresses (IPs), on a list with the desired RAM memory sizes (RAMs), and on a list of the physical network interfaces (netInterace) that will be mapped to the new virtual network interfaces created on the virtual machines.
The method returns an XML message, represented by an object of the class OMElement, with the operation result, either success or failure.
3.1.2.3 public OMElement destroyVirtualMachinePayload(String phyServer, String vmName);
This method creates a payload for the request of the service destroy-VirtualMachine, based on the name of the physical machine that hosts the virtual machine (phyServer), and on the name of the virtual machine (vmName).
The method returns an XML message, represented by an object of the class OMElement, with the operation result, either success or failure.
3.1.2.4 public OMElement getPhysicalServerStatusPayload(String phyServer);
This method creates a payload for the request of the service getPhysical-ServerStatus, based on the name of the physical machine (phyServer).
The method returns an XML message, represented by an object of the class OMElement, with the operation result, either success or failure, the number of CPUS, the number of cores, the RAM memory size, the amount of free RAM memory, the name of the host, and the number and the name of the active virtual domains.
3.1.2.5 public OMElement getRegisteredNodesPayload();
This method creates a payload for the request of the service getRegiste-redNodes, this method has no parameters.
The method returns an XML message, represented by an object of the class OMElement, with the operation result, either success or failure, and a list with the registered nodes.
3.1.2.6 public OMElement getVirtualMachineStatusPayload(String phyServer, String vmName);
This method creates a payload for the request of the service getVirtual-MachineStatus, based on the name of the physical machine that hosts the virtual machine (phyServer), and on the name of the virtual machine (vm-Name).
The method returns an XML message, represented by an object of the class OMElement, with the operation result, either success or failure, the name of the virtual machine, the current RAM memory size, the total RAM memory that can be used, the current number of VCPUs, the maximum number of VCPUs that the virtual machine can use, the CPU time used, and the current state of the virtual machine.
3.1.2.7 public OMElement migrateVirtualMachinePayload(String sourcePhyServer, String destPhyServer, String vmName, String live);
This method creates a payload for the request of the service migrate-VirtualMachine, based on the name of the source physical machine (source-PhyServer), on the name of the destination physical machine (destPhy-Server), on the name of the virtual machine (vmName), and a string indi-cating if the operation will be a live migration (live), i.e., if the migration will occur without the interruption of the programs running on the virtual machine.
The method returns an XML message, represented by an object of the class OMElement, with the operation result, either success or failure.
3.1.2.8 public OMElement registerNodesPayload(Vector<Physical-Server> phyServers);
This method creates a payload for the request of the service register-Nodes, based on a list with the physical servers to be registered (phyServers).
The method returns an XML message, represented by an object of the class OMElement, with the operation result, either success or failure.
3.1.2.9 public OMElement sanityTestPayload(String testString);
This method creates a payload for the request of the servicesanityTest, based on a string that will send to the virtual machine server (testString).
The method returns an XML message, represented by an object of the class OMElement, with the string received by the virtual machine server, i.e., the test is considered passed if the received and the sent strings are the same.
3.1.2.10 public OMElement shutdownVirtualMachinePayload(String phyServer, String vmName);
This method creates a payload for the request of the service shutdown-VirtualMachine, based on the name of the physical machine that hosts the virtual machine (phyServer), and on the name of the virtual machine (vmName).
The method returns an XML message, represented by an object of the class OMElement, with the operation result, either success or failure.
3.1.2.11 public OMElement topologyDiscoverPayload();
This method creates a payload for the request of the service topology-Discover. The service has no parameters.
The method returns an XML message, represented by an object of the class OMElement, with the operation result, either success or failure, and the physical and virtual topologies.
3.1.2.12 public OMElement getVirtualMachineSchedulerParameters-Payload(String phyServer, String VMName);
This method creates a payload for the request of the service getVirtual-MachineSchedulerParameters based on the name of the physical machine that hosts the virtual machine (phyServer), and on the name of the virtual machine (VMName).
The method returns an XML message, represented by an object of the class OMElement with the operation result, either success or failure, and the values of the credit scheduler parameters (weight and cap).
3.1.2.13 public OMElement setVirtualMachineSchedulerParameters-Payload(String phyServer, String VMName, String Weight, String Cap);
This method creates a payload for the request of the service setVirtual-MachineSchedulerParameters based on the name of the physical machine that hosts the virtual machine (phyServer), the name of the virtual machine to be affected (VMName), the new value for the weight parameter (Weight), and the new value for the cap parameter (Cap).
The method returns an XML message, represented by an object of the class OMElement with the operation result, either success or failure.