Showing posts with label VMWARE. Show all posts
Showing posts with label VMWARE. Show all posts

Saturday, January 7, 2012

Expanding A Disk in Oracle's VirtualBox

I run Ubuntu Linux at home. I love Linux. It's fast, has a smaller footprint than other O/Ss, and it's free. The rest of the world, however, lives on MicroSoft Windows or Apple OSX. I don't mind this. I like being different and enjoy the time I don't spend on virus issues and the money I save on hardware.

Still, ever so often you need a Windows operating system. Normally I can do these small tasks using other resources, but recently I've been hit over and over again with the need to have Windows at home.

If you run Linux you have a few options. You can use Wine to run windows applications within your Linux O/S or you can use a Virtual Machine server to host a Windows O/S within your Linux system. I decided to go this route.

I was once a VMWare fan. I guess I still am but Oracle has a free product called VirtualBox that was recommended by my next door neighbor, the Linux Kernel Commando. The primary advantage to VirtualBox is its ability to access the USB port. VMWare doesn't do that, at least the free version doesn't.

VirtualBox is easy to download, install, and setup as was the Extension Pack which added the USB 2.0 support. Everything was wonderful once I had Google Chrome installed in my new Windows 7 instance. I used it rarely, but it was always there when I needed it. The only issue was when it cranked up, Windows would download the latest MicroSoft patches. I think the VM spent more time patching than running.

Then came my decision to purchase MicroSoft Office 2010. I had 20 GB allocated to my Window's VM and needed more. VirtualBox doesn't have a nice little switch to extend a disk from their console (hint: THEY SHOULD). You have to go to the command prompt and do it. The pig that is Microsoft Office needs over 40 GB to install. After futzing around, making new drives, and generally getting frustrated, I found the magic command to extend a virtual disk.

Before running this, make sure you have a good snapshot of your current VM image. I did a full clone as well just in case.  Here's a screen print of my current VirtualBox console (after the expansion). Note the happy little Snapshots(1) button in the upper right. That's where you go to make the snapshot.


The command to expand the disk to 80 GB is

VBoxManage modifyhd [virtual disk filename] --resize [size in MB]

You find the path to the file from the Storage link on the console above. You can find this and other VirtualBox commands in the Manual.

I was then able to go in and install MicroSoft Office with no problems although I wonder how much more time my little VM will spend patching itself.



Monday, December 31, 2007

VMWare and Ubuntu Linux 7.10

I wanted to get an install of XP on my Ubuntu box and so downloaded VMWare server (its free) from here and found a howto here which I will quote throughout this post.

The first step is to load some of the Ubuntu modules you'll need to compile the vmserver via aptitude. Run the following command
sudo aptitude install linux-headers-`uname -r` build-essential (which requires your install cd)


Next install xinetd
sudo aptitude install xinetd
Per the instrustions from hotowforge, I went to the following site and downloaded the latest any-to-any patch. You'll need this patch in the middle of your install. http://www.vmware.com/community/thread.jspa?messageID=76957&tstart=0

Untar the vmserver tarball you downloaded.

tar -xvzf

Change directory into the resultant directory (there will be only one) and run

sudo vmware-install.pl

I accepted the defaults with the possible exception of the default vmware file location (you'll want it on a partiton with some space) and the following question you show answer NO to.

Before running VMware Server for the first time, you need to configure it by invoking the following command: "/usr/bin/vmware-config.pl". Do you want this program to invoke the command for you now? [yes]

Answer NO. You will then exit the installation script.

Now you'll want to run the patch you downloaded. Untar that file and descend into the resulting directory.

sudo ./runme.pl

Again, accept the defaults. The script modifies the installed vmware software. At the end you will again be asked to run the vmware-config. Answer YES this time.

After that completes, start vmware with the command
vmware
If you did everything right, the vmware console should appear. At this point you'll need to create a new virtual machine. If your machine once ran a microsoft product, you can reinstall on the new virtual machine but you'll need the license code off the old box. Alternately, you can install a new copy of Ubuntu or any other operating system supported by VMWARE.

So, to create a new guest OS you tell the vm server to create it, give it resource such as disk and memory. A note here is to use the defaults the first time you create an instance and, if you us FAT file system as a backup, allow vm server to split the created disk into 2 GB chunks.

After you have the VM created, put your OS install CD in and tell the instance to boot. It should read the CD and install the whatever OS you've selected. Follow the normal install procedure for that OS. The only additional step I recommend is to install vmtools into the new image once its up and running and has all the patches you wish to install.

Vmtools allows you to resize the screen above 460x680 and allows you to cut and paste between host and virtual machine.

All in all it was a fairly painless process outside of the OS install.