brew install qemu
mkdir ~/qemu
pushd ~/qemu
curl -O https://gist.githubusercontent.com/mjkpolo/ae804c93dcc17cec6419092905abe5f2/raw/6a56f42a7f4b2404553198b0a39ef5d5d20cbd49/start_vm.sh
chmod +x start_vm.sh
ln -s $HOME/qemu/start_vm.sh $HOME/.local/bin/start_vm
This will bring a qemu window up for installation. If keyboard and mouse doesn't work just wait for the boot menu to autoselect the default option
qemu-img create -f qcow2 ubuntu.qcow2 60G
curl -O https://cdimage.ubuntu.com/releases/22.10/release/ubuntu-22.10-live-server-arm64.iso
start_vm build ubuntu-22.10-live-server-arm64.iso
now you can start the vm (if you put ~/.local/bin
in your path)
start_vm
The installer options should allow you to install open-ssh server. Do not import an ssh key, and password auth will be enabled by default
if you would like to login to the vm easily, add the following to ~/.ssh/config
:
Host vm
User <if different than local>
HostName localhost
Port 5555
ForwardX11Trusted yes
ssh to the machine with ssh vm
Finally you could add your ssh key to the box
ssh-copy-id vm