-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Description
What
Import a UTM file into UTM and return UUID. Also, reports progress of the import through percentage/bars.
> utmctl import -name <VM-NAME> <UTM-FILE>
Importing ... 0%
Importing ... 50%
Importing ... 100%
virtual machine id <UUID>NOTE:
import is different from 'Open with UTM' , Open with UTM which is already present in Scripting Bridge just creates a short cut in UTM. However in terms of IaC, when we delete a VM user expects all the data of that VM to be also deleted, but for shortcut VMs , delete will only delete the shortcut not the data.
How
There is already a command downloadVM used as 'downloadVM?url=...' action that imports the UTM zip file as VM into UTM. It also reports a progress bar of the import. we need to modify it to handle local files and expose this via utmctl.
Why
Using downloadVM If we want to spin up multiple VMs using the same UTM file, we currently download the file from internet each time for every VM.
This allows us to programmatically import the VMs using local files.
This will also allow us to use Vagrant Boxes, so we can build, publish, share and use custom UTM VMs using Vagrant Cloud
Plugins like Vagrant-UTM can use this API to import VMs and support the Vagrant Box format.
Related #3718