diff --git a/config.plist b/config.plist index 5902ea9..9f50f0e 100644 --- a/config.plist +++ b/config.plist @@ -19,14 +19,6 @@ Drive - - Identifier - XXX_DISK_ID - ImageName - XXX_DISK_ID.img - ReadOnly - - Information diff --git a/empty.img.gz b/empty.img.gz deleted file mode 100644 index 47323e4..0000000 Binary files a/empty.img.gz and /dev/null differ diff --git a/flake.nix b/flake.nix index 7d8f2f2..e10a94c 100644 --- a/flake.nix +++ b/flake.nix @@ -103,7 +103,6 @@ NAME=$NIXOS_NAME VM_ID=$(uuidgen) - DISK_ID=$(uuidgen) #MAC_ADDR=$(tr -dc A-F0-9 < /dev/urandom | head -c 10 | sed -r 's/(..)/\1:/g;s/:$//;s/^/02:/') MAC_ADDR=$(md5sum <<< "$NAME" | head -c 10 | sed -r 's/(..)/\1:/g;s/:$//;s/^/02:/') @@ -127,10 +126,8 @@ fi mkdir -p "$FOLDER/Data" set -x - tar xvzf ${./empty.img.gz} - mv empty.img "$FOLDER/Data/$DISK_ID.img" install -m 600 ${./efi_vars.fd} "$FOLDER/Data/efi_vars.fd" - sed -e "s/XXX_NAME/$NAME/g;s/XXX_VM_ID/$VM_ID/g;s/XXX_DISK_ID/$DISK_ID/g" ${./config.plist} > "$FOLDER/config.plist" + sed -e "s/XXX_NAME/$NAME/g;s/XXX_VM_ID/$VM_ID/g" ${./config.plist} > "$FOLDER/config.plist" utmctl start "$NAME" utmctl stop "$NAME" diff --git a/setupVM.osa b/setupVM.osa index ba15951..2d315db 100644 --- a/setupVM.osa +++ b/setupVM.osa @@ -6,6 +6,7 @@ on run argv tell application "UTM" set vm to virtual machine named vm_name set config to configuration of vm + set end of drives of config to {guest size:65536} set end of drives of config to {source:iso, removable:true} set end of network interfaces of config to {address:vm_mac, mode:shared} update configuration of vm with config