NanoBSD/FreeBSD: GPT bootable image: howto create sparse VMDK for ESXi?

John L. Templer green_tiger at comcast.net
Tue Feb 23 04:56:42 UTC 2016


On Mon, 2016-02-22 at 14:48 +0100, O. Hartmann wrote:
> Hello out there.
> 
> First please CC me as I do not subscribe this list.
> 
> I successfully use the NanoBSD framework with some modifications for creation
> of GPT/UEFI bootable images with recent CURRENT. The appliance boots off microSD
> cards, ISO 9660 images (with some modifications made to the nanoBSD framework)
> and USB flash drives.
> 
> I need this image of a FreeBSD appliance on an ESXi 5.5 and 6.0 system. I
> already tried to apply the vmdktool taken from ports (sysutils/vmdktool), but
> neither the ESXi 5.5 nor 6.0 recognizes the resulting vmdk file as a valid
> disk. The manpage of vmdktool states it suits disk format VMDisk Format 1.1,
> ESXi 5.5 or 6.0 has version 5.0, if not higher (as far as I know). Converting
> any tested and booting image is not recognized by the ESXi. Several manually
> applied manipulations did not go well - the vmdk file is seen then, but the
> ESXi complains about unknown disk type 7 in some cases. 
> 
> I tried then FreeBSD's mkimg(1) tool. Without success. The resulting vmdk file
> is well recognized by the ESXi, it also boots, but then the loader stops at
> the point where we have to issue "?" to get the recognized GEOM drives.
> Consider nano.img to be a raw image conatining a GPT partitioning layout and
> the EFIFAT UEFI partition and two (or three, depending on whether nanoBSD is
> configured using a second, ALTROOT partition, or not)
> partitions, named/labeled "/dev/ufs/nanos1a" and "/dev/ufs/nanos3" (the labels
> actually are s1a and s3). Put onot a SD or USB flash, booting off on a UEFI
> capable/configured box (using a Fujitsu Server as well as a ZOTAC nano box and
> Intel NUC) works well! Now I apply
> 
> mkimg -s gpt -p freebsd:=nano.img -f vmdk -o nano.vmdk
> 
> The resulting vmdk disk image boots - but then fails at the loader prompt
> calling for a boot partition. The labeling is wrong, when hitting "?" and
> showing the list of recognizes partitions. 
> 
> It seems, mkimg "envelopes" the whole image again instead of simply emitting a
> vmdk file suitable as ESXi disk with the partitioning layout represented by
> the RAW image.
> 
> At the end, I'm floating dead in the water! Either I can convert a raw image
> to an ESXi vmdk file, but it isn't recognized, or I have a bootable vmdk, but
> it stops working because of a wrong partition layout and non-recognized
> labeling.
> 
> Is there a way to convert RAW images of a working/booting disk into a vmdk
> file that is working with both ESXi 5.5 and 6.0? 
> 
> Thank yo very much in advance,
> 
> oliver  
> _______________________________________________
> freebsd-questions at freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "freebsd-questions-unsubscribe at freebsd.org"

(I'm assuming you're running some VMware product like vSphere or
vCenter.)

I always found it easier to put an ISO image of an install CD or DVD on
a datastore, spin up a new VM with that image attached, and install it
on the new VM.  Then you can take the resulting VMDK file and copy it
wherever you want.



More information about the freebsd-questions mailing list