Package org.ovirt.engine.sdk4.services
Interface VmsService
-
- All Superinterfaces:
Service
- All Known Implementing Classes:
VmsServiceImpl
public interface VmsService extends Service
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interface
VmsService.AddFromConfigurationRequest
add a virtual machine to the system from a configuration - requires the configuration type and the configuration datastatic interface
VmsService.AddFromConfigurationResponse
add a virtual machine to the system from a configuration - requires the configuration type and the configuration datastatic interface
VmsService.AddFromScratchRequest
add a virtual machine to the system from scratchstatic interface
VmsService.AddFromScratchResponse
add a virtual machine to the system from scratchstatic interface
VmsService.AddFromSnapshotRequest
add a virtual machine to the system by cloning from a snapshotstatic interface
VmsService.AddFromSnapshotResponse
add a virtual machine to the system by cloning from a snapshotstatic interface
VmsService.AddRequest
Creates a new virtual machine.static interface
VmsService.AddResponse
Creates a new virtual machine.static interface
VmsService.ListRequest
Returns the list of virtual machines of the system.static interface
VmsService.ListResponse
Returns the list of virtual machines of the system.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description VmsService.AddRequest
add()
Creates a new virtual machine.VmsService.AddFromConfigurationRequest
addFromConfiguration()
add a virtual machine to the system from a configuration - requires the configuration type and the configuration dataVmsService.AddFromScratchRequest
addFromScratch()
add a virtual machine to the system from scratchVmsService.AddFromSnapshotRequest
addFromSnapshot()
add a virtual machine to the system by cloning from a snapshotVmsService.ListRequest
list()
Returns the list of virtual machines of the system.Service
service(String path)
Service locator method, returns individual service on which the URI is dispatched.VmService
vmService(String id)
-
-
-
Method Detail
-
add
VmsService.AddRequest add()
Creates a new virtual machine. The virtual machine can be created in different ways: - From a template. In this case the identifier or name of the template must be provided. For example, using a plain shell script and XML: [source,bash] ---- #!/bin/sh -ex url="https://engine.example.com/ovirt-engine/api" user="admin@internal" password="..." curl \ --verbose \ --cacert /etc/pki/ovirt-engine/ca.pem \ --user "${user}:${password}" \ --request POST \ --header "Version: 4" \ --header "Content-Type: application/xml" \ --header "Accept: application/xml" \ --data 'myvm Blank mycluster myvm mycluster ... ---- When the virtual machine is created from a snapshot this set of disks is slightly different, it uses the `image_id` attribute instead of `id`. [source,xml] ----... ---- It is possible to specify additional virtual machine parameters in the XML description, e.g. a virtual machine of `desktop` type, with 2 GiB of RAM and additional description can be added sending a request body like the following: [source,xml] ----8d4bd566-6c86-4592-a4a7-912dbf93c298 myvm My Desktop Virtual Machine desktop 2147483648 ...... ---- In order to boot from CDROM, you first need to insert a disk, as described in the <>. Then booting from that CDROM can be specified using the `os.boot.devices` attribute: [source,xml] ---- ... ---- In all cases the name or identifier of the cluster where the virtual machine will be created is mandatory.cdrom
-
addFromConfiguration
VmsService.AddFromConfigurationRequest addFromConfiguration()
add a virtual machine to the system from a configuration - requires the configuration type and the configuration data
-
addFromScratch
VmsService.AddFromScratchRequest addFromScratch()
add a virtual machine to the system from scratch
-
addFromSnapshot
VmsService.AddFromSnapshotRequest addFromSnapshot()
add a virtual machine to the system by cloning from a snapshot
-
list
VmsService.ListRequest list()
Returns the list of virtual machines of the system. The order of the returned list of virtual machines is guaranteed only if the `sortby` clause is included in the `search` parameter.
-
-