Virtual Machine Applicance for development environment

January 1, 2012

Configuration of a development environment can be very time consuming, error prone, or difficult. This is especially true when investigating or getting up to speed on a new technology or framework. In a corporate environment this is a also a drain on resources and existing developer staff who must take the time to prep a new developer.

One approach to mitigate this is to use a Virtual Appliance.

Virtual appliances are a subset of the broader class of software appliances. Installation of a software appliance on a virtual machine creates a virtual appliance. Like software appliances, virtual appliances are intended to eliminate the installation, configuration and maintenance costs associated with running complex stacks of software.

A virtual appliance is not a complete virtual machine platform, but rather a software image containing a software stack designed to run on a virtual machine platform which may be a Type 1 or Type 2 hypervisor. Like a physical computer, a hypervisor is merely a platform for running an operating system environment and does not provide application software itself. — Virtual Appliance

Creating a Virtual Machine Applicance
The available VM software such as Oracle VirtualBox and the VMware VM have facilities to generate appliances. Thus, when a functioning development environment is created by a lead tech or group, an appliance can be generated for the rest of the team. This appliance can even be provided using a Virtual Desktop Infrastructure (VDI).

Open Virtualization Format
While a VM system can be used to create individual VM instances that can be reused, a more recent technology (supported by some vendors) is the use of OVF:

… is an open standard for packaging and distributing virtual appliances or more generally software to be run in virtual machines.

The standard describes an “open, secure, portable, efficient and extensible format for the packaging and distribution of software to be run in virtual machines”. The OVF standard is not tied to any particular hypervisor or processor architecture. The unit of packaging and distribution is a so called OVF Package which may contain one or more virtual systems each of which can be deployed to a virtual machine.

An OVF package consists of several files, placed in one directory. A one-file alternative is the OVA package, which is a TAR file with the OVF directory inside. — http://en.wikipedia.org/wiki/Open_Virtualization_Format

Using ready made appliances
Each VM vendor can/does make available an appliance marketplace. Thus, one can find ready-made LAMP based environments with a development software stack, for example.

Alternative 1, an installable virtual disk
Where resources are constrained, such as places where developers are still on 3GB of ram and ancient PCs, a Virtual Machine is just not going to cut it.

One easy alternative is to create a dev environment on an installable soft hard drive. TrueCrypt can be used for this purpose. One simply create a true crypt volume, which is just a single file. Then creates the desired dev env in that volume, and that file can now be copied to load into other dev’s workstations as a new hard drive.

TrueCrypt is really for security and privacy concerns, it encrypts data, so may not be ideal for this application. Since TrueCrypt is so useful as a virtual disk, it would be great if it had the option of not encrypting content. But, that would perhaps be outside of its feature space. For that the next alternative is available.

Alternative 2, use VHD files
An alternative is using something directly targeted at virtual disks such as the VHD file format. However, this does not seem to have easily useful public gui or command support (for the end user: developer).

On Windows following the instructions here and using these Send To scripts will allow one to seamlessly use vhd files as mountable hard disk volumes.

Note that Windows 8 will support native mounting of ISO and VHD files.

Further Reading


KARSH KALE plays “MILAN” LIVE


Screen capture in Ubuntu running in VirtualBox

December 3, 2011

Screen capture was not working in a new install of Ubuntu in VirtualBox. The attempts would result in an image of the desktop background. Weird.

Since the default app didn’t work, I installed various other ones. None worked. Finally I installed Gimp. Even that didn’t work.

I think that ruled out an application issue. Left was Ubuntu, Unity desktop, hardware, VirtualBox, or me. Certainly not I.

It was the 3D setting on the virtual machine! Doh! I thought the check box was a request; if the system has no 3D support it would just not use that setting.

Environment
VirtualBox: 4.1.6
Ubuntu: 11.10
Host: Windows 7 64bit

Off topic, but what a great rant! “Why I’ve finally had it with my Linux server and I’m moving back to Windows.” I know the feeling. I had Linux running on an old laptop. Then I tried to upgrade the distro. The laptop stopped working. Now nothing installs, Windoze, other Linux distros, nada. Boot sector issues or firmwear issues. I don’t know. One day I’ll buy an enclosure and try to reuse the laptop harddrive as an external USB backup.

References

 


Bassnectar – Pleasure the Bassnympho


Amy Winehouse – All my lovin’ (The Beatle’s cover)


Network access to VirtualBox VM?

November 25, 2011

How I set up a new VirtualBox VM running Ubuntu that could be reached from the local network.

I first used the Bridged Network setup, which did not work. This is on VirtualBox 4.1.4. I have other VB vms where the Bridged Networking does work. hmm.

On this VM I changed networking to:
- NAT. Network Address Translation.
- Defined a Port Forward rule (via Virtual Box GUI). Ports on hosting PC get mapped to the VM guest. For example, 22.
- Made sure the Windows 7 Firewall allowed the external port.
- Defined a port forwarding at my network provider.
- Defined a port forward at my local router.

At least, that is what I think I did. In the turmoil of getting things to work, research what others tried, and then success, it is hard to get the actual process just right.

Saved, then waited; takes a while for everything to percolate through the network. Opened the URL and voila, I have access!

That was not easy! Where is that button?

Further reading

  1. VirtualBox Bridged Network Port Forwarding Issue


Bill Evans Trio – Waltz for Debby [Take 2]


VirtualBox 4.1.4 on Windows 7 with Ubuntu guest

October 3, 2011

Installing over older version was not that hard this time.

First I created snapshots of each VM in my VirtualBox. Next create a restore point for Windows 7, just in case VB destroys stuff.

Then I downloaded and installed the new VirtualBox 4.1.4. It locked up. Went thru some stuff, showed a full taskbar but nothing. No exceptions or suspicious threads in Windows’s Proc Explorer. Install wouldn’t cancel either, had to kill it. Retried but it said there is another install going on. Did not see one in task list.

I rebooted Windows PC. Tried to start the existing Ubuntu VM, but it failed, one of the virtual network drivers is hosed. Shucks. Hmmm. Maybe VirtualBox will install again? This time I right clicked on the downloaded file and choose “Run As Admin”. It installed!

No 3D Unity interface. Guest Additions not updated. Clicked on device menu and install Guest Additions, nada!. I keep forgetting you have to install it manually for a Linux guest. For this I followed the VirtualBox user manual.

First do the steps in 4.2.2.1.1. I ran those using sudo. Second, follow steps in 4.2.2.1. Again using sudo. Shut down VM. In the VirtualBox gui, change the Ubuntu display to 3D. Start Ubuntu VM.

Success, I have the Unity interface again.

Updates

  • On this system I updated to Ubuntu 11.10 (codenamed Oneiric Ocelot). Works fine.

Environment
VirtualBox 4.1.4.
Host: Windows 7 Professional 64bit.
Guest: Ubuntu 11.10 codenamed “Oneiric Ocelot”, Unity desktop.
PC: AMD quad with 8GB ram.
Brain: of carbon-based life form, Earth, Homo sapiens sapiens.


Han Solo and The Princess (Love Theme) from “Empire Jazz”


Guest Additions info incorrect in VirtualBox?

May 22, 2011

Took a bit of effort but I got with my Windows 7 64bit host the VB 4.0.8 update to work with Ubuntu 11.04 w Unity.

When I go to the menu Machine > Session Information, the runtime tab says my Guest Additions is 4.0.4_OSEr70112. Shouldn’t that be 4.0.8_711778, since that is what I loaded?

Here is the info using the VBoxManage CLI:

C:\Program Files\Oracle\VirtualBox>VBoxManage.exe guestproperty enumerate "Ubuntu" | grep -i GuestAdd
Name: /VirtualBox/GuestAdd/Version, value: 4.0.4_OSE, timestamp: 1306626029078892600, flags:
Name: /VirtualBox/GuestAdd/Revision, value: 70112, timestamp: 1306626029079392600, flags:
Name: /VirtualBox/GuestAdd/Vbgl/Video/SavedMode, value: 1920x1105x32, timestamp: 1306626031970259700, flags:
Name: /VirtualBox/GuestAdd/HostVerLastChecked, value: 4.0.8, timestamp: 1306626070499652300, flags:

Hmm, this does show 4.0.8 for one property. Maybe I’m missing some step?

Issues with upgrade?
What were my issues with the upgrade? Ubuntu VM would not complete the boot up. First it was the freeze at checking battery state, then after getting by that, it was the freeze at installing new binary file formats.

I tried some of the suggestions found on the web. The final one I tried is listed below. But, even that didn’t work. Yet after a few reboots of the vm and setting the 3D mode for graphics it finally rebooted fully.

Some links I used to solve issues
Natty Narwhal and Virtual Box

Environment
Host: Windows 7 Professional 64bit.
Guest: Ubuntu 11.04 “Natty Narwhal”, Unity desktop.
PC: AMD quad with 8GB ram.
Brain: Belonging to carbon-based life form, Earth, Homo sapiens sapiens.


Upgrade to Ubuntu 11.04 works in VirtualBox 4.0.6

April 30, 2011

The upgrade to Natty Narwhal was pretty smooth. At first it failed cause my 8GB virtual drive did not have enough free space for the upgrade process. So I ran the Computer Janitor (I think that was the app) to make room. One day I’ll have to figure out how to increase my vm disk size (the snapshots, I read, make this complex).

After that it was pretty quick though at some points it prompted with some Linux geeky questions I had no way of answering, like “do you want to keep the cosmic figenbouton driver file?”. Yea, I said to keep everything. Finally restarted and then it said the Unity Desktop interface could not be used, I needed 3D. So, I shut Ubuntu down and in VirtualBox enabled the 3D options for the Ubuntu VM. Restarted and 3D worked. Hmmm, never did before, and I always had the same graphics card.

Unity looks good. I don’t see the revolution in it yet. The task bar is on the side, the “Start” button is on top, etc. The Launcher is ok. I could not find the Admin apps. It should have at least migrated the former menus into a legacy category. And the default transparency is too transparent.

But, it does rise to the Windows 7 level of usability (I don’t know about the Apple world, I’m not rich). Microsoft needs to innovate more. Stop copying and come up with something. Ubuntu is looking sweet.

Right now I’m listening to a Triple Concerto by Bach that is on my Windows 7 hard drive. It is playing in Ubuntu via the automatic shared drive that VirtualBox now allows. Chrome, FireFox, and Solitare is running in Ubuntu. A bunch of stuff in Windows 7. Pretty cool.

Verdict?
I recommend Ubuntu 11.04 and the Unity interface.

Update
Have been using it today. Unity Desktop has some warts. Once I was moving the mouse into a window so I can drag its right edge and make it wider. The little thumby scroll widget kept cropping up. Ugh! Little things like that. Not much, but they add up. No right mouse button click for properties and other things? Weird. Maybe its an option setting.

Links

How to test Ubuntu 11.04 with Unity in VirtualBox 4.0
Ubuntu (operating system)
The latest Ubuntu Unity: Good or bad?
Eclipse on Ubuntu 11.04 (Natty)

Environment

– Oracle VM VirtualBox 4.0.6 r71344
– HP P6230Y
– AMD Phenom II X4 810/2.6 Ghz
– Windows 7 Professional 64bit
– HIS HD 5670 IceQ 1GB (128bit) GDDR5 PCIe Display Port (DirectX 11/ Eyefinity)
– Samsung SyncMaster P2350
– Acer P241w


Follow

Get every new post delivered to your Inbox.