From 74a658e86f6adc14221e0dfb0657e3d87340ca17 Mon Sep 17 00:00:00 2001 From: sio user Date: Fri, 26 May 2023 11:22:11 +0200 Subject: [PATCH] =?UTF-8?q?script=20r=C3=A9cup=C3=A9ration=20vm?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- autres/vm | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100755 autres/vm diff --git a/autres/vm b/autres/vm new file mode 100755 index 0000000..359627f --- /dev/null +++ b/autres/vm @@ -0,0 +1,15 @@ +#!/bin/bash + +# Chemin de destination pour les fichiers OVA +destination="/home/sio/mes_vm/" + +# Récupérer la liste des noms de machines virtuelles +vms=$(VBoxManage list vms | awk -F '"' '{print $2}') + +# Exporter chaque machine virtuelle au format OVA +for vm in $vms; do + echo "Exportation de la machine virtuelle : $vm" + VBoxManage export "$vm" -o "$destination/$vm.ova" +done + +echo "Exportation terminée."