Its quite easy to boot esx from a usb device or flash card..
First download the .iso, then browse with winrar or similar. See if you can find the “big”.dd file this is the file we need.
i.e. the ESXi 4 file is called VMware-VMvisor-big-208167-x86_64.dd
Next grab WinImage and “restore image to physical harddrive” choose the .dd file the select your usb / flash drive.
Done.
Goal was to create a vMA which would send a shutdown signal to all the virtual hosts it knows about. I’ve assumed that ESX and management agents that live within the service console will eventually be phased out.
The steps…
- Download and install the vMA from vmware – fire up the vm and setup the basic networking required
- Create trusts within the vMA to each of the vmware hosts you wish to manage (sudo vifp addserver <server>)
- Install HP Power Protector (linux agent) – you could substitute for your UPS client software
- Modify the shutdown script (may differ per vendor) to shutdown the esxboxs- “SDScript” (hostops.pl)
The 1st step is easy enough. Find the download at vmware and install (Deploy OVF Template…)
Once up and running you need to create the trust between the vMA and your ESX hosts. Logon using vi-admin and your password. then;
sudo vifp addserver esxbox1 (you will be prompted for the hosts root password)
Do this for each box you wish the vMA to manage.
Once you have installed your UPS agent into the vMA (linux client should work without issue) the next step is to modify the shutdown script to do the work. Within the script you will need the following in it…
vifpinit esxbox1
This sets the context of vMA to this host. Note: the server should have been added as one of the managed
/usr/lib/vmware-vcli/apps/host/hostops.pl -operation shutdown -target_host esxbox1
Note: you need to use the actual name of the host and not its IP. You can get the exact name of the
The HP power protector agent script is located at /usr/local/DevMan/SDScript
If you want to ensure all your guests shutdown cleanly, enable “shutdown virtual machines on host shutdown”. Also note that if you shutdown the host that the vMA is running on it will kill the script. So shutdown the host that the vMA is running on last (remove vm from DRS)
Want iSCSI in opensolaris?
Grab SUNWiscsitgt via package manager.
enable the server via svcadm;
svcadm enable iscsitgt
create your zfs iscsi pool; (this command will limit iscsi drive to 500GB in size)
zfs create -V 500G tank/iscsi
set isci on via zfs command;
zfs set shareiscsi=on tank/iscsi
check that target is up and running;
iscsitadm list target -v
Done. Should be able to connect via ip from another machine. I have not covered CHAP or any client side configuration. Assumed isolated LAN.

If you want to give zfs a go and also want a dedicated file server this is the solution.
Check it out here;
http://www.freenas.org/

I’m still using opensolaris though as i like running a few virtualbox machines on the same box.
Recently i hit what i thought was a huge disaster with my ZFS array. Essentially i was unable to import my zpool without causing the kernel to panic and reboot. Still unsure of the exact reason, but it didn’t seem to be due to a hardware fault. (zpool import showed all disks as ONLINE)
When i tried to import with zpool import -f tank the machine would lockup and reboot (panic).
The kernel panic; (key line)
> genunix: [ID 361072 kern.notice] zfs: freeing free segment (offset=3540185931776 size=22528)
Nothing i could do would fix it… tried both of these options in the system file with no success;
set zfs:zfs_recover=1
set aok=1
After a quick email from a Sun Engineer, the zdb command line that fixed it;
zdb -e -bcsvL <poolname>
zdb is a read only diagnostic tool, but seemed to read through the sectors that had the corrupt data and fix things?? (not sure how a read only tool does that) – the run took well over 15hrs.
Updated: 20/10/2009
Apparently if you have set zfs:zfs_recover=1 in your system file the zdb command will operate in a different manner fixing the issues it encounters.
Remember to run a zpool scrub <poolname> if you are lucky enough to get it back online.