Skip to content

Qemu VM

jiangcuo edited this page Aug 4, 2024 · 2 revisions

Create qemu vm

vm config

OVMF or Seabios ?

We recommend configured OVMF for arm64 vm. If you guest can't support uefi boot, pls set args eg. -kernel xxx --append xxx, visit qemu-pdf see more

Note.

    1. Your ISO images need to support the EFI environment in order to boot. Most common distributions have EFI ISO that supports aarch64.
    1. Don't enable [Pre-Enroll Key] in vm setup page

Machine type

Default machine type is virt and show as i440fx on web gui.Q35 is not supported

Do not change it and keep verison = latest.

You can use command qm set {vmid} --delete machine if you wan't recovery.

SCSI controller

Only support VirtIO SCSIVirtIO SCSI singlevirtio-blk controller.Ide disk is not supported.

We recommend configured virtio-scsi-pci (VirtIO SCSI).VirtIO SCSI single or virtio-blk will take up a lot of pci slots and not perfect in this project

CDROM or Cloud-Init

Please use scsi or sata type.

CPU type

max or host are required , default type is host. These 2 types will use KVM acceleration to get the best performance,The others will use TCG acceleration.

Netdev

virtio is recommended.

Display

Default type is virtio-gpu , you can use ramfb if you want install windows. We recommend add a serial on linux guest. See https://pve.proxmox.com/wiki/Serial_Terminal

Create a simple qemu vm from terminal

download cloud-images from ubuntu.com

wget -P /root http://cloud-images.ubuntu.com/jammy/current/jammy-server-cloudimg-arm64.img create vm

qm create 100
--name qemuvm
--ostype l26
--cpu host
--cores 1
--memory 1024
--scsihw virtio-scsi-pci
--net0 virtio,bridge=vmbr0
--bios ovmf
--efidisk0 local:0,efitype=4m,size=64M,format=qcow2
--serial0 socket
--scsi0 local:0,import-from=/root/jammy-server-cloudimg-arm64.img,format=qcow2
--scsi1 local:cloudinit
--ciuser root
--cipassword rootroot
--ipconfig0 ip=dhcp
--boot order=scsi0 now you can use qm start 100 && qm terminal 100 to see vm boot log.

default user is root, password is rootroot