utmapp / utmapp/UTM

Add utmctl import command

Open
#6,612 1 comment 5 reactions 0 assignees View on GitHub
enhancement
Dominant language
Swift
Stars
35.5k
Forks
1.8k
Avg merge
5d 5h
Merged PRs (30d)
7

Description

## What

Import a UTM file into UTM and return UUID. Also, reports progress of the import through percentage/bars.

```bash
> utmctl import -name
Importing ... 0%
Importing ... 50%
Importing ... 100%
virtual machine id
```

**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](https://developer.hashicorp.com/vagrant/vagrant-cloud)

Plugins like [Vagrant-UTM](https://naveenrajm7.github.io/vagrant_utm/ ) can use this API to import VMs and support the Vagrant Box format.

Related #3718

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.