VMWare Server, MythTV, and Kubuntu
Having recently acquired a Windows Vista PC for my own personal learning, I find that my Windows XP box is now irrelevant. It is a Dell Optiplex GX 280 (about 2 years old) that I would like to use as a MythTV back-end server and a VMWare Server host. To facilitate this, I picked up a 500GB Western Digital SATA drive. My intention is to install Kubuntu 7 Feisty Fawn, setup an LVM partition to carve out storage for video and VM images, install VMWare Server, and install MythTV.
The first step to getting the base OS up and running is to simply boot the Kubuntu live CD and then kick off the installer. I pretty much ran the defaults except for the disk setup. I setup a 50GB / partition with ext3 and a 2GB swap. I left the other ~450GB unpartitioned to hold an LVM volume later.
After the first reboot I noticed the video wasn’t optimum – 1024×768 from an ATI Radeon X300. I followed this wiki entry to get it running right.
Next on the docket would be LVM. First I need to install LVM:
- sudo apt-get install lvm2
Also, I would like to have XFS support for use where I store video files.
- sudo apt-get install xfsprogs
With LVM support installed, I used the article Learning Linux LVM, Part 2 to help go through the following:
- sudo sfdisk -l turned up this:
Disk /dev/sda: 60801 cylinders, 255 heads, 63 sectors/track
Units = cylinders of 8225280 bytes, blocks of 1024 bytes, counting from 0
Device Boot Start End #cyls #blocks Id System
/dev/sda1 0+ 6078 6079- 48829536 83 Linux
/dev/sda2 6079 6327 249 2000092+ 82 Linux swap / Solaris
/dev/sda3 6328 60800 54473 437554372+ 8e Linux LVM
That looks right. I’ve got a 50GB / partition on sda1, a 2GB swap on sda2, and the rest in sda3 set as LVM type. Let’s get using it.
- sudo su
- pvcreate /dev/sda3
- vgcreate -s 32M main /dev/sda3
- lvcreate -L150G -nvm main
- lvcreate -L250G -nvideo main
- mkreiserfs /dev/main/vm
- mkfs.xfs /dev/main/video
- mkdir /vm
- mkdir /video
- mount /dev/main/vm /vm
- mount /dev/main/video /video
Next, add the two new partitions to the /etc/fstab file to mount at startup. A reboot confirms that all is well with the new partitions.
Next, we move on to getting VMWare Server installed and running on this box. During this portion, I used How To Install VMware Server On Unbuntu 7.04 (Feisty Fawn) as a good reference to getting this done.
First, we do some prep:
- sudo aptitude install linux-headers-`uname -r` build-essential
- sudo aptitude install xinetd
- cd /usr/src
- tar -xzf VMware-server-1.0.3-44356.tar.gz
- cd vmware-server-distrib/
- Accept the defaults until the prompt to run vmware-config.pl to which you answer no
- tar -xzf vmware-any-any-update109.tar.gz
- cd vmware-any-any-update109
- Let it run the vmware-config.pl script
- Accept the EULA and the defaults unless you want an override.
- For example, this install I answered No to NAT networking as I just want a bridged connection.
- I changed the directory for keeping virtual machine files from /var/lib/vmware/Virtual Machines to just /vm to use the LVM volume
- Enter a serial number for VMWare Server
- Verify the script successfully starts the services
- Launch the VMWare Server Console via the vmware command
At this point, the system should be ready to create new virtual machines, but that’s a topic for another post.
Next, we will tackle installing MythTV on this system. I have previously setup a freestanding MythTV box to test it out. That system was an old spare PC when I started, but it did run successfully for a year and a half as my home DVR. Eventually it gave out, and now I would like to setup a replacement for it. This time I intend to setup this system as a MythTV backend system to do the recording and then setup another system as a front-end for viewing.
As a guide in this process I used this page from the Ubuntu Community Documentation.
This system has a Hauppauge PVR-250 tuner card in it, and it looks to be correctly loaded by default.
As the documentation page I’m referencing points out, we only need one package for this configuration — mythtv.
- sudo su
- apt-get install mythtv
- vi /etc/mysql/my.cnf
- comment out the bind-address 127.0.0.1 line
- /etc/init.d/mysql restart
- exit (to drop out of root context)
- Click Yes to be added to the mythtv group
- Enter password for sudo
- Click Yes to restart your session
- Login again
- Click Yes
- Enter password for sudo
- Choose English
- Set IP address of local system
- Set directory to hold recordings to /video
- Increase max simultaneous jobs to 2
- Enable auto-commercial flagging jobs when the recording starts
- Capture Cards
- New capture card
- Card type: MPEG-2 encoder card (for my PVR-250)
- Video Sources
- New video source
- Source name: Bright House Cable
- Enter username and password for zap2it labs account
- Input Connections
- Setup Tuner1 for CableTV
- Channel Editor
- No changes
- Exit mythtv-setup
- Click Yes to run mythfilldatabase
That’s it. At this point, the system is up and running Kubuntu 7, VMWare Server, and MythTV. Stay tuned for more posts about putting this platform to use.