I'm making a powershell script (vbox installed on a w2012) to halt a group of VMs, export to ovf in a folder and finally start VMs backuped up.
No problem for stopping and starting, but i'm having problems for exporting in ovf file. In the API documentation i can find:
Code: Select all
Exporting VirtualBox machines into an OVF appliance involves the following steps:
As with importing, first call IVirtualBox::createAppliance to create an empty IAppliance object.
For each machine you would like to export, call IMachine::exportTo with the IAppliance object you just created. Each such call creates one instance of IVirtualSystemDescription inside the appliance.
If desired, call IVirtualSystemDescription::setFinalValues for each virtual system (machine) to override the suggestions made by the IMachine::exportTo routine.
Finally, call write with a path specification to have the OVF file written.
Many thanks for your help