[vc_row][vc_column][vc_column_text]pcDuino3s can be used as the terminal for desktop virtualization application. In another post, we explained the steps taken to install SPICE client on pcDuino3s. In this post, we are going to take you through the process used to install the server part of SPICE on a Ubuntu 12.04 server. In a separate post, we will explain the steps installing SPICE server on another flavor of Linux server: centos.[/vc_column_text][vc_tour][vc_tab title=”Preparation ” tab_id=”1403391604-1-20″][vc_column_text]Before we dive into the dirty work, make sure we have the following ready:
- OS of the server: Ubuntu 12.04 Desktop
- Terminal device: pcDuino3s
- OS of the virtual machine: Microsoft Windows OS
[/vc_column_text][/vc_tab][vc_tab title=”Compile Spice, KVM and Install virt-manager” tab_id=”1403391604-2-4″][vc_column_text]
1. Update Sources of Ubuntu
#sudo apt-get update
2. Install the dependencies of spice
#sudo apt-get install build-essential autoconf git-core libtool liblog4cpp5-dev libssl-dev xlibmesa-glu-dev libasound-dev libpng12-dev libfreetype6-dev libfontconfig1-dev libogg-dev libxrandr-dev kvm libgcrypt-dev libsdl-dev libnss3-dev libpixman-1-dev libxfixes-dev libjpeg8-dev libsasl2-dev python-pyparsing libusb-1.0 -y
3. Create a directory named spice-source under /home to hold installation files
#cd /home #mkdir spice-source #cd spice-source
4. Install libcacard
#git clone git://people.freedesktop.org/~alon/libcacard #cd libcacard #./autogen.sh #make #make install #cd ..
5. Install spice-protocol
#wget http://spice-space.org/download/releases/spice-protocol-0.12.4.tar.bz2 #tar xvf spice-protocol-0.12.4.tar.bz2 #cd spice-protocol-0.12.4 #mkdir m4 #./configure #make #make install #cd ..
6. Install celt
#wget http://downloads.us.xiph.org/releases/celt/celt-0.5.1.3.tar.gz #tar xvf celt-0.5.1.3.tar.gz #cd celt-0.5.1.3 #./configure #make #make install #cd ..
7. Install SPICE server
#wget http://spice-space.org/download/releases/spice-0.12.4.tar.bz2 #tar xvf spice-0.12.4.tar.bz2 #cd spice-0.12.4 #./configure –enable-smartcard #make #make install #echo “export LD_LIBRARY_PATH=/usr/local/lib:${LD_LIBRARY_PATH}” >> ~/.bashrc #source ~/.bashrc #cd ..
8. Install qemu-kvm
#wget http://wiki.qemu-project.org/download/qemu-1.4.2.tar.bz2 #tar xvf qemu-1.4.2.tar.bz2 #cd qemu-1.4.2 #./configure #make #make install #mv /usr/local/bin/* /usr/bin/ #mv /usr/local/lib/lib* /usr/lib/
9. Install virt-manager
#sudo apt-get install virt-manager -y
10. Reload kvm kernel
#sudo rmmod kvm_intel #sudo rmmod kvm #sudo modprobe -i kvm #sudo modprobe -i kvm-intel
11. Reboot the server
#sudo reboot
[/vc_column_text][/vc_tab][vc_tab title=”Use virt-manager to create virtual machine” tab_id=”1403392804755-2-7″][vc_column_text]
1. Create an image of the hard drive, copy the hard drive driver file, and the installation image of the virtual machine
Note: In the following commands, Uname is the name of the USB flash, xx.iso is the image file of the operation system, virtio-0.1-74.iso can be downloaded from the download section of this post.
#qemu-img create -f qcow2 -o size=50G /home/win7.img #cp /media/Uname/xx.iso /home #cp /media/Uname/virtio-win-0.1-74.iso /home
2. Start virt-manager
#virt-manager
3. Create virtual machine
4. Name the virtual machine and select to use local installation image
5. Specify the local installation image
6. Choose memory and CPU setting of the virtual machine
7. Specify the storage size of the hard drive of the virtual machine
Note: Here the storage size should be consistent with that of the disk image we created in step 1, which is 50GB.
8. Configure other self defined parameters
9. Click ‘Add Hardware’ to add IDE cd-rom, and load driver image:
10. Change the model of sound device to be ‘ac97’:
11. Change the model of video to be ‘qxl’:
12. Delete ‘Display VNC’ in the self defined configuration, and add ‘Display Spice’:
13. Change type of hard disk and the format:
14. Enter into installation
15. Select install from hard disk, and enter into automatic installation
16. Install the audio driver
17. Install drivers for other hardware of the virtual machine. Here we will install spice-guest-tools
18. Turn off the virtual machine, and delete the IDE CDROM1 and IDE CDROM2, and change the network card of the virtual machine to be virtio in virt-manager
[/vc_column_text][/vc_tab][vc_tab title=”Use pcDuino3S to connect to SPICE server” tab_id=”1403394897562-3-3″][vc_column_text]On pcDuino3s, open a LX terminal and enter the following command:
$spice -h xx.xx.xx.xx -p 59xx
In the above command, xx.xx.xx.xx is the IP of the server, and 59xx is the port number.[/vc_column_text][/vc_tab][vc_tab title=”Download” tab_id=”1403394978360-4-8″][vc_column_text]The AC97 sound driver and disk driv driver image can be downloaded from:
https://github.com/pcduino/pcDuino_3s/[/vc_column_text][/vc_tab][/vc_tour][/vc_column][/vc_row]
Leave a Reply
You must be logged in to post a comment.