Running ./create-vm-template.bash results in "Connection refused" error
I am running on an M1 Mac, using Anka 3.0-beta4 (arm).
After running the ./create-vm-template.bash script and selecting 5 for the Monterey 12.0.1 installer, it fails with this error:
anka: /Applications/Install macOS Monterey.app: failed to install: Connection refused
Specifically, this line seems to fail as a one-liner after downloading the installer to the correct location:
sudo ANKA_CREATE_SUSPEND=0 anka create --disk-size 100G --app /Applications/Install\ macOS\ Monterey.app 12.0.1
Same issue in the Anka GUI:

Hey @adamhowardprice , the getting started scripts are currently only for Anka 2.X (Intel). You can find the guide for how to use Anka 3.0 beta to create VMs here: https://docs.veertu.com/anka/arm/getting-started/creating-your-first-vm/
More specific to the problem: Anka 3.0 does not support .app installers and only uses .ipsw files from Apple to install macOS into the VM.
I've updated the scripts to not only install the proper 3.0 binary in install-anka-virtualization-on-mac.bash, but also block running create-vm-template.bash. I believe create-vm-template-tags.bash will still work if you wanted to use that logic to build out the various template layers, etc. Alternatively, here is how I prepare my template for Jenkins:
anka run 12.0.1-jenkins bash -c "set -exo pipefail; \
echo \"Disable indexing\" && \
sudo defaults write ~/.Spotlight-V100/VolumeConfiguration.plist Exclusions -array \"/Volumes\" && \
sudo defaults write ~/.Spotlight-V100/VolumeConfiguration.plist Exclusions -array \"/Network\" && \
sudo killall mds && \
sleep 60 && \
sudo mdutil -a -i off && \
sudo mdutil -a -i off && \
sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.metadata.mds.plist && \
sudo rm -rf /.Spotlight-V100/* && \
echo \"Enable VNC\" && \
pushd /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/ && \
sudo ./kickstart -configure -allowAccessFor -specifiedUsers && \
sudo ./kickstart -configure -allowAccessFor -allUsers -privs -all && \
sudo ./kickstart -activate && popd && \
echo \"Sleep settings\" && \
sudo systemsetup -setcomputersleep Off && \
systemsetup -setcomputersleep Off || true && \
sudo pmset -a standby 0 && \
sudo pmset -a disksleep 0 && \
sudo pmset -a hibernatemode 0 && \
echo \"Brew\" && \
/bin/bash -c \"\$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)\" && \
echo \"eval \"\$(/opt/homebrew/bin/brew shellenv)\"\" >> ~/.zprofile && \
eval \"\$(/opt/homebrew/bin/brew shellenv)\" && \
brew install jq && \
echo \"Other\" && \
sudo xcodebuild -license || true && \
sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.coreduetd.osx.plist && \
sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.metadata.mds.plist && \
echo \"Java\" && \
rm -rf zulu* && \
curl -L -O https://cdn.azul.com/zulu/bin/zulu8.54.0.21-ca-jdk8.0.292-macosx_aarch64.tar.gz && \
[ \$(du -s zulu8.54.0.21-ca-jdk8.0.292-macosx_aarch64.tar.gz | awk '{print \$1}') -gt 190000 ] && \
tar -xzvf zulu8.54.0.21-ca-jdk8.0.292-macosx_aarch64.tar.gz && \
sudo mkdir -p /usr/local/bin && for file in \$(ls ~/zulu8.54.0.21-ca-jdk8.0.292-macosx_aarch64/bin/*); do sudo rm -f /usr/local/bin/\$(echo \$file | rev | cut -d/ -f1 | rev); sudo ln -s \$file /usr/local/bin/\$(echo \$file | rev | cut -d/ -f1 | rev); done && java -version && \
[[ ! -z \$(java -version 2>&1 | grep 1.8.0_292) ]] && \
sudo chmod 666 /etc/hosts && \
sudo echo '192.168.64.1 anka.jenkins' >> /etc/hosts"
We'll be tweaking these scripts to make them more compatible with 3.0 in the coming weeks.