Package org.ovirt.engine.sdk4.services
Interface VmsService.AddResponse
-
- All Superinterfaces:
Response
- Enclosing interface:
- VmsService
public static interface VmsService.AddResponse extends Response
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
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Vm
vm()
-
-
-
Method Detail
-
vm
Vm vm()
-
-