https://kaisawind.oschina.io/2019/11/26/2019-11-26-qemu/
https://bbs.huaweicloud.com/forum/thread-27096-1-1.html

linux

  1. ubuntu安装qemu
    sudo apt-get install qemu
    sudo apt-get install qemu-arm
    sudo apt-get install qemu
    sudo apt-get install qemu-system
    sudo apt-get install qemu-user

修改/var/run/libvirt/目录下面的libvirt-sock文件权限为777

sudo apt-get install qemu-efi

windows

https://blog.csdn.net/csrh131/article/details/119205155
https://blog.csdn.net/qq_33037487/article/details/112472759
https://blog.csdn.net/vah101/article/details/116732656
https://blog.csdn.net/qq_33037487/article/details/112472759

qemu-img.exe create -f qcow2 D:\6.VirtualMachine\CentOS7_aarch64\centos7-aarch64.qcow2 50G

“D:\Program Files\qemu\qemu-system-aarch64.exe” ^
-m 4096 -cpu cortex-a72 -smp 2,sockets=1,cores=2 -M virt ^
-bios D:\6.VirtualMachine\CentOS7_aarch64\QEMU_EFI.fd ^
-device VGA -device nec-usb-xhci -device usb-mouse -device usb-kbd ^
-drive if=none,file=D:\6.VirtualMachine\CentOS7_aarch64\centos7-aarch64.qcow2,id=hd0 -device virtio-blk-device,drive=hd0 ^
-drive if=none,file=D:\14.Downloads\CentOS-7-aarch64-Minimal-2009.iso,id=cdrom,media=cdrom ^
-device virtio-scsi-device -device scsi-cd,drive=cdrom ^
-net nic -net tap,ifname=tap0

“D:\Program Files\qemu\qemu-system-aarch64.exe” ^
-m 4096 -cpu cortex-a72 -smp 2,sockets=1,cores=2 -M virt ^
-bios D:\6.VirtualMachine\CentOS7_aarch64\QEMU_EFI.fd ^
-device VGA -device nec-usb-xhci -device usb-mouse -device usb-kbd ^
-drive if=none,file=D:\6.VirtualMachine\CentOS7_aarch64\centos7-aarch64.qcow2,id=hd0 -device virtio-blk-device,drive=hd0 ^
-device virtio-scsi-device ^
-net nic -net tap,ifname=tap0

qemu-system-aarch64.exe -m 2048 -cpu cortex-a72 -smp 2,cores=2,threads=1,sockets=1 -M virt -bios D:\qemu\bios\QEMU_EFI.fd -net nic,model=pcnet -device VGA -drive if=none,file=D:\qemu\iso\ubuntu-18.04.5-server-arm64.iso,id=cdrom,media=cdrom -device virtio-scsi-device -device scsi-cd,drive=cdrom -drive if=none,file=D:\qemu\vm\test\hdd1.img,id=hd0 -device virtio-blk-device,drive=hd0

c:\qemu\qemu-system-aarch64.exe -m 2048 -cpu cortex-a72 -smp 2,cores=2,threads=1,sockets=1 -M virt -bios D:\qemu\bios\QEMU_EFI.fd -net nic,model=pcnet -device VGA -drive if=none,file=d:\download\ubuntu-18.04.2-server-arm64.iso,id=cdrom,media=cdrom -device virtio-scsi-device -device scsi-cd,drive=cdrom -drive if=none,file=D:\qemu\vm\test_kunpeng\hdd01.img,id=hd0 -device virtio-blk-device,drive=hd0

qemu-system-aarch64 -m 4096 -cpu cortex-a57 -smp 2 -M virt -bios QEMU_EFI.fd -nographic -drive if=none,file=ubuntu-18.04.3-server-arm64.iso,id=cdrom,media=cdrom -device virtio-scsi-device -device scsi-cd,drive=cdrom -drive if=none,file=ubuntu.img,id=hd0 -device virtio-blk-device,drive=hd0

qemu-system-aarch64 -m 4096 -cpu cortex-a57 -smp 2 -M virt -bios QEMU_EFI.fd -drive if=none,file=uniontechos-desktop-20-professional-1030_arm64.iso,id=cdrom,media=cdrom -device virtio-scsi-device -device scsi-cd,drive=cdrom -drive if=none,file=uos.img,id=hd0 -device virtio-blk-device,drive=hd0

qemu-system-aarch64.exe -m 8192 -cpu cortex-a72 -smp 4 -M virt -bios QEMU_EFI.fd -nographic -drive if=none,file=e:\arm64-centos8\disk1.qcow2,id=hd0 -device virtio-blk-device,drive=hd0 -drive if=none,file=e:\CentOS-8.1.1911-aarch64-dvd1.iso,id=cdrom,media=cdrom -device virtio-scsi-device -device scsi-cd,drive=cdrom -net nic -net user,hostfwd=tcp::2222-:22

qemu-system-aarch64.exe -m 2048 -cpu cortex-a72 -smp 2,cores=2,threads=1,sockets=1 -M virt -bios QEMU_EFI.fd -net nic,model=pcnet -device VGA -drive if=none,file=ubuntu-20.04.3-live-server-arm64.iso,id=cdrom,media=cdrom -device virtio-scsi-device -device scsi-cd,drive=cdrom -drive if=none,file=ubuntu.img,id=hd0 -device virtio-blk-device,drive=hd0

能够显示,但无法操作鼠标和键盘
qemu-system-aarch64.exe
-m 2048
-cpu cortex-a72
-smp 2,cores=2,threads=1,sockets=1
-M virt
-bios QEMU_EFI.fd
-net nic,model=pcnet
-device VGA
-drive if=none,file=uniontechos-desktop-20-professional-1030_arm64.iso,id=cdrom,media=cdrom
-device virtio-scsi-device
-device scsi-cd,drive=cdrom
-drive if=none,file=uos.img,id=hd0
-device virtio-blk-device,drive=hd0

其他链接

参考资料:https://kaisawind.oschina.io/2019/11/26/2019-11-26-qemu/

# create_ubuntu.bat
qemu-img create ubuntu.img 50G

qemu-system-aarch64 ^
-m 2048  ^
-cpu cortex-a72  ^
-smp 2,cores=2,threads=1,sockets=1 -M virt ^
-bios QEMU_EFI.fd ^
-net nic,model=pcnet ^
-device VGA -device nec-usb-xhci -device usb-mouse -device usb-kbd ^
-drive if=none,file=ubuntu-20.04.3-live-server-arm64.iso,id=cdrom,media=cdrom ^
-device virtio-scsi-device ^
-device scsi-cd,drive=cdrom ^
-drive if=none,file=ubuntu.img,id=hd0 ^
-device virtio-blk-device,drive=hd0 


# create.bat
qemu-img create uos.img 100G

qemu-system-aarch64 ^
-m 2048  ^
-cpu cortex-a72  ^
-smp 2,cores=2,threads=1,sockets=1 -M virt ^
-bios QEMU_EFI.fd ^
-net nic,model=pcnet ^
-device VGA -device nec-usb-xhci -device usb-mouse -device usb-kbd ^
-drive if=none,file=uniontechos-desktop-20-professional-1030_arm64.iso,id=cdrom,media=cdrom ^
-device virtio-scsi-device ^
-device scsi-cd,drive=cdrom ^
-drive if=none,file=uos.img,id=hd0 ^
-device virtio-blk-device,drive=hd0 


# create_uos.bat
qemu-img create uos.img 100G

qemu-system-aarch64 ^
-m 2048  ^
-cpu cortex-a72  ^
-smp 2,cores=2,threads=1,sockets=1 -M virt ^
-bios QEMU_EFI.fd ^
-net nic,model=pcnet ^
-device VGA -device nec-usb-xhci -device usb-mouse -device usb-kbd ^
-drive if=none,file=uniontechos-desktop-20-professional-1030_arm64.iso,id=cdrom,media=cdrom ^
-device virtio-scsi-device ^
-device scsi-cd,drive=cdrom ^
-drive if=none,file=uos.img,id=hd0 ^
-device virtio-blk-device,drive=hd0 
Logo

更多推荐