29 October, 2009

CentOS 5.4 support

Leong, a really solid guy at VMware, has a post up describing how to add a build profile for CentOS/Red Hat 5.4, here:

http://blogs.vmware.com/vapp/2009/09/vmware-studio-adding-rhel-54-support-in-minutes.html

08 October, 2009

Studio2 Suicide After Reboot

If you have to reboot the Studio2 appliance it will lose its OS image ISO internal loopback mounts. Upon losing them it will not simply try to remount them, instead it will try to download the image again but will save it with an indexed extension over and over until your Studio2 disk is full.

There are two fixes involved. The first simply attempts to remount the ISO. The second deletes the ISO (fragment?) before attempting to redownload the same image.

Here's the patch:


root@vmstudio:/opt/vmware/lib/build/VADK# diff -u /opt/vmware/lib/build/VADK/bkp/ISO.pm /opt/vmware/lib/build/VADK/ISO.pm
--- /opt/vmware/lib/build/VADK/bkp/ISO.pm 2009-10-08 10:20:37.000000000 +0000
+++ /opt/vmware/lib/build/VADK/ISO.pm 2009-10-08 13:23:59.000000000 +0000
@@ -77,6 +77,12 @@
#
my $already_mounted = `mount | cut -f3 -d' ' | fgrep $mountpoint`;

+# Will: simply remount it if possible
+if (!$already_mounted && (-f $filename)) {
+ &mount($filename, $mountpoint);
+ $already_mounted = `mount | cut -f3 -d' ' | fgrep $mountpoint`;
+}
+
if (!$already_mounted) {

if ($iso =~ /^(ht|f)tp:(.+)$/i) {
@@ -90,7 +96,12 @@
if (-r $envFile) {
$wgetcmd = ". $envFile; ";
}
- $wgetcmd .= 'cd '.$stageDir.'; wget '.VADK::Constants::WGET_TIMEOUT.' '.$iso;
+
+# Will: fix re-download attempts (were saving with .index extension)
+unlink($filename);
+$wgetcmd .= 'cd '.$stageDir.'; wget'.$iso;
+
+ # $wgetcmd .= 'cd '.$stageDir.'; wget '.VADK::Constants::WGET_TIMEOUT.' '.$iso;

my $ret = VADK::System::systemWrapped($wgetcmd);
if ($ret->{'exit_value'}) {


I also stripped out the retry and timeout arguments to wget as they were causing wget to abort on a peer reset instead of continuing with a new connection.

If you've run into this problem do delete all the files in the download ISO cache:

rm -vf /opt/vmware/cache/build/ISO/*

17 September, 2009

Porting Builds to Studio2

A few tips when migrating builds from VMware Studio v1 to Studio v2:

- studiocli has a built-in feature to convert build profiles from v1 to v2 but I've been unable to make that work and don't feel like fixing the python behind it

# studiocli -C -p studio1vm.xml
Traceback (most recent call last):
File "/opt/vmware/share/build/profconv", line 658, in
main()
File "/opt/vmware/share/build/profconv", line 639, in main
osspecific(xp)
File "/opt/vmware/share/build/profconv", line 406, in osspecific
newurl.setContent(VMTOOLS)
UnboundLocalError: local variable 'VMTOOLS' referenced before assignment


So I used the Studio 2 GUI to rough out some new build profiles then with two vim sessions side-by-side I migrated the settings, users, scripts etc manually. That sucks pretty hard when you've got a handful of appliances to port.


- The embedded shell scripts used to require escaping on variable references, like:

FOO=/tmp/foo
echo 1 > \$FOO


..but in studio 2.0 the escaping is no longer necessary, like this:

FOO=/tmp/foo
echo 1 > $FOO


- studiocli can no longer be run with remote SSH due to some environment issue. Instead just run vabs.pl directly, as in:

ssh root@vmstudio2 /opt/vmware/share/build/vabs.pl \
-cvp /tmp/profile.xml -i instanceX


It sure is nice building OVA and OVF 1.0 targets now. Retiring VMware Server 1 is a joy too as both the Studio2 VM and builds happen within one ESX system. Build times are improved by about 15% despite the additional targets.

I'm working on vApp creation to bundle up a handful of appliances in my nightly builds and can post about that if people are curious.

08 September, 2009

VMware Studio 2.0 shipped!

Last Monday the production release of VMware Studio 2.0 made its way to the download servers.

It was great seeing some of the VMware Studio team on the VMworld show floor. There's a lot to be proud of with last week's production release of Studio 2.0.

Upgrade from the Studio 2.0 Beta release immediately. I advise Studio 1.0 users run Studio 2.0 side-by-side with Studio 1.0 to ease migration.

Studio 2.0 Beta got some security love from Security Focus. Good times

Winner VMworld09 Best of Show and Gold Security!

Congrats to my fantastic team of engineers and architects at HyTrust for sweeping the awards at this year's VMworld in San Francisco.

http://hytrust.com/

30 July, 2009

VMworld 09

Hey folks I'll be at VMworld on Wednesday and expect to make the party afterwards. You can visit me at the booth of my brilliant security startup HyTrust. I'm the short blond Dutch/Canadian/Californian. Say hi :)

29 June, 2009

VMware Studio 2.0 Beta1 is out!

And it looks very good. The underlying product framework is fundamentally the same but there are loads of new features.

64bit Linux builds are supported as are Windows 2003,8. Windows makes a lot of sense for big enterprises who need to standardize internal VM images. It's a big step up over using a tuned VM template.

You no longer need to have a copy of the venerable VMware Server 1.0 to provision VMs. You can now use Workstation and ESX3/4/VC. Have a look:




You now have a choice of v4 and v7 virtual hardware with enforced CPU and memory limits to match. Using v7 compatibility costs you some older hosted compatibility (Server 1.x and Player) but will let your appliance users scale the VA to 8 vCPUs and 255GB RAM for heavier workloads:





Multiple virtual appliance images can be rolled up into one "vApp" bundle. This really helps with scalability especially since different components of a software platform have different bandwidth and headroom needs. Think of a scaled LAMP stack but with Apache/perl on one VM and MySQL on another. The MySQL VM can be hosted on a physical server tuned for fast IO and the Apache/Perl VM can be hosted on a much cheaper edge server. That would be a great candidate for a vApp style multi-VM appliance. One OVA, many VMs, one logical VA.






The build targets include OVF v1.0 in addition to the OVF v0.9 spec used by Server 1.0. OVA bundles are now supported as an additional build target. This is an archive of the OVF XML file along with the VMDKs but to my disappointment Studio 2.0 does not sign these to ensure their integrity for distribution. I hope they consider this in the next release.

There are better tools for helping bundle applications for inclusion in the appliances, for both the set of supported Linuxes and Windows too. I haven't dug into that much as my professional life is in already well bundled in .war and .rpm files these days. The dependency resolution is far improved, that should help new users.

Under the hood the PXE boot sequence used during VA provisioning has been replaced with a more reliable canned VMDK bootstrap process. This change is transparent to most users but can help keep Studio from getting confused by custom PXE implementations on the same LAN. A good change for sure.

Peruse the release notes for Studio 2.0 Beta here:

http://communities.vmware.com/viewwebdoc.jspa?documentID=DOC-10175

And download it. Give it a whirl. I love to see a relatively OS agnostic vendor like VMware reduce the basic OS to a rather small/trivial piece of an application. OS vendors should be freaking out right now and innovating like mad before they're as unseen and ubiquitous as the average C library...

23 May, 2009

Windows support

I was just asked about creating a VMware Studio template for Windows.

Edit July 2009: Windows 2003/2008 support is in the beta release of Studio 2.0, have at it :)


Original post:

In a nutshell...

The VMware Studio build system was architected with Windows in mind.
The XSL template necessary would create a Windows unattended install file.
VMware would have to deliver new guest software for Windows too,
though I generally build appliances without the VMware guest stack.

The PXE setup code in a Windows build profile XML reference would take a bit of
effort but is doable.

What flavour of Windows are people using for appliances?

Anyone tried unattended installs of Windows 7?

28 March, 2009

VMware Studio and its host hardware

I've been building appliances on an AMD phenom 9850 quad core with 8GB RAM of late. This system has been running Ubuntu 8.04 amd64 and my builds took about 45 minutes when my local Aberdeen NAS was behaving.

This week while attempting to upgrade to Ubuntu's Jaunty the software raid mirroring (!) fell over and that build box crashed. It was really strange since grub settings were saved correctly on one drive in the mirror set but not the other.

So I blew it all away and installed CentOS 5.2 x86_64 [ 5.3? eh? before xmas *cough* ;) ] ..And put VMware Server 1.0.8 on there without installation headaches and hey, my builds are down to 26 minutes. Fantastic improvement.

I may use Ubuntu again as a deskside workstation but never on a server. Seriously flakey upgrades. RHEL/CentOS has the reliability win for now.

I know VMware Server 2 is gaining popularity but from what I know VMware Studio still only supports Server 1.x. Would love to see ESX support as I have a farm of cool AMD Shanghai boxes now.

I've an Intel Nehelem i720 system on order. 12GB ddr3 and 4 sata drives in a stripe set while install sources will continue to reside on the NAS. I like to keep build hosts as stateless as possible. Studio logs build times in both its debug and verbose logs and I'll post a follow-up to that once the new box is online. I'm guessing 20 minutes, will see..

For home I have an AMD Shanghai 720 on order. Don't know if I'll get VMware Server running on that unless someone asks me to. That system will replace a pre-release first-gen opteron 2ghz that is more than 5 years old. Wow. I miss getting free & early access to AMD and Intel CPU samples.

For the record the Aberdeen NAS runs Windows and absolutely sucks serving NFS. Avoid them if you have any Linux/Unix/OSX infrastructure.