Right Outer Join

9 July 2013

Ubuntu 12.04 on VMware Fusion

Filed under: Linux, Oracle — Tags: , , , , — mdahlman @ 07:20

Summary

Installing Ubuntu 12.04 using VMware Fusion was easy enough. But it wasn’t easy to get it exactly the way I wanted it. So I ran through the process several times to get exactly what I wanted. It might be useful for other folks investigating Ubuntu. I wrote this as the first of two articles explaining how to install Ubuntu and Oracle. The subsequent article covers installing Oracle on Ubuntu.

Background

  • Download the relevant iso file: Ubuntu 12.04 LTS 64-bit
  • The standard install is indeed very simple. But it was insufficient for nicely preparing the machine for an Oracle installation.
  • I started with this Fantastic guide to installing Ubuntu on VMware Fusion. It was very helpful, and I want to give full credit to Eirik Didriksen and Hans Petter Langtangen for this excellent document.
    One early step was confusing because Fusion has changed, but that’s a pretty minor complaint.
  • But in the end it was mainly the need for custom partions that drove me to document this Oracle-specific version of an Ubuntu installation.

Everything should apply outside of Fusion as well. If you want to install Ubuntu on a brand new machine, the same things apply. Just skip the Fusion sections.

Fusion Stuff

  • Obtain and install VMware Fusion. (Or VMware Workstation. But I tested with Fusion.)
  • Create New Virtual Machine.

New

New Virtual Machine

  • Continue without disc

Continue without disc

Continue without disc

  • Use operating system installation disc or image: ubuntu-12.04.2-desktop-amd64.iso (Note that Eirik & Hans say “Create a custom virtual machine”. This is probably an alternative path to the same destination.)

Installation media

Installation media

  • Linux / Ubuntu 64-bit

Choose operating system

Choose operating system

  • NOT “Use Easy Install”

Not easy install

Not easy install

  • NOT “Finish” but rather “Customize Settings
  • Save As: NOT the proposed name of “Ubuntu 64-bit” but rather “Ubuntu64Oracle11gXE
    The default proposed name is “Ubuntu 64-bit”. This caused me some pain later. In hindsight I found it important to avoid spaces: “Ubuntu64Oracle11gXE”.
  • This pops up the general Fusion “Settings” window.
  • Change memory from 1024 MB to 2048 MB
  • Info: My hard disk size defaulted to 20 GB; I kept this default.
  • Info: My Networking defaulted to “Share with my Mac”; I kept this default.
  • Info: I did not specify a startup device, so it starts from the [unspecified-by-me] default device.
Customize settings

Customize settings

Customize memory

Customize memory

Customize shared folders

Customize shared folders

  • Startup the VM for the first time

Start the VM

Start the VM

At this point you are done with the “Fusion” configuration. The following steps are Ubuntu configuration, so they will apply equally to anyone using Ubuntu whether it’s in a virtual machine of some sort or not.

Ubuntu Installation Stuff

  • “Install Ubuntu” (not “Try Ubuntu”. I chose English.)

Install Ubuntu

Install Ubuntu

  • “Download updates while installing” (You might as well update to the latest stuff while getting started.)
Preparing: default settings

Preparing: default settings

Preparing: my choices

Preparing: my choices

  • CRITICAL (for Oracle): “Something else”
    It’s possible to make changes later. It’s nicely documented how to fix partitions in this forum post. But I’m attempting to install everything correctly to prevent problems rather than waiting for the problems to arrive and then working around or solving them.

Installation type: something else

Installation type: something else

  • Set up partitions as shown in the detailed partitioning section below. The key idea is creating an ext3 partition.
Partitions: default setup

Partitions: default setup

Partitions: good for Oracle XE

Partitions: good for Oracle

  • “Install Now” and it does its thing. It prompts for location, keyboard, etc.
  • NOT the proposed machine name of “vmadmin-virtual-machine” but rather “Ubuntu64Oracle11gXE”.
  • For example, I used these values:
    VMadmin
    Ubuntu64Oracle11gXE
    vmadmin
    vmpass  (Ubuntu lets you know that this is weak)
Install now

Install now

Who are you

Who are you

 

  • Depending on network speed, spend a long time seeing screen with this at the bottom:
    Retrieving file 12 of 57 (26s remaining)
  • Go get coffee. I went for lunch. The install followed by the reboot takes a while.

Welcome (retrieving)

Welcome (retrieving)

  • After the initial reboot, log in and run the Update Manager. In my case there were 256 updates available, and I installed all of them. It requires another reboot.

Update manager

Update manager

Detailed Partitioning Info

Oracle 11g does not support ext4. Ubuntu 12.04’s default filesystem is ext4. Doh!
I don’t know the exact implications of using ext4 with Oracle. Maybe it would mostly work just fine. Maybe it will fail at the most inconvenient possible moment and reduce your machine to smoking pile of rubble. Using a supported file system seems like a good idea. It’s easy enough to do; it’s a lot easier to get it right when you get started rather than fixing it later, so I did that. (But fixing it later is possible.)

  • By default everything goes into one big partition: /dev/sda
    Instead of accepting that, we’ll create a few separate partitions.
  • “New Partition Table…”, Continue
Partitions: default

Partitions: default

Create new partition table

Create new partition table

  • Now you see “free space”

Free space

Free space

  • Select “free space”, “Add…”
  • 13500 MB Ext4 at / (primary)
Free space: Add...

Free space: Add…

Add Primary ext4 partition

Add Primary ext4 partition

  • Select “free space”, “Add…”
  • 4000 MB Ext3 at /u01 (primary)
    Is it important to choose ‘primary’ rather than logical? Sergey says, “it does not matter much
    If you choose logical partition then it will mount slightly differently: /dev/sda5
    I don’t know why it uses sda5 instead of sda2. I suspect that either way is perfectly fine.Is it important to choose ‘ext3’? Yes!
    That’s the main reason we’re going through this partitioning.Is it important to choose ‘u01’ for the mount point? YES!!
    It’s vitally important to use ‘u01’. The Oracle installer will rely on this.

Add Primary ext3 partition

Add Primary ext3 partition

  • Select “free space”, “Add…”
  • All remaining space (3974 MB) for the swap partition (primary, swap area, no mount point)

Add Primary swap partition

Add Primary swap partition

  • Change “Device for boot loader installation” to /dev/sda1
  • Return to the main workflow above.
    Find the step: “Install Now” and it does its thing. It prompts for location, keyboard, etc.

Perfectly partitioned

Perfectly partitioned

More Fusion Stuff

Install VMWare Tools

The VMWare tools are useful for copy files, copy/pasting with the clipboard, etc. It’s documented reasonably well in Knowledge Base Article 1022525. I won’t repeat the steps here; just don’t forget to do it.

Use a static IP address

I want my instance to always reboot with the same IP address. That makes it much easier to connect to services running on the instance. In my case I have a Tomcat instance on my Mac running Semarchy MDM pointing to this Oracle instance. By default the VM will get an IP address from the VMWare host. Depending on config settings it might get the same address as last time. In practice I found the my instance incremented its IP address by one each time. Lots of articles already exist describing this issue: this one, that one, another one, and even vmware knowledge base articles. They all say basically the same thing. And they’re all basically correct. But…

I found they were universally imprecise about what the “vm-hostname” actually is. And they universally ignored the issue of hostnames with spaces in them. If you worked through this full article, then you saw that I used a name with no spaces or special characters, Ubuntu64Oracle11gXE, even though alternative names were proposed at a few points during the process. That’s because I ran into problems with the suggested DHCP configuration options working correctly when I was on one network but getting ignored when I was on another network. I couldn’t ever track down precisely what the issue was. So  I wanted get everything correct the first time through and complete avoid trying to trouble shoot it later.

  • Find the MAC address used by the guest VM for network connectivity ifconfig
  • Update dhcpd.conf like this:
sudo vi /Library/Preferences/VMware\ Fusion/vmnet8/dhcpd.conf
####### VMNET DHCP Configuration. End of "DO NOT MODIFY SECTION" #######
# START added by mdahlman
host Ubuntu64Oracle11gXE {
    hardware ethernet 00:0c:29:cc:7e:ab;
    fixed-address 192.168.191.11;
}
# END added by mdahlman
  • Edit /etc/hosts like this:
sudo vi /etc/hosts
  • Add this line:
192.168.191.11  Ubuntu64Oracle11gXE
  • Reboot the machine and confirm that it comes up with the address 192.168.191.11
  • Now it’s time to install Oracle. (Or just enjoy your Ubuntu instance if you don’t need Oracle.)
Advertisements

1 Comment »

  1. Reblogged this on Researcher's Blog and commented:
    Ubuntu 12.04 on VMware Fusion

    Comment by Re-Searcher... — 9 July 2013 @ 21:17


RSS feed for comments on this post. TrackBack URI

Go on... leave a reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Blog at WordPress.com.

%d bloggers like this: