From owner-freebsd-questions@freebsd.org Tue Feb 23 04:56:42 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 0FEBAAB1424 for ; Tue, 23 Feb 2016 04:56:42 +0000 (UTC) (envelope-from green_tiger@comcast.net) Received: from resqmta-ch2-11v.sys.comcast.net (resqmta-ch2-11v.sys.comcast.net [IPv6:2001:558:fe21:29:69:252:207:43]) (using TLSv1.2 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (Client CN "Bizanga Labs SMTP Client Certificate", Issuer "Bizanga Labs CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id D752612A9 for ; Tue, 23 Feb 2016 04:56:41 +0000 (UTC) (envelope-from green_tiger@comcast.net) Received: from resomta-ch2-01v.sys.comcast.net ([69.252.207.97]) by resqmta-ch2-11v.sys.comcast.net with comcast id Mgwg1s00226dK1R01gwgqM; Tue, 23 Feb 2016 04:56:40 +0000 Received: from [IPv6:2601:151:c303:4523:6129:eb2c:934e:c2a7] ([IPv6:2601:151:c303:4523:6129:eb2c:934e:c2a7]) by resomta-ch2-01v.sys.comcast.net with comcast id MgwZ1s00B0bvxye01gwfEd; Tue, 23 Feb 2016 04:56:39 +0000 Message-ID: <1456202944.4644.10.camel@comcast.net> Subject: Re: NanoBSD/FreeBSD: GPT bootable image: howto create sparse VMDK for ESXi? From: "John L. Templer" To: "O. Hartmann" Cc: freebsd-questions In-Reply-To: <20160222144824.7bbcc212@freyja.zeit4.iv.bundesimmobilien.de> References: <20160222144824.7bbcc212@freyja.zeit4.iv.bundesimmobilien.de> Content-Type: text/plain; charset="UTF-8" Date: Mon, 22 Feb 2016 23:49:04 -0500 Mime-Version: 1.0 X-Mailer: Evolution 3.12.9-1+b1 Content-Transfer-Encoding: 7bit DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=comcast.net; s=q20140121; t=1456203400; bh=ww+L+kKGezx876KbjNi6lC/dktBezqrxs2Dk2rFpYyI=; h=Received:Received:Message-ID:Subject:From:To:Content-Type:Date: Mime-Version; b=c+aIH3HbiH/RJn/QQPvsjr3cFGeRGLZ+uEOO3wc82EEYORIb8kMjxYpn7xxHM3Rrq Fy3MMuxiB+7hcM3i63YvOqT0Nl+Z4RCP1bSBlOyyVrG72iaf2TAhIZTmhNiEPrPp/p nVEV/coD9kgfx4Dk9o4Lqy74RzPULILJU/8IZDwOKaQhSAWTMMh+a1N/z21UdTS/Yk 3/+w8HeI4s7uqva21R56eNMh4umuchlq2de0r7kExgnl5y9++4uWLuEuV1XCh2AORF 4a1xBdeBLAhCiCB1IEUc9s1ZRRxjJDqRrIIxbVVrKtKEyUZKSTAdCk4brCeBek+Ucg qD+qViMvOJDFA== 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: Tue, 23 Feb 2016 04:56:42 -0000 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.