New to virtualization and kvm and I have a problem when i try to create a virtual machine with spice:
virt-install --name Windows-7-x64 --ram 2048 --disk path=~/kvm/images/win7.img,size=50 --vcpus=1 --os-type windows --os-variant=win7 --graphics spice,port=5900,listen=0.0.0.0,password=test --video qxl --cdrom ~/Downloads/en_windows_7_professional_with_sp1_x64_dvd_u_676939.iso
ERROR unsupported configuration: Auto allocation of spice TLS port requested but spice TLS is disabled in qemu.conf
I would assume that TLS have to be configured somehow but after having a look at qemu and uncommenting the lines for spice:
spice_tls = 1
spice_tls_x509_cert_dir = "/etc/pki/libvirt-spice
Not sure how to configure TLS ??
Just a brief scenario i am trying to setup vm's on KVM with spice and access them from another computer whether it's linux or windows from virt-viewer.
A quick question as well how secure that connection over a LAN or WAN.
Thanks any help is appreciated.
Update:
I got around the problem by disabling the port 5900 then edit it in the template after the installation from this post: How to create KVM guest with SPICE graphics but TLS disabled using virt-install?
But i still believe that the connection is not over TLS so i would appreciate if someone explain this process.
Hint: For Centos users i could not connect to KVM from another machine with spice viewer until i opened port 5900 on the server through firewalld [Centos 7] or iptables [Centos 6] even if selinux is disabled.
spice_listen
in/etc/libvirt/qemu.conf
to anything else than the loopback IP? Check where the process listens to usingnetstat -ltnp
.