Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clone VMs with utmctl #5004

Closed
nre-ableton opened this issue Feb 9, 2023 · 8 comments
Closed

Clone VMs with utmctl #5004

nre-ableton opened this issue Feb 9, 2023 · 8 comments
Labels
enhancement New feature or request
Milestone

Comments

@nre-ableton
Copy link

I did look in the backlog for this, and was surprised to see it hadn't been mentioned yet (apologies if I've missed something). As far as I can tell, it's not possible to create new clones via the CLI. For an unattended CI system (for example), that makes UTM unusable.

It would be really nice if I could make clones with utmctl. Or, if there is a workaround, such as copying the files in ~/Library/Containers/com.utmapp.UTM/Data/Documents and somehow registering the VM with UTM so that it would show up in utmctl list etc.

@nre-ableton nre-ableton added the enhancement New feature or request label Feb 9, 2023
@greeneg
Copy link

greeneg commented Feb 13, 2023

Basic deletion functionality would also be appreciated as well in furtherance of making UTM a valid tool for CI as well

@ideologysec
Copy link

@nre-ableton you could conceivably clone it via cp or other operations, and then call open on the bundle path to register it (which will launch it in UTM)

@osy osy added this to the v4.2 milestone Mar 17, 2023
@osy
Copy link
Contributor

osy commented Mar 21, 2023

FYI: As of v4.2.2, there is support for clone and creating new VM using the scripting interface. utmctl has not been updated yet.

@greeneg
Copy link

greeneg commented Mar 21, 2023

FYI: As of v4.2.2, there is support for clone and creating new VM using the scripting interface. utmctl has not been updated yet.

Can you point me to docs for the scripting interface? I'm looking at hacking up a vagrant plugin to use utm instead of vBox to get local development working again for my team (M1 hw, but our target OS is x86_64)

@ideologysec
Copy link

@greeneg open the Script Editor app, File -> Open Dictionary -> UTM.app

@osy
Copy link
Contributor

osy commented Mar 21, 2023

@osy osy closed this as completed in d2eb90b Apr 18, 2023
@max-wittig
Copy link

Thanks!

@max-wittig
Copy link

@greeneg We're using this applescript to be able to use UTM inside CI for deletion as a workaround:

on run argv
	tell application "UTM"
	    set vm_name to item 1 of argv
		delete virtual machine named vm_name
		log "Deleted '" & vm_name & "'"
	end tell
end run
osascript ${currentDir}/delete.oascript vm-name

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

5 participants