Creating and Mounting VIB files in ESXi

VIB files are stored in /bootbank, and mounted at boot file. A VIB file is a compress vmtar file (which itself is a variation of a tar file).

Once they’re mounted, they will also appear in /tardisks.

Here are the files which aren’t mounted (not all are vib files)

# cd /bootbank
# for f in *
> do
> if [ ! -r /tardisks/$f ]
> then
> echo $f
> fi
> done
a.b00
b.b00
boot.cfg
k.b00
onetime.tgz
tboot.b00
useropts.gz

eg, to create a VIB file and mount it:

~ # mkdir /custom
~ # printf “# Custom File\n” > /custom/myfile
~ # tar cvf /tmp/custom.tar custom
custom/
custom/myfile
~ # vmtar -c /tmp/custom.tar -v -o /tmp/custom.vmtar
~ # gzip < /tmp/custom.vmtar > /tmp/custom.v00
~ # vmtar -t < /tmp/custom.v00
drwxr-xr-x 0/0          0 2012-05-01 13:41 ./custom/
-rw-r–r– 0/0         14 2012-05-01 13:41 ./custom/myfile
~ # cp /tmp/custom.v00 /bootbank

Before mounting it, it is not linked into /tardisks:

~ # ls /tardisks/custom*
ls: /tardisks/custom*: No such file or directory

After it is:
~ # vmkramdisk /bootbank/custom.v00
~ # ls /tardisks/custom*
/tardisks/custom.v00

And umount it:

~ # vmkramdisk -u /tardisks/custom.v00
~ # ls /tardisks/custom*
ls: /tardisks/custom*: No such file or directory

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: