utmapp / UTM

Virtual machines for iOS and macOS
https://getutm.app
Apache License 2.0
27.15k stars 1.34k forks source link

scripting: add qemu additional arguments #6741

Closed naveenrajm7 closed 1 day ago

naveenrajm7 commented 1 month ago

Fixes #6661

read and update qemu additional argument of vm config

Usage:

tell application "/Users/xxx/UTM.app"
  set vm to virtual machine named "VM"
  set config to configuration of VM

  -- read  qemu additional arguments 
  set qemuAddArgs to qemu additional arguments of config

  -- add
  set newArg to {{argument string:"-vnc 127.0.0.1:1"}}
  set qemuAddArgs to qemuAddArgs & newArg

  -- update 
  set qemu additional arguments of config to qemuAddArgs
  update configuration of vm with config
end tell

This will enable to launch VMs with custom qemu args via APIs Related #5211