如何修复 Ubuntu 20.04 主机上的 virt-install 错误?

How to fix virt-install error on Ubuntu 20.04 Hosts?

我需要帮助解决在我的 20.04 主机上安装来宾的问题。

DISTRIB_DESCRIPTION="Ubuntu 20.04.1 LTS"
virtinst                             1:2.2.1-3ubuntu2
python3                              3.8.2-0ubuntu2
python-is-python3                    3.8.2-4
python3-distutils                    3.8.2-1ubuntu1
python3-libvirt                      6.1.0-1
libvirt-daemon-system                6.0.0-0ubuntu8.4
qemu-kvm                             1:4.2-3ubuntu6.6

root@machine20:~# which python
/usr/bin/python 
root@machine20:~# ls -l /usr/bin/python
lrwxrwxrwx 1 root root 7 Apr 15 12:45 /usr/bin/python -> python3



root@machine20:~# /usr/bin/virt-install --name mvmubu18 --vcpus 2 --memory 4096 --network network=virbrapp,trustGuestRxFilters=yes,model=virtio --mac ae:20:18:10:08:0a --noautoconsole --wait -1 --location http://install/installer-ubuntu1804-amd64/ --disk path=/srv/images/18.04/ubu18_root.img,size=20,format=raw '--extra-args=locale=en_US auto=true priority=critical s390-netdevice/choose_networktype=virtio netcfg/use_autoconfig=true netcfg/disable_dhcp=false network-console/start=true url=http://install/preseeds/mustervm-bionic.seed'
ERROR    '>=' not supported between instances of 'NoneType' and 'str'

看来错误信息是由--location http://... 参数引起的。 例如,如果我使用 --boot cdrom,hd,该命令会按预期工作。

谢谢

仅供参考:

目录结构似乎有问题。 请参阅:https://bugs.launchpad.net/ubuntu-z-systems/+bug/1872941

但是,这仍然存在于当前可用的 focal/universe 软件包中: virt-manager 1:2.2.1-3ubuntu2

如果您像我一样运行 解决这个问题,那么上游版本就是您要找的。 另见:https://github.com/virt-manager/virt-manager/issues/171