Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 23 Feb 2016 10:34:41 +0100
From:      "O. Hartmann" <ohartman@zedat.fu-berlin.de>
To:        "John L. Templer" <green_tiger@comcast.net>
Cc:        freebsd-questions <freebsd-questions@freebsd.org>
Subject:   Re: NanoBSD/FreeBSD: GPT bootable image: howto create sparse VMDK for ESXi?
Message-ID:  <20160223103441.3d64d544@freyja.zeit4.iv.bundesimmobilien.de>
In-Reply-To: <1456202944.4644.10.camel@comcast.net>
References:  <20160222144824.7bbcc212@freyja.zeit4.iv.bundesimmobilien.de> <1456202944.4644.10.camel@comcast.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, 22 Feb 2016 23:49:04 -0500
"John L. Templer" <green_tiger@comcast.net> wrote:

> 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@freebsd.org mailing list
> > https://lists.freebsd.org/mailman/listinfo/freebsd-questions
> > To unsubscribe, send any mail to
> > "freebsd-questions-unsubscribe@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.

Hello.

Thanks for the answer.

For the NanoBSD environment, there is no such thing like an installation ISO
and it has been provided with some advantages to create the layout manually of
our appliance.

I found a way, after days of searching, experiments and many faults using

VBoxManage convertfromraw

but this implies having already installed the huge
port /emultaors/virtualbox-ose. Since VirtualBox can not be compiled on CURRENT
with modern CPUs >= IvyBridge (see PR 193946,
PR ,https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=193946 ).

It is a pity that this can't achieved with tools already aboard of FreeBSD.

Kind regards,

Oliver



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20160223103441.3d64d544>