kcli
kcli copied to clipboard
Unable to launch VM on Red Hat Enterprise Linux release 9.0 (Plow)
I ran the following command on RHEL 9 and I am receiving the error below.
sudo kcli create vm -p ztpfwjumpbox jumpbox --wait
➜ sudo kcli create vm -p ztpfwjumpbox jumpbox --wait
[sudo] password for admin:
Deploying vm jumpbox from profile ztpfwjumpbox...
xorriso 1.5.4 : RockRidge filesystem manipulator, libburnia project.
Got storage volume 'jumpbox.ISO' exists already when creating iso
Traceback (most recent call last):
File "/bin/kcli", line 33, in <module>
sys.exit(load_entry_point('kcli==99.0', 'console_scripts', 'kcli')())
File "/usr/lib/python3.9/site-packages/kvirt/cli.py", line 5058, in cli
args.func(args)
File "/usr/lib/python3.9/site-packages/kvirt/cli.py", line 1334, in create_vm
result = config.create_vm(name, profile, overrides=overrides, customprofile=customprofile,
File "/usr/lib/python3.9/site-packages/kvirt/config.py", line 1009, in create_vm
result = k.create(name=name, virttype=virttype, plan=plan, profile=profilename, flavor=flavor,
File "/usr/lib/python3.9/site-packages/kvirt/providers/kvm/__init__.py", line 1266, in create
conn.defineXML(vmxml)
File "/usr/lib64/python3.9/site-packages/libvirt.py", line 4414, in defineXML
raise libvirtError('virDomainDefineXML() failed')
libvirt.libvirtError: unsupported configuration: spice graphics are not supported with this QEMU
Profile Example
ztpfwjumpbox:
image: 'CentOS-Stream-GenericCloud-9-20220718.0.x86_64.qcow2'
numcpus: 4
memory: 8192
disks:
- size: 50
reservedns: true
nets:
- name: qubinet
- name: bare-net
cmds:
- echoCHANGEME| passwd --stdin root
- useradd admin
- usermod -aG wheel admin
- echo CHANGEME | passwd --stdin admin
- dnf groupinstall "Server with GUI" -y
- dnf install epel-release -y
- dnf install xrdp -y
- systemctl enable xrdp --now
- firewall-cmd --permanent --add-port=3389/tcp
- firewall-cmd --reload
$ cat /usr/lib/python3.9/site-packages/kvirt/providers/kvm/__init__.py
296 if vnc:
297 display = 'vnc'
298 else:
299 display = 'spice'
300 volumes = {}
do you mind validating that a vm created with vnc does launch fine? just use vnc: true in your profile for that matter
When I use a bridge network it gets stuck in this loop. but VNC does work in the cockpit UI.
sudo kcli create vm -p centos9stream testvm
Deploying vm testvm from profile centos9stream...
xorriso 1.5.4 : RockRidge filesystem manipulator, libburnia project.
Creating dns entry for testvm in network qubinet
Waiting 5 seconds to grab ip...
Waiting 5 seconds to grab ip...
Waiting 5 seconds to grab ip...
Waiting 5 seconds to grab ip...
Waiting 5 seconds to grab ip...
Waiting 5 seconds to grab ip...
Waiting 5 seconds to grab ip...
Waiting 5 seconds to grab ip...
Waiting 5 seconds to grab ip...
Waiting 5 seconds to grab ip...
Waiting 5 seconds to grab ip...
Waiting 5 seconds to grab ip...
Waiting 5 seconds to grab ip...
The same issue occurs when i use nat bare-net
sudo kcli create vm -p centos9stream testvm
Deploying vm testvm from profile centos9stream...
xorriso 1.5.4 : RockRidge filesystem manipulator, libburnia project.
Creating dns entry for testvm in network qubinet
Waiting 5 seconds to grab ip...
Waiting 5 seconds to grab ip...
Waiting 5 seconds to grab ip...
Waiting 5 seconds to grab ip...
Waiting 5 seconds to grab ip...
Waiting 5 seconds to grab ip...
Waiting 5 seconds to grab ip...
Waiting 5 seconds to grab ip...
Waiting 5 seconds to grab ip...
Waiting 5 seconds to grab ip...
Waiting 5 seconds to grab ip...
Waiting 5 seconds to grab ip...
Waiting 5 seconds to grab ip...
Waiting 5 seconds to grab ip...
Waiting 5 seconds to grab IP...
sorry, been afk last entire week, i will be back online on wednesday and will test rhel9 hv
so indeed spice is getting removed from rhel9, as indicated in https://access.redhat.com/articles/442543 using vnc does work as expected though so i need to decide whether:
- we default to vnc from now on
- we force vnc if we can somehow figure out the hypervisor is rhel9
fixed in https://github.com/karmab/kcli/commit/d399261800adb59fdfed37a97ee08b8690ed6c66 where we default to vnc
(a following commit made sure to handle vnc clients from macosx by leveraging built in vnc client, at the cost of using a hidden vnc password in this special case since it's required by said client)