Skip to content
This repository has been archived by the owner on Dec 16, 2023. It is now read-only.

Qemu VM

jiangcuo edited this page Dec 31, 2022 · 3 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

  • Machine type

    Default machine type is virt and show asi440fx on web gui.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. no ide and sata disk support.

    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 type.

  • CPU type

    max or host is recommended, default type is host

  • 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