Howto: Set Up A VDI Server

From CSLabsWiki
Jump to: navigation, search


Introduction

Are you a bad enough dude to set up a VDI server?

Fedora 13

I'll assume use of the new Optiplex machines.

Follow these few simple steps:

  • Make a vanilla install of fedora, make sure everything is fully updated. Don't use default partitioning arrangement. Use this arrangement instead:
    • ext4 partition as sda1 (sda is always the WD drive) mounted at /
    • 1GiB swap partition as sdb1 on the second drive (Seagate)
    • ext4 partition using the rest of sdb as sdb2 mounted at /storage
  • Turn off SElinux.
  • Configure yum to use Mirror. Edit all files in /etc/yum.repos.d/. For each repository:
  • Configure yum to use spice-devel repo (found at http://kraxel.fedorapeople.org/spice)
# cd /etc/yum.repos.d
# wget http://kraxel.fedorapeople.org/spice/spice-unstable.repo
  • install packages:
    • qemu-spice
    • spice-server
    • spice-client
    • subversion
    • qemu-kvm
  • set a static IP using system-config-network
    • Kill NetworkManager
    • Go to System>Administration>Services and disable 'networkmanager', then enable 'network'
    • Go to System>Administration>Network
    • Under the devices tab, create a new Ethernet device
    • Select "Statically set IP address"
    • Enter the following information:
      • Address: 128.153.14*.*** (this will depend on what static IP is allocated for the server's use)
      • Subnet Mask: 255.255.254.0
      • Default Gateway: 128.153.14*.1 (depends on whether the 144 or 145 subnet is being used)
      • Primary DNS: 128.153.145.3
      • Secondary DNS: 128.153.145.4
    • Hit continue and finish.
    • Go to the DNS tab and enter the hostname (depends on server, probably vdi-**)
    • File>Save (answer yes to everything) and reboot
  • pull the server-side scripts from SVN:
# mkdir /etc/spice-scripts
# cd /etc/spice-scripts
# svn co http://svn.cslabs.clarkson.edu/svn/platekme/vdi/trunk/server
  • pull test images from vr-cosi-01
# cd /storage
# scp -r root@128.153.144.151:/images .


Notes:

  • For some incomprehensible reason, NetworkManager doesn't start upon login. Until the static IP is set, start it manually as root if you have to reboot.

Ubuntu

The spice server needs to be compiled from source. See the SPICE page for details on how to perform this operation.

CentOS

RHEL6 rpms are provided in kraxel's repository, so maybe we can use those.