开发教程

qemu-vm-script-x86_64

雪***草级版主 发表于 2024-6-8 · 最后回复 2024-6-8 IP:天津 1,754 1
本帖最后由 雪球♡ 于 2024-6-8 20:51 编辑

qemu-vm-script-x86_64

If you want to install a virtual machine in a x86_64 device by QEMU, you can following the steps.

System requirements

  • At least 2 core CPU
  • At least 4 GB RAM
  • At least 50 GB disk space
  • CPU virtualization enabled
  • QEMU installed

Steps

This example shows installing Debian 7.5.0 based on QEMU on Ubuntu 22.04, Other versions may have some differences, please refer to the user documentation for different operating systems.

  1. Create a virtual disk:

    qemu-img create -f qcow2 -o cluster_size=128K virt_disk.qcow2 20G
  2. Copy an EFI.fd file to your path:

    sudo cp /usr/share/ovmf/OVMF.fd EFI.fd
  3. Set up launch script parameter:

    sudo vim launch.sh
  4. Check the file structure:

    debian
    ├── debian-7.5.0-amd64-netinst.iso
    ├── EFI.fd
    ├── lingmo-debian-vm.qcow2
    └── start.sh
  5. Launch the VM:

    sudo sh launch.sh


原帖地址: https://github.com/TeamVastsea/qemu-vm-script-x86_64
脚本地址: https://github.com/TeamVastsea/q ... blob/main/launch.sh
回复 1 最早 最新 只看楼主
您需要登录后才可以回帖 登录 | 立即注册
本版积分规则