Class VmServiceImpl

    • Method Detail

      • cancelMigration

        public VmService.CancelMigrationRequest cancelMigration()
        Description copied from interface: VmService
        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] ---- ----
        Specified by:
        cancelMigration in interface VmService
      • detach

        public VmService.DetachRequest detach()
        Description copied from interface: VmService
        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] ---- ----
        Specified by:
        detach in interface VmService
      • export

        public VmService.ExportRequest export()
        Description copied from interface: VmService
        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 ----
        Specified by:
        export in interface VmService
      • freezeFilesystems

        public VmService.FreezeFilesystemsRequest freezeFilesystems()
        Description copied from interface: VmService
        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] ---- ----
        Specified by:
        freezeFilesystems in interface VmService
      • logon

        public VmService.LogonRequest logon()
        Description copied from interface: VmService
        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] ---- ----
        Specified by:
        logon in interface VmService
      • maintenance

        public VmService.MaintenanceRequest maintenance()
        Description copied from interface: VmService
        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 ----
        Specified by:
        maintenance in interface VmService
      • migrate

        public VmService.MigrateRequest migrate()
        Description copied from interface: VmService
        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] ---- ----
        Specified by:
        migrate in interface VmService
      • previewSnapshot

        public VmService.PreviewSnapshotRequest previewSnapshot()
        Description copied from interface: VmService
        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.
        Specified by:
        previewSnapshot in interface VmService
      • reboot

        public VmService.RebootRequest reboot()
        Description copied from interface: VmService
        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] ---- ----
        Specified by:
        reboot in interface VmService
      • remove

        public VmService.RemoveRequest remove()
        Description copied from interface: VmService
        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 ----
        Specified by:
        remove in interface VmService
      • shutdown

        public VmService.ShutdownRequest shutdown()
        Description copied from interface: VmService
        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] ---- ----
        Specified by:
        shutdown in interface VmService
      • start

        public VmService.StartRequest start()
        Description copied from interface: VmService
        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] ---- ----
        Specified by:
        start in interface VmService
      • stop

        public VmService.StopRequest stop()
        Description copied from interface: VmService
        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] ---- ----
        Specified by:
        stop in interface VmService
      • suspend

        public VmService.SuspendRequest suspend()
        Description copied from interface: VmService
        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] ---- ----
        Specified by:
        suspend in interface VmService
      • thawFilesystems

        public VmService.ThawFilesystemsRequest thawFilesystems()
        Description copied from interface: VmService
        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] ---- ----
        Specified by:
        thawFilesystems in interface VmService
      • ticket

        public VmService.TicketRequest ticket()
        Description copied from interface: VmService
        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 ---- ====
        Specified by:
        ticket in interface VmService
      • katelloErrataService

        public KatelloErrataService katelloErrataService()
        Description copied from interface: VmService
        Reference to the service that can show the applicable errata available on the virtual machine. This information is taken from Katello.
        Specified by:
        katelloErrataService in interface VmService
      • sessionsService

        public VmSessionsService sessionsService()
        Description copied from interface: VmService
        Reference to the service that provides information about virtual machine user sessions.
        Specified by:
        sessionsService in interface VmService