Ask Your Question
1

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

Hi,

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="0.0.0.0" keymap="en-us"> <listen type="address" address="0.0.0.0"/> </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

Comments

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
2

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/config.py and virt/libvirt/driver.py after rebooting instance via nova. Details here :-
http://bderzhavets.blogspot.com/2015/...
Original post for IceHouse by Y.Kawada
http://www.slideshare.net/YukihiroKaw...

edit flag offensive delete link more

Comments

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
0

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

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

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

Seen: 2,068 times

Last updated: Jun 20 '15