## oVirt Virtual Machines

Cockpit can connect to oVirt REST API to extend Virtual Machines for oVirt-specifics, namely

- Active operations

- Extended virtual machine's details

- Migration

- VDSM configuration

Required oVirt version: 4.1.0

The machine running Cockpit must be configured as a host within the oVirt cluster.

CORS (Cross Origin Resource Sharing) must be enabled on oVirt engine (not done by default):

    $ ssh root@[ENGINE_FQDN] # log as `root` user in the oVirt engine machine
    # engine-config -s CORSSupport=true # to turn on the CORS support for REST API
    # engine-config -s CORSAllowDefaultOrigins=true # to allow CORS for all configured hosts
    # systemctl restart ovirt-engine # to take effect

The URL of oVirt (or RHV - Red Hat Virtualization) API server must be manually provided, since it can't be determined automatically from a host.

To do so, please either

- log into Cockpit as root

- visit Virtual Machines page

- provide oVirt's engine URL within the shown dialog

or

- run as root in shell:

      # /usr/share/cockpit/ovirt/install.sh https://[FQDN]/ovirt-engine

By any of the actions above, following files are generated:

- /etc/cockpit/machines-ovirt.config - feel free to adjust

- /usr/share/cockpit/ovirt/override.json - to ease Content Security Policy towards oVirt's REST API