Backport Virt-manager 0.8.7-3 (without spice) & python-virtinst-0.500.6-2 to Scientific Linux 6

Primary target is to get virt-install supporting options “–graphics spice”,”–video qxl”,”–channel spicevmc”.
Virt-manager-0.8.7-3.fc15.src.rpm has to be installed and it’s spec’s file updated :-

%define with_spice 0

then rebuild and perform virt-manager-0.8.7-3.el6.noarch.rpm install, having python-virtinst-0.500.6-2 already in place :-

yum install virt-manager-0.8.7-3.el6.noarch.rpm

It seems running smoothly with python-virtinst-0.500.6-2 ( rebuilt and reinstalled in the same way). Obviously there is no access to spice console via virt-manager. I also upgraded spice-client up to 0.6.3 , what requires pixman-0.18.4-1.fc14.src.rpm rebuilt on SL 6 and install pixman & pixman-devel. In particular, “Add Hardware” wizard Graphics->Spice Server allows
to avoid manual updating XML VM’s profile as suggested in [1].
Two KVMs have been tested positive :-

virt-install --connect qemu:///system --virt-type kvm \
--os-type=linux --os-variant=virtio26 \
--name NattyB2 --ram 1024 --disk path=/dev/sdb3 \
--graphics spice --video qxl --channel spicevmc \
--cdrom /usr/tmp/ubuntu-11.04-beta2-desktop-amd64.iso --vcpus 2







virt-install --connect qemu:///system --virt-type kvm \
--name W7 --ram 4096 \
--disk path=/dev/sdb11,bus=virtio \
--disk /usr/tmp/virtio-win-1.1.16.vfd,device=floppy \
--os-variant win7 \
--graphics spice --video qxl --channel spicevmc \
--cdrom /usr/tmp/Win7_64.iso --vcpus 2







XML profile after virt-install looks like :-

<domain type='kvm'>
<name>W7</name>
<memory>4194304</memory>
<currentMemory>4194304</currentMemory>
<vcpu>2</vcpu>
<os>
<type arch='x86_64' machine='rhel6.0.0'>hvm</type>
<boot dev='hd'/>
</os>
<features>
<acpi/>
<apic/>
<pae/>
</features>
<clock offset='localtime'/>
<on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot>
<on_crash>restart</on_crash>
<devices>
<emulator>/usr/libexec/qemu-kvm</emulator>
<disk type='block' device='disk'>
<driver name='qemu' type='raw'/>
<source dev='/dev/sdb11'/>
<target dev='vda' bus='virtio'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
</disk>
<disk type='file' device='floppy'>
<driver name='qemu' type='raw'/>
<source file='/usr/tmp/virtio-win-1.1.16.vfd'/>
<target dev='fda' bus='fdc'/>
<address type='drive' controller='0' bus='0' unit='0'/>
</disk>
<disk type='file' device='cdrom'>
<driver name='qemu' type='raw'/>
<source file='/usr/tmp/virtio-win-1.1.16.iso'/>
<target dev='hdc' bus='ide'/>
<readonly/>
<address type='drive' controller='0' bus='1' unit='0'/>
</disk>
<controller type='fdc' index='0'/>
<controller type='ide' index='0'>
<address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/>
</controller>
<controller type='virtio-serial' index='0'>
<address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
</controller>
<interface type='bridge'>
<mac address='52:54:00:f1:01:e9'/>
<source bridge='br0'/>
<target dev='vnet0'/>
<model type='virtio'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
</interface>
<serial type='pty'>
<target port='0'/>
</serial>
<console type='pty'>
<target port='0'/>
</console>
<channel type='spicevmc'>
<target type='virtio' name='com.redhat.spice.0'/>
<address type='virtio-serial' controller='0' bus='0' port='0'/>
</channel>
<input type='tablet' bus='usb'/>
<input type='mouse' bus='ps2'/>
<graphics type='spice' port='5900' tlsPort='-1' autoport='yes' />
<video>
<model type='qxl' heads='1'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
</video>
<memballoon model='virtio'>
<address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/>
</memballoon>
</devices>
</domain>

Updated via “virsh edit W7” :-

<graphics type='spice' port='5900' tlsPort='-1' autoport='yes' listen='0.0.0.0'/>
<video>
<model type='qxl' vram='32768' heads='1'/>
. . . .

Same XML may be automatically generated via Virt-Manager 0.8.7-3 after normal VNC install :-
1. Remove VNC Server
2. “Add hardware”->”Graphics”->”SPICE Server”



Package “spice-gtk” is expected only in RHEL 6.2
References
1. http://www.server-world.info/en/note?os=Scientific_Linux_6&p=kvm&f=6

Leave a comment