我正在尝试将工作 qemu 命令转换为 virt-install 参数。工作命令是:
qemu-system-x86_64 -bios /usr/share/OVMF/OVMF_CODE.fd -boot c -drive file=/vm/image.qcow2,if=none,id=NVME1 -device nvme,drive=NVME1,serial=nvme-1 -m 4G -cpu host -enable-kvm
...我什么想法使用 virt-install 进行一对一转换最终会出现错误:
sudo virt-install --boot loader=/usr/share/OVMF/OVMF_CODE.fd --boot cdrom,hd --disk none --qemu-commandline='-drive file=/vm/image.qcow2,format=qcow2,if=none,id=NVME1 -device nvme,drive=NVME1,serial=nvme-1' --memory 4096 --os-variant rhel9.0 --name Test
这会导致此错误:
Starting install... ERROR internal error: process exited while connecting to monitor: 2023-06-01T00:16:40.801184Z qemu-system-x86_64: -drive file=/vm/image.qcow2,format=qcow2,if=none,id=NVME1: Could not open '/vm/image.qcow2': Permission denied.
Domain installation does not appear to have been successful. If it was, you can restart your domain by running: virsh --connect qemu:///system start Test otherwise, please restart your installation.
我很困惑。我是 QEMU/KVM/libvirt 新手,所以我深入研究了文档,但无济于事。