Current post briefly describes conversion to dashboard Spice console along with
enabling spice console features as sound and cut&&paste via slightly updated
patches of Y.Kawada ( and converted from pdf to raw format). To get this features working using any spice-gtk tools ( spicy, virt-manager ) requires ports 5900,...,590(X) to be opened via ipv4 iptables firewall on node running openstack-nova-compute.
***********************************
Set up delorean repos
***********************************
Run packstack AIO install and set up "br-ex" for external network as required
*******************************************************************************
[root@CentOS71503Server ~(keystone_admin)]# cat ifcfg-br-ex
DEVICE="br-ex"
BOOTPROTO="static"
IPADDR="192.168.1.112"
NETMASK="255.255.255.0"
DNS1="83.221.202.254"
BROADCAST="192.168.1.255"
GATEWAY="192.168.1.1"
NM_CONTROLLED="no"
TYPE="OVSIntPort"
OVS_BRIDGE=br-ex
DEVICETYPE="ovs"
DEFROUTE="yes"
IPV4_FAILURE_FATAL="yes"
IPV6INIT=no
[root@CentOS71503Server ~(keystone_admin)]# cat ifcfg-enp3s0
DEVICE="enp3s0"
ONBOOT="yes"
TYPE="OVSPort"
DEVICETYPE="ovs"
OVS_BRIDGE=br-ex
NM_CONTROLLED=no
IPV6INIT=no
**************
Next:-
**************
[root@CentOS71503Server ~(keystone_admin)]# chkconfig network on
[root@CentOS71503Server ~(keystone_admin)]# systemctl stop NetworkManager
[root@CentOS71503Server ~(keystone_admin)]# systemctl disable NetworkManager
[root@CentOS71503Server ~(keystone_admin)]# service network restart
( or reboot )
***********************************************************
Install nova-spicehtml5proxy package
***********************************************************
[root@CentOS71503Server ~(keystone_admin)]# yum -y install epel-release
[root@CentOS71503Server ~(keystone_admin)]# yum -y install spice-html5
[root@CentOS71503Server ~(keystone_admin)]# yum -y install openstack-nova-spicehtml5proxy
************************************
Update /etc/nova/nova.conf :-
************************************
[DEFAULT]
. . . . .
web=/usr/share/spice-html5
. . . . . .
spicehtml5proxy_host=0.0.0.0
spicehtml5proxy_port=6082
. . . . . . .
# Disable VNC
vnc_enabled=false
. . . . . . .
[spice]
html5proxy_base_url=http://192.168.1.112:6082/spice_auto.html
server_proxyclient_address=127.0.0.1
server_listen=0.0.0.0
enabled=true
agent_enabled=true
keymap=en-us
:wq
# service httpd restart
# service openstack-nova-compute restart
# service openstack-nova-spicehtml5proxy start
# systemctl enable openstack-nova-spicehtml5proxy
*********************************************************************
Update /etc/sysconfig/iptables on Compute :-
*********************************************************************
-A INPUT -p tcp -m state --state NEW -m tcp --dport 6082 -j ACCEPT
[root@ip-192-169-142-137 sysconfig]# service iptables restart
I've got sound working on CentOS 7.1 Cloud VM ,"GNOME Desktop" installed, and F22 Cloud VM, "MATE Desktop"&& "workstation-product-environment"
installed followed by `systemctl set-default graphical.target`.
with slightly updated patch of Y.Kawada , self.type set to "ich6" for Linux guests.
Raw text of Y.Kawada patches (been written for IceHouse Openstack release) may be obtained here
Patch virt/libvirt/config.py and virt/libvirt/driver.py and restart nova-compute
# python -m py_compile config.py
# python -m py_compile driver.py
# systemctl restart openstack-nova-compute
Ports 5900,..,5910 should be open on RDO Liberty AIO host via ipv4 iptables
firewall for Virt-Manager connections
[root@CentOS71503Server ~(keystone_admin)]# virsh list
Id Name State
----------------------------------------------------
4 instance-00000003 running
6 instance-00000002 running
7 instance-00000004 running
[root@CentOS71503Server ~(keystone_admin)]# virsh dumpxml instance-00000003
<domain type='kvm' id='4'>
<name>instance-00000003</name>
<uuid>fcbef681-bae7-4503-b56a-24f2d67d92f0</uuid>
<metadata>
<nova:instance xmlns:nova="http://openstack.org/xmlns/libvirt/nova/1.0">
<nova:package version="12.0.0-rc3.dev1.el7.centos"/>
<nova:name>CentOS71Devs</nova:name>
<nova:creationTime>2015-10-17 15:32:51</nova:creationTime>
<nova:flavor name="m1.medium">
<nova:memory>4096</nova:memory>
<nova:disk>40</nova:disk>
<nova:swap>0</nova:swap>
<nova:ephemeral>0</nova:ephemeral>
<nova:vcpus>2</nova:vcpus>
</nova:flavor>
<nova:owner>
<nova:user uuid="8ba153fc5fe947e499edf0a802395f5e">demo</nova:user>
<nova:project uuid="248d19ccd0b94cf9b8fcc25f4f083c08">demo</nova:project>
</nova:owner>
<nova:root type="image" uuid="65f257cb-0899-4bf3-a888-505d0bd4cc13"/>
</nova:instance>
</metadata>
<memory unit='KiB'>4194304</memory>
<currentMemory unit='KiB'>4194304</currentMemory>
<vcpu placement='static'>2</vcpu>
<cputune>
<shares>2048</shares>
</cputune>
<resource>
<partition>/machine</partition>
</resource>
<sysinfo type='smbios'>
<system>
<entry name='manufacturer'>Fedora Project</entry>
<entry name='product'>OpenStack Nova</entry>
<entry name='version'>12.0.0-rc3.dev1.el7.centos</entry>
<entry name='serial'>935292d3-1d87-4641-9bd7-ba80176e0135</entry>
<entry name='uuid'>fcbef681-bae7-4503-b56a-24f2d67d92f0</entry>
<entry name='family'>Virtual Machine</entry>
</system>
</sysinfo>
<os>
<type arch='x86_64' machine='pc-i440fx-rhel7.0.0'>hvm</type>
<boot dev='hd'/>
<smbios mode='sysinfo'/>
</os>
<features>
<acpi/>
<apic/>
</features>
<cpu mode='host-model'>
<model fallback='allow'/>
<topology sockets='2' cores='1' threads='1'/>
</cpu>
<clock offset='utc'>
<timer name='pit' tickpolicy='delay'/>
<timer name='rtc' tickpolicy='catchup'/>
<timer name='hpet' present='no'/>
</clock>
<on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot>
<on_crash>destroy</on_crash>
<devices>
<emulator>/usr/libexec/qemu-kvm</emulator>
<disk type='file' device='disk'>
<driver name='qemu' type='qcow2' cache='none'/>
<source file='/var/lib/nova/instances/fcbef681-bae7-4503-b56a-24f2d67d92f0/disk'/>
<backingStore type='file' index='1'>
<format type='raw'/>
<source file='/var/lib/nova/instances/_base/703e32fcfd0130d2798525edf8aec7c4cf282c8c'/>
<backingStore/>
</backingStore>
<target dev='vda' bus='virtio'/>
<alias name='virtio-disk0'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/>
</disk>
<controller type='usb' index='0'>
<alias name='usb0'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>
</controller>
<controller type='pci' index='0' model='pci-root'>
<alias name='pci.0'/>
</controller>
<controller type='virtio-serial' index='0'>
<alias name='virtio-serial0'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
</controller>
<interface type='bridge'>
<mac address='fa:16:3e:03:f9:a1'/>
<source bridge='qbr4556687f-f8'/>
<target dev='tap4556687f-f8'/>
<model type='virtio'/>
<alias name='net0'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
</interface>
<serial type='file'>
<source path='/var/lib/nova/instances/fcbef681-bae7-4503-b56a-24f2d67d92f0/console.log'/>
<target port='0'/>
<alias name='serial0'/>
</serial>
<serial type='pty'>
<source path='/dev/pts/3'/>
<target port='1'/>
<alias name='serial1'/>
</serial>
<console type='file'>
<source path='/var/lib/nova/instances/fcbef681-bae7-4503-b56a-24f2d67d92f0/console.log'/>
<target type='serial' port='0'/>
<alias name='serial0'/>
</console>
<channel type='spicevmc'>
<target type='virtio' name='com.redhat.spice.0' state='connected'/>
<alias name='channel0'/>
<address type='virtio-serial' controller='0' bus='0' port='1'/>
</channel>
<input type='mouse' bus='ps2'/>
<input type='keyboard' bus='ps2'/>
<graphics type='spice' port='5901' autoport='yes' listen='0.0.0.0' keymap='en-us'>
<listen type='address' address='0.0.0.0'/>
</graphics>
<sound model='ich6'>
<alias name='sound0'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
</sound>
<video>
<model type='qxl' ram='65536' vram='65536' vgamem='16384' heads='1'/>
<alias name='video0'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
</video>
<memballoon model='virtio'>
<alias name='balloon0'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0'/>
<stats period='10'/>
</memballoon>
</devices>
<seclabel type='dynamic' model='selinux' relabel='yes'>
<label>system_u:system_r:svirt_t:s0:c320,c750</label>
<imagelabel>system_u:object_r:svirt_image_t:s0:c320,c750</imagelabel>
</seclabel>
</domain>
******************************************************************************
Testing Windows 2012 Evaluation server was hit by bug
glance image-list fails with 'Expected endpoint'
******************************************************************************
Patch https://review.openstack.org/#/c/232462/ was applied followed by `openstack-service restart glance` to complete command:-
# . keystonerc_admin
# gunzip -cd windows_server_2012_r2_standard_eval_kvm_20140607.qcow2.gz | \
glance image-create --property hypervisor_type=kvm \
--name "Windows Server 2012 R2 Std Eval" \
--container-format bare --disk-format qcow2
Same self.type="ich6" works for Windows 2012 Evaluation Server as well
enabling spice console features as sound and cut&&paste via slightly updated
patches of Y.Kawada ( and converted from pdf to raw format). To get this features working using any spice-gtk tools ( spicy, virt-manager ) requires ports 5900,...,590(X) to be opened via ipv4 iptables firewall on node running openstack-nova-compute.
***********************************
Set up delorean repos
***********************************
yum -y install yum-plugin-priorities
cd /etc/yum.repos.d/
wget http://trunk.rdoproject.org/centos7-liberty/delorean-deps.repo
wget http://trunk.rdoproject.org/centos7-liberty/current-passed-ci/delorean.repo
yum -y install openstack-packstack*******************************************************************************
Run packstack AIO install and set up "br-ex" for external network as required
*******************************************************************************
[root@CentOS71503Server ~(keystone_admin)]# cat ifcfg-br-ex
DEVICE="br-ex"
BOOTPROTO="static"
IPADDR="192.168.1.112"
NETMASK="255.255.255.0"
DNS1="83.221.202.254"
BROADCAST="192.168.1.255"
GATEWAY="192.168.1.1"
NM_CONTROLLED="no"
TYPE="OVSIntPort"
OVS_BRIDGE=br-ex
DEVICETYPE="ovs"
DEFROUTE="yes"
IPV4_FAILURE_FATAL="yes"
IPV6INIT=no
[root@CentOS71503Server ~(keystone_admin)]# cat ifcfg-enp3s0
DEVICE="enp3s0"
ONBOOT="yes"
TYPE="OVSPort"
DEVICETYPE="ovs"
OVS_BRIDGE=br-ex
NM_CONTROLLED=no
IPV6INIT=no
**************
Next:-
**************
[root@CentOS71503Server ~(keystone_admin)]# chkconfig network on
[root@CentOS71503Server ~(keystone_admin)]# systemctl stop NetworkManager
[root@CentOS71503Server ~(keystone_admin)]# systemctl disable NetworkManager
[root@CentOS71503Server ~(keystone_admin)]# service network restart
( or reboot )
***********************************************************
Install nova-spicehtml5proxy package
***********************************************************
[root@CentOS71503Server ~(keystone_admin)]# yum -y install epel-release
[root@CentOS71503Server ~(keystone_admin)]# yum -y install spice-html5
[root@CentOS71503Server ~(keystone_admin)]# yum -y install openstack-nova-spicehtml5proxy
************************************
Update /etc/nova/nova.conf :-
************************************
[DEFAULT]
. . . . .
web=/usr/share/spice-html5
. . . . . .
spicehtml5proxy_host=0.0.0.0
spicehtml5proxy_port=6082
. . . . . . .
# Disable VNC
vnc_enabled=false
. . . . . . .
[spice]
html5proxy_base_url=http://192.168.1.112:6082/spice_auto.html
server_proxyclient_address=127.0.0.1
server_listen=0.0.0.0
enabled=true
agent_enabled=true
keymap=en-us
:wq
# service httpd restart
# service openstack-nova-compute restart
# service openstack-nova-spicehtml5proxy start
# systemctl enable openstack-nova-spicehtml5proxy
*********************************************************************
Update /etc/sysconfig/iptables on Compute :-
*********************************************************************
-A INPUT -p tcp -m state --state NEW -m tcp --dport 6082 -j ACCEPT
[root@ip-192-169-142-137 sysconfig]# service iptables restart
I've got sound working on CentOS 7.1 Cloud VM ,"GNOME Desktop" installed, and F22 Cloud VM, "MATE Desktop"&& "workstation-product-environment"
installed followed by `systemctl set-default graphical.target`.
with slightly updated patch of Y.Kawada , self.type set to "ich6" for Linux guests.
Raw text of Y.Kawada patches (been written for IceHouse Openstack release) may be obtained here
Patch virt/libvirt/config.py and virt/libvirt/driver.py and restart nova-compute
# python -m py_compile config.py
# python -m py_compile driver.py
# systemctl restart openstack-nova-compute
Ports 5900,..,5910 should be open on RDO Liberty AIO host via ipv4 iptables
firewall for Virt-Manager connections
[root@CentOS71503Server ~(keystone_admin)]# virsh list
Id Name State
----------------------------------------------------
4 instance-00000003 running
6 instance-00000002 running
7 instance-00000004 running
[root@CentOS71503Server ~(keystone_admin)]# virsh dumpxml instance-00000003
<domain type='kvm' id='4'>
<name>instance-00000003</name>
<uuid>fcbef681-bae7-4503-b56a-24f2d67d92f0</uuid>
<metadata>
<nova:instance xmlns:nova="http://openstack.org/xmlns/libvirt/nova/1.0">
<nova:package version="12.0.0-rc3.dev1.el7.centos"/>
<nova:name>CentOS71Devs</nova:name>
<nova:creationTime>2015-10-17 15:32:51</nova:creationTime>
<nova:flavor name="m1.medium">
<nova:memory>4096</nova:memory>
<nova:disk>40</nova:disk>
<nova:swap>0</nova:swap>
<nova:ephemeral>0</nova:ephemeral>
<nova:vcpus>2</nova:vcpus>
</nova:flavor>
<nova:owner>
<nova:user uuid="8ba153fc5fe947e499edf0a802395f5e">demo</nova:user>
<nova:project uuid="248d19ccd0b94cf9b8fcc25f4f083c08">demo</nova:project>
</nova:owner>
<nova:root type="image" uuid="65f257cb-0899-4bf3-a888-505d0bd4cc13"/>
</nova:instance>
</metadata>
<memory unit='KiB'>4194304</memory>
<currentMemory unit='KiB'>4194304</currentMemory>
<vcpu placement='static'>2</vcpu>
<cputune>
<shares>2048</shares>
</cputune>
<resource>
<partition>/machine</partition>
</resource>
<sysinfo type='smbios'>
<system>
<entry name='manufacturer'>Fedora Project</entry>
<entry name='product'>OpenStack Nova</entry>
<entry name='version'>12.0.0-rc3.dev1.el7.centos</entry>
<entry name='serial'>935292d3-1d87-4641-9bd7-ba80176e0135</entry>
<entry name='uuid'>fcbef681-bae7-4503-b56a-24f2d67d92f0</entry>
<entry name='family'>Virtual Machine</entry>
</system>
</sysinfo>
<os>
<type arch='x86_64' machine='pc-i440fx-rhel7.0.0'>hvm</type>
<boot dev='hd'/>
<smbios mode='sysinfo'/>
</os>
<features>
<acpi/>
<apic/>
</features>
<cpu mode='host-model'>
<model fallback='allow'/>
<topology sockets='2' cores='1' threads='1'/>
</cpu>
<clock offset='utc'>
<timer name='pit' tickpolicy='delay'/>
<timer name='rtc' tickpolicy='catchup'/>
<timer name='hpet' present='no'/>
</clock>
<on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot>
<on_crash>destroy</on_crash>
<devices>
<emulator>/usr/libexec/qemu-kvm</emulator>
<disk type='file' device='disk'>
<driver name='qemu' type='qcow2' cache='none'/>
<source file='/var/lib/nova/instances/fcbef681-bae7-4503-b56a-24f2d67d92f0/disk'/>
<backingStore type='file' index='1'>
<format type='raw'/>
<source file='/var/lib/nova/instances/_base/703e32fcfd0130d2798525edf8aec7c4cf282c8c'/>
<backingStore/>
</backingStore>
<target dev='vda' bus='virtio'/>
<alias name='virtio-disk0'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/>
</disk>
<controller type='usb' index='0'>
<alias name='usb0'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>
</controller>
<controller type='pci' index='0' model='pci-root'>
<alias name='pci.0'/>
</controller>
<controller type='virtio-serial' index='0'>
<alias name='virtio-serial0'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
</controller>
<interface type='bridge'>
<mac address='fa:16:3e:03:f9:a1'/>
<source bridge='qbr4556687f-f8'/>
<target dev='tap4556687f-f8'/>
<model type='virtio'/>
<alias name='net0'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
</interface>
<serial type='file'>
<source path='/var/lib/nova/instances/fcbef681-bae7-4503-b56a-24f2d67d92f0/console.log'/>
<target port='0'/>
<alias name='serial0'/>
</serial>
<serial type='pty'>
<source path='/dev/pts/3'/>
<target port='1'/>
<alias name='serial1'/>
</serial>
<console type='file'>
<source path='/var/lib/nova/instances/fcbef681-bae7-4503-b56a-24f2d67d92f0/console.log'/>
<target type='serial' port='0'/>
<alias name='serial0'/>
</console>
<channel type='spicevmc'>
<target type='virtio' name='com.redhat.spice.0' state='connected'/>
<alias name='channel0'/>
<address type='virtio-serial' controller='0' bus='0' port='1'/>
</channel>
<input type='mouse' bus='ps2'/>
<input type='keyboard' bus='ps2'/>
<graphics type='spice' port='5901' autoport='yes' listen='0.0.0.0' keymap='en-us'>
<listen type='address' address='0.0.0.0'/>
</graphics>
<sound model='ich6'>
<alias name='sound0'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
</sound>
<video>
<model type='qxl' ram='65536' vram='65536' vgamem='16384' heads='1'/>
<alias name='video0'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
</video>
<memballoon model='virtio'>
<alias name='balloon0'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0'/>
<stats period='10'/>
</memballoon>
</devices>
<seclabel type='dynamic' model='selinux' relabel='yes'>
<label>system_u:system_r:svirt_t:s0:c320,c750</label>
<imagelabel>system_u:object_r:svirt_image_t:s0:c320,c750</imagelabel>
</seclabel>
</domain>
******************************************************************************
Testing Windows 2012 Evaluation server was hit by bug
glance image-list fails with 'Expected endpoint'
******************************************************************************
Patch https://review.openstack.org/#/c/232462/ was applied followed by `openstack-service restart glance` to complete command:-
# . keystonerc_admin
# gunzip -cd windows_server_2012_r2_standard_eval_kvm_20140607.qcow2.gz | \
glance image-create --property hypervisor_type=kvm \
--name "Windows Server 2012 R2 Std Eval" \
--container-format bare --disk-format qcow2
Same self.type="ich6" works for Windows 2012 Evaluation Server as well