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

13 lines
529 B
Text
Raw Permalink Normal View History

2023-10-06 21:03:45 +00:00
on run argv
set vm_name to item 1 of argv
2023-10-15 14:44:45 +00:00
set vm_mac to item 2 of argv
set iso_path to item 3 of argv
2023-10-06 21:03:45 +00:00
set iso to "file://" & iso_path as POSIX file
tell application "UTM"
2023-10-15 16:00:17 +00:00
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}
2023-10-06 21:03:45 +00:00
end tell
end run