Android development on Ubuntu 12.10 64-bit

Yes, like many people I have a 64 bit Ubuntu 12.10 and I wanted to get my Android eclipse development environment running. Everything I read (mostly the android developers guide) said install ia32-libs. Well I didn’t want to install all that baggage.

So… the minimum i’ve needed to install so far is :

sudo apt-get install eclipse libgl1-mesa-dev:i386 libsdl1.2debian:i386 libncurses5:i386

and the associate dependencies they drag on – it’s a bit, but nowhere near as much as ia32-libs.

It’s working so far, only time will tell what else I need to install.

Let me know if you’ve tried similar and i’m doomed to install ia32-libs anyway 😉

It’s also very nice to note that Ubuntu 12.10 comes with a suitable eclipse in the standard repositories so there’s no need to download from eclipse and install manually.


Removing non-present devices from Windows 2008

I had a W2K8 vm where I was adding / removing NICs like they were going out of fashion. As a result by the end of it I had a mess of non-present devices.

So how do you fix that mess?

I found (or more accurately was advised) that I can start a command prompt and


Click on the ‘view’ / ‘Show Hidden devices’

Hey presto, there the were.

Then it’s just a case of right-click on the devices you no longer want and select uninstall.

End result is nice and neat.

Minimal Centos 6 build

I was in need of creating a minimal Centos6 system, here’s how I did it in case anyone else is interested.

kickstart for minimal Centos 6 install.   Hit tab at the boot screen

In this case as my environment doesn’t have a dhcp server I pass the ip of the new machine as a kernel option such that the request for the kickstart file will work,

Here is the kickstart file that I used.



lang en_US

keyboard us

bootloader –location=mbr –append=”crashkernel=auto rhgb vga=791 quiet”

zerombr yes

clearpart –all –initlabel –drives=vda

ignoredisk –only-use=vda

part /boot –fstype ext3 –size=512 –ondisk=vda

part pv.6 –size=8000 –grow –ondisk=vda

volgroup vgsys0 –pesize=32768 pv.6

logvol / –fstype ext3 –name=root –vgname=vgsys0 –size=1000

logvol /usr –fstype ext4 –name=lvusr –vgname=vgsys0 –size=2000

logvol /var –fstype ext4 –name=lvvar –vgname=vgsys0 –size=1000

logvol /opt –fstype ext4 –name=lvopt –vgname=vgsys0 –size=500

logvol /home –fstype ext4 –name=lvhome –vgname=vgsys0 –size=100

logvol /srv –fstype ext4 –name=lvsrv –vgname=vgsys0 –size=1000

logvol swap –fstype swap –name=lvswap –vgname=vgsys0 –size=1000

timezone Australia/Melbourne

authconfig –enableshadow –passalgo=sha512

selinux –permissive

firewall –service=ssh –service=smtp –port=143:tcp,80:tcp,443:tcp

rootpw  –iscrypted $1$ZV4gC5MB@IvTI#j5jK2BFt/j1cnZiP0

network –bootproto static –ip –netmask –gateway –nameserver –hostname

reboot –eject

%packages –nobase





 %post –log=/root/ks.log

cd /root



Only 204 packages installed 🙂

vCenter Server on your AD Domain Controller?

Ok, so it’s not the most clever thing you can do, but in a lab situation you may not simply have the machines or licences to go around.

vmware tends to agree – the vCenter server itself wont normally install on a system where AD is running.

This product can only be installed on the following 64-bit operating systems:
Windows XP SP2 or above
Windows 2003
Windows 2008

The secret is to get vCenter to use different ports for its ADAM instance.

As I prefer scripting to clickity-click you can put in a default vCenter server build (with different LDAP ports) using

start-process -wait -filepath z:\vpx\VMware-vcserver.exe -argumentlist '/q /s /w /L1033 /v" /qr DB_SERVER_TYPE=Bundled FORMAT_DB=1 VCS_ADAM_LDAP_PORT=3899 VCS_ADAM_SSL_PORT=6369"'

You should install vCenter Server before promoting to AD. Once it’s done you can run dcpromo.exe to set up the AD.

Note: You wont be able to re-install the vCenter server though so the usefulness to you may vary. That’s right, this is not a recommended production deployment 😉

If you know what everything above is doing – great. If you don’t, then assume it will eat your children.

Storage vMotion only one harddisk via powershell

This is more a reminder to me 🙂

Get-HardDisk -vm vm | Where {$_.Name -eq "Hard disk 1"} |
% {Set-HardDisk -HardDisk $_ -Datastore "" -Confirm:$false}

But the summary is that it svMotions 1 hard disk out of a VM onto a different datastore – useful is you have multiple tiers and want say OS disk on one tier and low access data volumes on other storage tiers.

SMEP and KVM – sounds interesting

Recently a patch was dropped into the KVM community – adding support for the Intel SMEP cpu feature (if available on the CPU). I thought to myself, what the hell is SMEP?

According to the Intel Software Developers Manual it is “Supervisor-Mode Execution Prevention” – this sounds like a great thing as the kernel is prevented from executing ‘user data’ in kernel mode – ie. If there is an exploit that delivers a page of data and asks the kernel to execute it then this wont happen and a fault will be triggered. This sounds like a neat piece of work and as it’s all h/w based then there should be little overhead.

Like me, i’m guessing you’re wondering if your system has the SMEP cpu feature then this code will show you. Don’t be disappointed if your cpu doesn’t have it – it’s a very new feature and I can’t even find what cpu’s implement it.

Anyway, it’s a step in the right direction and that future direction will hopefully allow hypervisors to be that little bit more secure from un-trusted VM’s and provide a VM ‘shell’ environment that’s a little more secure for the VM’s. Unfortunately the way things currently stand the usefulness for KVM is unlikely to be immediately realised as intel engineers suggest enabling SMEP without a guest vm’s knowledge is likely to be ‘problematic’.

Automated VCenter install (lab)

I’m trying to keep my home lab pretty automated. One of the things i’m always (well occasionally 🙂 )trying out is new vCenter installs. In order to speed things up I have the following little powershell script to remove the vCenter Server application and the vCenter Client prior to automatically re-installing them.

This script below uses defaults for the install. It’s possible to completely script the install which is useful if you have a corporate standard configuration. All the details can be found here.

Anyway, here is the script – i’ve called it the totally imaginative name of resetvc.ps1 – don’t run it in your production environment unless you know what you’re doing

(get-wmiobject -computername . -class Win32_Product -Filter "NAME='VMware vCenter Server'" ).Uninstall()
(get-wmiobject -computername . -class Win32_Product -Filter "NAME='VMware vSphere Client 4.1'" ).Uninstall()
start-process -wait -filepath z:\vpx\VMware-vcserver.exe -argumentlist '/q /s /w /L1033 /v" /qr DB_SERVER_TYPE=Bundled FORMAT_DB=1"'
start-process -wait -filepath z:\vpx\VMware-viclient.exe -argumentlist '/q /s /w /L1033 /v" /qr INSTALL_VIUPDATE=1"'

Notes: First 2 lines uninstall the vCenter Server and the vSphere Client – just ignore the error messages if this is the first time you’ve installed the vCenter Server etc. The third line installs the vcenter server from the iso which for me is my z:. Lucky last, the vSphere Client is installed – including in this case the Host Update utility.