|
|
|
|
@ -5,14 +5,27 @@ OU!
|
|
|
|
|
On the hypervisor where the files are located, install the required packages:
|
|
|
|
|
|
|
|
|
|
dnf install ovirt-imageio-client python3-ovirt-engine-sdk4
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Télécharger le certificat CA de l'Engine. Disponible depuis le petit cadenas du navigateur dans l'interface WEB.
|
|
|
|
|
Le placer ou le copier dans le dossier de l'utilisateur (ex: /home/user/.config/ovirt-engine-ca.pem)
|
|
|
|
|
|
|
|
|
|
Créer un fichier de configuration pour l'outils
|
|
|
|
|
|
|
|
|
|
cat <<EOF >> /home/user/.config/ovirt.conf
|
|
|
|
|
[engine1]
|
|
|
|
|
engine_url = https://engine1.url
|
|
|
|
|
username = admin@internal
|
|
|
|
|
password = mypasswordintextform
|
|
|
|
|
cafile = /home/user/.config/ovirt-engine-ca.pem
|
|
|
|
|
|
|
|
|
|
EOF
|
|
|
|
|
|
|
|
|
|
And upload the image:
|
|
|
|
|
le "-c engine" spécifie le nom dans le ficher de config [engine1]
|
|
|
|
|
|
|
|
|
|
python3 /usr/share/doc/python3-ovirt-engine-sdk4/examples/upload_disk.py \
|
|
|
|
|
--engine-url https://my.engine/ \
|
|
|
|
|
--username admin@internal \
|
|
|
|
|
--password-file /path/to/password/file \
|
|
|
|
|
--cafile /path/to/cafile \
|
|
|
|
|
-c engine1
|
|
|
|
|
--sd-name my-storage-domain \
|
|
|
|
|
--disk-sparse \
|
|
|
|
|
/path/to/image.qcow2
|