Saturday, 19 July 2008

VMWARE Fusion + Ubuntu Server 8.04

I use vmware fusion on my macbookpro and recently downloaded a pre-built vm for Ubuntu Server 8.04 from Chrysaor. This needs a little work to make it comfy even with the prebuilt vm. I don't have *nix coursing through my veins, so it took me a little while to fit the pieces together but here it is.

The first thing you need to do is read the FAQs on the Chysaor website about installing the open source vmware tools using the custom ubuntu804vmtools.sh script provided which takes most of the pain away. Some other tips:

1. When opening the image in Fusion chose the moved option instead of copy unless you are creating a duplicate. That way you will have a lot less configuring to do on the network options. Do the rest via the console to avoid problems when it re-configures your network.

2. When installing the vmware tools (the FAQ above) and choosing Install Vmware Tools from the Fusion menu you need to check that your vmware tools iso is actually mounted at /media/cdrom before you run ubuntu804vmtools.sh. If not you'll need to manually mount it.
sudo mount /dev/cdrom /media/cdrom
alter your /etc/fstab file to auto mount it (which is probably how you want it anyway)
/dev/cdrom       /media/cdrom   udf,iso9660 user,auto,exec,utf8 0       0
For some reason I couldn't get it to mount the linux.iso from the vm library files (which is what is supposed to happen behind the scenes) so I ended up copying it elsewhere and attaching it directly to the guest cdrom. I have also needed the linux-headers-X.X.XX-XX package when using my own ubuntu server package.

3. If you did copy the vm instead of moving it then you'll need to alter the ethernet adapter settings
ifconfig #shows the mac addresses etc
sudo nano /etc/udev/rules.d/70-persistent-net.rules
# Remove extra entries of the following and change the last one with the correct mac address and NAME to eth0.
# PCI device 0x1022:0x2000 (pcnet32)
SUBSYSTEM=="net", DRIVERS=="?*", ATTRS{address}=="00:0c:29:b0:1a:59", NAME="eth0"
# Edit with the new ipaddress/subnetmask/gateway
sudo nano /etc/network/interfaces
# The primary network interface
auto eth0
iface eth0 inet dhcp
 4. Once you have your vmware tools installed and you enable shared folders for the vm and add a shared folder, the other issue I have run across is that the permissions within the guest need sudo to create delete or modify files in the shared folder. To get around this you find out what your uid and gid is in the etc/passwd and etc/groups files. In my case the uid and gid are both 1000. Edit the fstab to mount the shared folder as the user you login as.
host:/ /mnt/hgfs vmhgfs defaults,ttl=5,uid=1000,gid=1000 0 0
5. Lastly reconfigure the timezone
sudo dpkg-reconfigure tzdata
6. Changing the hostname
Edit the file /etc/hosts and add an additional name for the entry for 127.0.1.1 to the new hostname then edit /etc/hostname and change the name of the system. Restart the server.

7. Adding a virtual data drive
https://help.ubuntu.com/community/InstallingANewHardDrive

I use this just for development so thats really it aside from the usual install of packages and updating.

0 comments:

Hedged Down