Friday 8 November 2019

Auto allocation of spice TLS ports requested but spice TLS is disabled in qemu.conf

I am not sure why this happens. My best guess is that there is some kind of address or port mangling. So you just a created a VM using libvirt/qemu in LTS Ubuntu 18.04 and you want to change spice options in order to access the VM with an other tool like remmina..

This does not happen always, But in my experience. it always happens when the VM nic is connected to the QEMU internal NAT, and you try to specify a custom spice port. If you use bridging and then link the virtual machine's network card to the host machine's bridging interfaces, chances are that the virtual machine will start normally.

The next thing that worked for me was to tamper with the VM's settings using the virsh generated XML file. So log in the host machine and asyming that you vm's name is my-vm, enter the following command

virsh --connecy qemu:///system dumpxml my-vm > my-vm.xml

This will create a my-vm.xml xml file. Open it with your favourite text editor and locate the line that starts with graphics. Change it so looks like this:


    <graphics type='spice' port='5901' autoport='no' listen='0.0.0.0'>
      <listen type='address' address='0.0.0.0'/>
    </graphics>

In this case the port number is 5901. Pick your own number. Save the file and then use virsh to apply the changes.

virsh --connect qemu:///system define my-vm.xml

Start the virtual machine with a command like virsh start my-vm or with the graphical Virtual machine manager Tool. In my case, "it" worked afterwards :)

No comments :