1
0
Fork 0
mirror of https://github.com/ciderale/nixos-utm.git synced 2024-12-14 11:37:37 +00:00
nixos-utm/setupVM.osa
2023-10-15 18:08:02 +02:00

12 lines
529 B
Text

on run argv
set vm_name to item 1 of argv
set vm_mac to item 2 of argv
set iso_path to item 3 of argv
set iso to "file://" & iso_path as POSIX file
tell application "UTM"
set theDrive to {{guest size:65536}, {removable:true, source:iso}}
set theNetwork to {{address:vm_mac, mode:shared}}
set theConfiguration to {name:vm_name, architecture:"aarch64", drives:theDrive, network interfaces:theNetwork}
set vm to make new virtual machine with properties {backend:apple, configuration:theConfiguration}
end tell
end run