Create a vmware esxi 4 bootable disk using linux

This is pretty straight forward, but why not put in in a post anyway.

You go to the vmware site and download the latest vmware esxi build. Download it somewhere in your home drive. After downloading perform following tasks:

Become root (su – or sudo -s)

mount the iso file. I made a dir /media/isoimage to mount it to:


mkdir /media/isomage/
mount -o loop -t iso9660 ./VMware-VMvisor-Installer-4.0.0-171294.x86_64.iso /media/isoimage/

I made a dir in my root folder to work in, copy the image.tgz file to there.


cd /media/isoimage/
mkdir /root/vmware-esxi-stuff
cp image.tgz /root/vmware-esxi-stuff/

Extract the image file

tar xzpfv image.tgz

Extract the actual file you need


bunzip2 VMware-VMvisor-big-171294-x86_64.dd.bz2

Now connect your usbdisk to your linux computer, make sure you know how it gets connected. I always tail my log files to make sure.


tail -f /var/log/messages

When you connect your usbdisk you will see a lot of entries passing by. You will see something like


Aug 23 12:43:06 bjornmonnens-desktop kernel: [1134680.672567] sd 6:0:0:0: [sdc] 7818240 512-byte hardware sectors: (4.00 GB/3.72 GiB)

So now you know it is on sdc. Make sure there aren’t any partitions on there or delete everything using fdisk (this might not be necessary, but I did it anyway)


fdisk /dev/sdc
Command (m for help): p

Disk /dev/sdc: 4002 MB, 4002938880 bytes
64 heads, 32 sectors/track, 3817 cylinders
Units = cylinders of 2048 * 512 = 1048576 bytes
Disk identifier: 0x49e2fd2f

Device Boot Start End Blocks Id System
/dev/sdc1 5 900 917504 5 Extended
/dev/sdc4 * 1 4 4080 4 FAT16 <32M
/dev/sdc5 5 254 255984 6 FAT16
/dev/sdc6 255 504 255984 6 FAT16

Delete all and write to disk


Command (m for help): d
Partition number (1-8): 1

Command (m for help): w
The partition table has been altered!

Calling ioctl() to re-read partition table.
Syncing disks.

Ok now everything should be empty, so go ahead and write your dd image to the usbdisk using the following command.


dd if=VMware-VMvisor-big-171294-x86_64.dd of=/dev/sdc

Ok it’s pretty easy, but it might help somebody. And for you windows guys us a bootable linux cd and perform these task instead of installing all kinds of rubbish on your computer.

Stupid Sabbam, paying for listening to the radio?

Am I the only one who finds this utterly stupid?

(For those who don’t understand dutch. In Belgium companies who have the radio turned on inside their companies (to make it a bit more pleasant for their employees) will have to pay.)

I still don’t fuly understand how this all fits together. Sabbam stated that if you play music in public you have to pay. So if my friends and family come over for a nice barbeque, I’ll have to pay them? If you will are carpooling, will you have to pay?

How does radio fit in here? If we will have to pay for everything we want to listen to. Why would I even listen to the radio then? I can find enought content under a opensource license. At the moment I hardly listen to the radio anymore, when I’m driving to work I always listen to my podcasts. The music business is a very strange thing if you think about it. They idea is that they want to sell as much as possible, right? They use the radio stations as advertising their media, face it if radio didn’t exist the music industrie would be much smaller. But now they even want you to pay for the advertising they do???? This is uterly insane, I know some of these things are also true for TV but … I find that employees and employers should do something about this, let’s all just stop buying music for 2 months, stop listening to the radio for 2 months, stop going to concerts,… just stop everything that gives the music industrie and sabbam money. Anybody with me?

Grails + JQuery

Today I had a bit of time to do some further grails fooling around. I already had a working application old school (so everything you do was a page refresh.). I wanted to do some small Ajax stuff (getting a product using it’s id and then prefilling the price fields with that value.)

In my domain I have the following object

class Product {

String name
String description
double buyInPrice
double unitPrice
double vatPerc

static hasMany = ['productPricings':ProductPricingHistory]

String toString(){
return "${description} ${unitPrice}"
}
}

In my controller I have to following

import grails.converters.JSON

class ProductController {

def scaffold = Product

def showjson = {
def product = Product.get(params.id)
render product as JSON
}

}

In my gsp I have to following snippit

$(document).ready(function(){
$("#product\\.id").change( function() {
setPrice($(this).val());
});
$("#units").change(function(){
calculatePrice();
});
});
function setPrice(productId){
$.ajax({
url:"../product/showjson/"+productId,
dataType:"json",
success:function(json){initProduct(json);},
error:function(xhr){
alert("Failed to save patient!: " +
xhr.status + ", " + xhr.statusText );
}

});
}

function calculatePrice(){
var unitprice = $("#unitprice").val();
var units = $("#units").val();
$("#priceExcl").val((unitprice * units));
}

function initProduct(json){
$("#unitprice").val(json.unitPrice);
}

As you can see it is really nice. Okay with Java + DWR this is also very simple, but here I have it in my controller and just say render … as JSON and grails does the rest. Actually I still have to look if Spring has some kinde of build in JSON renderer. Probably somebody already created this. But hey now I save and run (no need for start stop of my application server 😀 ) and in the end it’s still bytecode I’m using.

I still have to do some grails testing where I generate my backend in JPA and include it in a jar. However the grails/groovy part should still be reloadable, right? Anybody tried this yet?

maven + netbeans + Java

Today I wanted to build on of our projects with maven. (As I just deleted my .m2 repo it had to download everything and it took a while.) It went very fast until I started up netbeans that also had this project included. It seems that if you do builds command line and also have netbeans accessing the project this sometimes performs very strangly. You see netbeans keeps scanning the project and maven stopping regularly.
After killing netbeans maven again went blazing fast. After the first build from command finished I restarted netbeans and everything went fine. Pretty bizar if you ask me (however I don’t know the internals of netbeans and maven, maybe there are file conflicts??) Als rememeber that this is on my computer @ work, it’s a windows box with a virus scanner, so everytime you access a file it checks if there is a virus there, this could also have an impact off course.

Grails new site

Today I had to download the grails binary. I went over to http://www.grails.org. It seems they restyled their website, I have to say I’m impressed. I hope the default template that’s shipped with grails also got a restyling. For you guys who like nice designs have a look.