From owner-freebsd-questions@freebsd.org Mon Feb 22 13:48:33 2016 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E8DEEAB08F2 for ; Mon, 22 Feb 2016 13:48:32 +0000 (UTC) (envelope-from ohartman@zedat.fu-berlin.de) Received: from outpost1.zedat.fu-berlin.de (outpost1.zedat.fu-berlin.de [130.133.4.66]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AF5CF1259 for ; Mon, 22 Feb 2016 13:48:32 +0000 (UTC) (envelope-from ohartman@zedat.fu-berlin.de) Received: from inpost2.zedat.fu-berlin.de ([130.133.4.69]) by outpost.zedat.fu-berlin.de (Exim 4.85) for freebsd-questions@freebsd.org with esmtps (TLSv1.2:DHE-RSA-AES256-GCM-SHA384:256) (envelope-from ) id <1aXqqk-000Nvt-3x>; Mon, 22 Feb 2016 14:48:30 +0100 Received: from p578a69f9.dip0.t-ipconnect.de ([87.138.105.249] helo=freyja.zeit4.iv.bundesimmobilien.de) by inpost2.zedat.fu-berlin.de (Exim 4.85) for freebsd-questions@freebsd.org with esmtpsa (TLSv1.2:AES128-GCM-SHA256:128) (envelope-from ) id <1aXqqj-002bux-PM>; Mon, 22 Feb 2016 14:48:30 +0100 Date: Mon, 22 Feb 2016 14:48:24 +0100 From: "O. Hartmann" To: freebsd-questions Subject: NanoBSD/FreeBSD: GPT bootable image: howto create sparse VMDK for ESXi? Message-ID: <20160222144824.7bbcc212@freyja.zeit4.iv.bundesimmobilien.de> Organization: FU Berlin X-Mailer: Claws Mail 3.13.2 (GTK+ 2.24.29; amd64-portbld-freebsd11.0) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Originating-IP: 87.138.105.249 X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Feb 2016 13:48:33 -0000 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