Ask Your Question

Switching from VNC to SPICE console

asked 2015-04-14 09:39:02 -0500

schegi gravatar image

updated 2015-04-14 13:22:40 -0500


we currently switched from VNC to SPICE as concole used by nova. During this, we encountered the issue that the remote console type is defined on instance creation and switching the supported console does not changes this setting. This results in an "Unavailable console type spice" error, if you try to access the console on instances created previous to the change.

We resolved this issue by changing the console type in the libvirt .xml machine describtion by hand (a script). After this change and a reboot of the Instance the SPICE console also works for the already existing instances in our cloud.

To change the console for an instance manually, you have to change the following lines in the libvirt .xml configuration file for each instance. ( These files can usually be found at /etc/libvirt/ or you can access them with virsh edit <instance-name> ) In these line you have to set the 'type' from vnc to spice, thats all.

<graphics type="vnc" autoport="yes" listen="" keymap="en-us"> <listen type="address" address=""/> </graphics>

Only thing to do now is to restart the instance. This method works well for us but i like to know if there is a more convenient method especially for bigger setups. Or if i am messing somehow with the database, by changing this manually. I searched for a related entry in the nova tables of the database but didn't found anything.

Thy Stefan

edit retag flag offensive close merge delete


If your are trying to do this you have to edit the Instance declaration .xml file using virsh edit. Otherwise you'll have do redefine the VM after the edit.

schegi gravatar imageschegi ( 2015-04-16 04:14:16 -0500 )edit

2 answers

Sort by ยป oldest newest most voted

answered 2015-06-20 04:07:35 -0500

dbaxps gravatar image

In regards of RDO Kilo , manual update of libvirt.xml doesn't make any sense. Libvirt.xml will be regenerated according classes and methods defined in virt/libvirt/ and virt/libvirt/ after rebooting instance via nova. Details here :-
Original post for IceHouse by Y.Kawada

edit flag offensive delete link more


We tried this for Juno and it just worked fine. But if libvirts xml VM declarations are rebuild after reboot, perfect then just switching from vnc to spice in the nova.conf should be sufficient.

schegi gravatar imageschegi ( 2015-06-26 12:45:48 -0500 )edit

Yes, it is.

dbaxps gravatar imagedbaxps ( 2015-06-26 12:58:13 -0500 )edit

answered 2016-01-25 08:54:21 -0500

To rebuild instance xml file you could reboot hard the instance with following command:

nova reboot --hard VM_NAME

I can confirm that this works for OpenStack Icehouse release.

edit flag offensive delete link more

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower


Asked: 2015-04-14 09:39:02 -0500

Seen: 2,313 times

Last updated: Jun 20 '15