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'

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

各种资源国内镜像

ubuntu 镜像替换

https://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/