qemu安装ubuntu
操作系统: Ventura
cpu:m1
安装命令
qemu-system-aarch64 -machine virt,accel=hvf -m 8G -smp 8 -cpu host -drive if=virtio,format=raw,file=./ubuntu.img -nographic
启动命令:
# qemu安装ubuntu
alias ubuntu='cd ~/qemu/ && qemu-system-aarch64 \
-M virt,highmem=off \
-accel hvf \
-cpu host \
-smp 4 \
-m 3000 \
-bios QEMU_EFI.fd \
-device virtio-gpu-pci \
-display default,show-cursor=on \
-device qemu-xhci \
-device usb-kbd \
-device usb-tablet \
-device intel-hda \
-device hda-duplex \
-drive file=ubuntu-latest.raw,format=raw,if=virtio,cache=writethrough -net nic -net user,hostfwd=tcp::2222-:22 \
-nographic'
- 启动后使用
ssh -p 2222 localhost登录 - 不能将进程放到后台,一旦放到后台,状态就会立刻变成 suspended (tty output)
qemu安装ubuntu
Run Ubuntu in QEMU on MacOS (Apple Silicon) - Adonis's Blog this not work for me
Run Ubuntu On Mac Using QEMU » The Bored Dev
https://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/