Interface VmService

    • Method Detail

      • autoPinCpuAndNumaNodes

        VmService.AutoPinCpuAndNumaNodesRequest autoPinCpuAndNumaNodes()
        Apply an automatic CPU and NUMA configuration on the VM. An example for a request: [source] ---- POST /ovirt-engine/api/vms/123/autopincpuandnumanodes ---- With a request body like this: [source,xml] ---- true ----
      • cancelMigration

        VmService.CancelMigrationRequest cancelMigration()
        This operation stops any migration of a virtual machine to another physical host. [source] ---- POST /ovirt-engine/api/vms/123/cancelmigration ---- The cancel migration action does not take any action specific parameters; therefore, the request body should contain an empty `action`: [source,xml] ---- ----
      • commitSnapshot

        VmService.CommitSnapshotRequest commitSnapshot()
        Permanently restores the virtual machine to the state of the previewed snapshot. See the <> operation for details.
      • detach

        VmService.DetachRequest detach()
        Detaches a virtual machine from a pool. [source] ---- POST /ovirt-engine/api/vms/123/detach ---- The detach action does not take any action specific parameters; therefore, the request body should contain an empty `action`: [source,xml] ---- ----
      • export

        VmService.ExportRequest export()
        Exports the virtual machine. A virtual machine can be exported to an export domain. For example, to export virtual machine `123` to the export domain `myexport`: [source] ---- POST /ovirt-engine/api/vms/123/export ---- With a request body like this: [source,xml] ---- myexport true true ---- Since version 4.2 of the engine it is also possible to export a virtual machine as a virtual appliance (OVA). For example, to export virtual machine `123` as an OVA file named `myvm.ova` that is placed in the directory `/home/ovirt/` on host `myhost`: [source] ---- POST /ovirt-engine/api/vms/123/export ---- With a request body like this: [source,xml] ---- myhost /home/ovirt myvm.ova ---- NOTE: Confirm that the export operation has completed before attempting any actions on the export domain.
      • freezeFilesystems

        VmService.FreezeFilesystemsRequest freezeFilesystems()
        Freezes virtual machine file systems. This operation freezes a virtual machine's file systems using the QEMU guest agent when taking a live snapshot of a running virtual machine. Normally, this is done automatically by the manager, but this must be executed manually with the API for virtual machines using OpenStack Volume (Cinder) disks. Example: [source] ---- POST /ovirt-engine/api/vms/123/freezefilesystems ---- [source,xml] ---- ----
      • logon

        VmService.LogonRequest logon()
        Initiates the automatic user logon to access a virtual machine from an external console. This action requires the `ovirt-guest-agent-gdm-plugin` and the `ovirt-guest-agent-pam-module` packages to be installed and the `ovirt-guest-agent` service to be running on the virtual machine. Users require the appropriate user permissions for the virtual machine in order to access the virtual machine from an external console. For example: [source] ---- POST /ovirt-engine/api/vms/123/logon ---- Request body: [source,xml] ---- ----
      • maintenance

        VmService.MaintenanceRequest maintenance()
        Sets the global maintenance mode on the hosted engine virtual machine. This action has no effect on other virtual machines. Example: [source] ---- POST /ovirt-engine/api/vms/123/maintenance ---- [source,xml] ---- true ----
      • migrate

        VmService.MigrateRequest migrate()
        Migrates a virtual machine to another physical host. Example: [source] ---- POST /ovirt-engine/api/vms/123/migrate ---- To specify a specific host to migrate the virtual machine to: [source,xml] ---- ----
      • previewSnapshot

        VmService.PreviewSnapshotRequest previewSnapshot()
        Temporarily restores the virtual machine to the state of a snapshot. The snapshot is indicated with the `snapshot.id` parameter. It is restored temporarily, so that the content can be inspected. Once that inspection is finished, the state of the virtual machine can be made permanent, using the <> method, or discarded using the <> method.
      • reboot

        VmService.RebootRequest reboot()
        Sends a reboot request to a virtual machine. For example: [source] ---- POST /ovirt-engine/api/vms/123/reboot ---- The reboot action does not take any action specific parameters; therefore, the request body should contain an empty `action`: [source,xml] ---- ---- To reboot the VM even if a backup is running for it, the action should include the 'force' element. For example, to force reboot virtual machine `123`: ---- POST /ovirt-engine/api/vms/123/reboot ---- [source,xml] ---- true ----
      • remove

        VmService.RemoveRequest remove()
        Removes the virtual machine, including the virtual disks attached to it. For example, to remove the virtual machine with identifier `123`: [source] ---- DELETE /ovirt-engine/api/vms/123 ----
      • reset

        VmService.ResetRequest reset()
        Sends a reset request to a virtual machine. For example: [source] ---- POST /ovirt-engine/api/vms/123/reset ---- The reset action does not take any action specific parameters; therefore, the request body should contain an empty `action`: [source,xml] ---- ----
      • shutdown

        VmService.ShutdownRequest shutdown()
        This operation sends a shutdown request to a virtual machine. For example: [source] ---- POST /ovirt-engine/api/vms/123/shutdown ---- The shutdown action does not take any action specific parameters; therefore, the request body should contain an empty `action`: [source,xml] ---- ---- To shutdown the VM even if a backup is running for it, the action should include the 'force' element. For example, to force shutdown virtual machine `123`: ---- POST /ovirt-engine/api/vms/123/shutdown ---- [source,xml] ---- true ----
      • start

        VmService.StartRequest start()
        Starts the virtual machine. If the virtual environment is complete and the virtual machine contains all necessary components to function, it can be started. This example starts the virtual machine: [source] ---- POST /ovirt-engine/api/vms/123/start ---- With a request body: [source,xml] ---- ----
      • stop

        VmService.StopRequest stop()
        This operation forces a virtual machine to power-off. For example: [source] ---- POST /ovirt-engine/api/vms/123/stop ---- The stop action does not take any action specific parameters; therefore, the request body should contain an empty `action`: [source,xml] ---- ---- To stop the VM even if a backup is running for it, the action should include the 'force' element. For example, to force stop virtual machine `123`: ---- POST /ovirt-engine/api/vms/123/stop ---- [source,xml] ---- true ----
      • suspend

        VmService.SuspendRequest suspend()
        This operation saves the virtual machine state to disk and stops it. Start a suspended virtual machine and restore the virtual machine state with the start action. For example: [source] ---- POST /ovirt-engine/api/vms/123/suspend ---- The suspend action does not take any action specific parameters; therefore, the request body should contain an empty `action`: [source,xml] ---- ----
      • thawFilesystems

        VmService.ThawFilesystemsRequest thawFilesystems()
        Thaws virtual machine file systems. This operation thaws a virtual machine's file systems using the QEMU guest agent when taking a live snapshot of a running virtual machine. Normally, this is done automatically by the manager, but this must be executed manually with the API for virtual machines using OpenStack Volume (Cinder) disks. Example: [source] ---- POST /api/vms/123/thawfilesystems ---- [source,xml] ---- ----
      • ticket

        VmService.TicketRequest ticket()
        Generates a time-sensitive authentication token for accessing a virtual machine's display. For example: [source] ---- POST /ovirt-engine/api/vms/123/ticket ---- The client-provided action optionally includes a desired ticket value and/or an expiry time in seconds. The response specifies the actual ticket value and expiry used. [source,xml] ---- abcd12345 120 ---- [IMPORTANT] ==== If the virtual machine is configured to support only one graphics protocol then the generated authentication token will be valid for that protocol. But if the virtual machine is configured to support multiple protocols, VNC and SPICE, then the authentication token will only be valid for the SPICE protocol. In order to obtain an authentication token for a specific protocol, for example for VNC, use the `ticket` method of the <>, which manages the graphics consoles of the virtual machine, by sending a request: [source] ---- POST /ovirt-engine/api/vms/123/graphicsconsoles/456/ticket ---- ====
      • undoSnapshot

        VmService.UndoSnapshotRequest undoSnapshot()
        Restores the virtual machine to the state it had before previewing the snapshot. See the <> operation for details.
      • update

        VmService.UpdateRequest update()
        Update the virtual machine in the system for the given virtual machine id.
      • backupsService

        VmBackupsService backupsService()
        List of backups of this virtual machine.
      • checkpointsService

        VmCheckpointsService checkpointsService()
        List of checkpoints of this virtual machine.
      • diskAttachmentsService

        DiskAttachmentsService diskAttachmentsService()
        List of disks attached to this virtual machine.
      • katelloErrataService

        KatelloErrataService katelloErrataService()
        Reference to the service that can show the applicable errata available on the virtual machine. This information is taken from Katello.
      • sessionsService

        VmSessionsService sessionsService()
        Reference to the service that provides information about virtual machine user sessions.