qemu-system-aarch64.exe -m 8192 -cpu cortex-a72 -smp 8,sockets=4,cores=2 -M virt -bios F:\qemuReady\QEMU_EFI.fd -device VGA -device nec-usb-xhci -device usb-mouse -device usb-kbd -drive if=none,file=F:\qemu-arm64\kylindis.qcow2,id=hd0 -device virtio-blk-device,drive=hd0 -drive if=none,file=F:\qemuReady\Kylin-Desktop-V10-SP1-2403-Release-20240430-arm64.iso,id=cdrom,media=cdrom -device virtio-scsi-device -device scsi-cd,drive=cdrom -net nic -net tap,ifname=tap0
创建空间:
qemu-img.exe create -f qcow2 F:\qemu-arm64\kylindis.qcow2 50G
创建空间
qemu-system-aarch64.exe -m 8192 -cpu cortex-a72 -smp 8,sockets=4,cores=2 -M virt -device VGA -device nec-usb-xhci -device usb-mouse -device usb-kbd -drive if=none,file=F:\qemu-arm64\kylindis.qcow2,id=hd0 -device virtio-blk-device,drive=hd0 -drive if=none,file=F:\qemuReady\Kylin-Desktop-V10-SP1-2403-Release-20240430-arm64.iso,id=cdrom,media=cdrom -device virtio-scsi-device -device scsi-cd,drive=cdrom -net nic
安装麒麟系统:
qemu-system-aarch64.exe -m 8192 -cpu cortex-a72 -smp 8,sockets=4,cores=2 -M virt -bios F:\qemuReady\QEMU_EFI.fd -device VGA -device nec-usb-xhci -device usb-mouse -device usb-kbd -drive if=none,file=F:\qemu-arm64\kylindis.qcow2,id=hd0 -device virtio-blk-device,drive=hd0 -drive if=none,file=F:\qemuReady\Kylin-Desktop-V10-SP1-2403-Release-20240430-arm64.iso,id=cdrom,media=cdrom -device virtio-scsi-device -device scsi-cd,drive=cdrom
qemu-system-aarch64.exe -m 8192 -cpu cortex-a72 -smp 8,sockets=4,cores=2 -M virt -bios F:\qemuReady\QEMU_EFI.fd -device VGA -device nec-usb-xhci -device usb-mouse -device usb-kbd -drive if=none,file=F:\qemu-arm64\kylindis.qcow2,id=hd0 -device virtio-blk-device,drive=hd0 -drive if=none,file=F:\qemuReady\Kylin-Desktop-V10-SP1-2403-Release-20240430-arm64.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 8192 -cpu cortex-a72 -smp 8,sockets=4,cores=2 -M virt -bios F:\qemuReady\QEMU_EFI.fd -device VGA -device nec-usb-xhci -device usb-mouse -device usb-kbd -drive if=none,file=F:\qemu-arm64\kylindis.qcow2,id=hd0 -device virtio-blk-device,drive=hd0 -device virtio-scsi-device -net nic -net tap,ifname=tap0
qemu-system-aarch64.exe -m 8192 -cpu cortex-a72 -smp 8,sockets=4,cores=2 -M virt -bios F:\qemuReady\QEMU_EFI.fd -device VGA -device nec-usb-xhci -device usb-mouse -device usb-kbd -drive if=none,file=F:\qemu-arm64\kylindis.qcow2,id=hd0 -device virtio-blk-device,drive=hd0 -device virtio-scsi-device -net nic -net user,hostfwd=tcp:2222-:22
创建快照:
qemu-img.exe snapshot -c snapshot_name F:\qemu-arm64\kylindis.qcow2
恢复快照:
qemu-img.exe snapshot -a snapshot_name F:\qemu-arm64\kylindis.qcow2
删除快照:
qemu-img.exe snapshot -d snapshot-name F:\qemu-arm64\kylindis.qcow2
镜像中快照列表:
qemu-img.exe snapshot -l F:\qemu-arm64\kylindis.qcow2
共享文件:
qemu-system-aarch64 -m 1024 -drive format=raw,file=F:\qemu-arm64\kylindis.qcow2 -virtfs local,path=F:\mnt\shared,mount_tag=host0,security_model=passthrough,id=host0
sudo mount -t cifs //192.168.1.53/mnt /data/mnt -o username=Admin,password=xxxx1234
参考:https://blog.csdn.net/qq_42055933/article/details/135497642