执行virt-install创建虚拟机时提示“ERROR --os-variant/--osinfo OS name is required, but no value was set or detected.”。
ERROR --os-variant/--osinfo OS name is required, but no value was set or detected. This is now a fatal error. Specifying an OS name is required for modern, performant, and secure virtual machine defaults. If you expected virt-install to detect an OS name from the install media, you can set a fallback OS name with: --osinfo detect=on,name=OSNAME You can see a full list of possible OS name values with: virt-install --osinfo list If your Linux distro is not listed, try one of generic values such as: linux2022, linux2020, linux2018, linux2016 If you just need to get the old behavior back, you can use: --osinfo detect=on,require=off Or export VIRTINSTALL_OSINFO_DISABLE_REQUIRE=1
根因:Ubuntu系统上安装非官方系统时,会因为UEFI Secure Boot而被阻止。
virt-install --name=kylin --vcpus=4 --ram=8192 --disk path=/home/kvm/images/kylin.img,format=qcow2,size=100,bus=virtio --cdrom /home/kvm/Kylin-Server-10-SP2-aarch64-Release-Build09-20210524.iso --network bridge=virbr0,model=virtio --force --autostart --graphic vnc,listen=0.0.0.0,port=5906 --input type=tablet,bus=usb --input type=keyboard,bus=virtio --osinfo detect=on,require=off
Cnnected to domain ‘kylin’ Escape character is ^] (Ctrl + ]) Press ESC in 1 seconds to skip startup.nsh or any other key to continue Shell>
virt-manager