From owner-freebsd-virtualization@freebsd.org Mon Aug 8 06:09:08 2016 Return-Path: Delivered-To: freebsd-virtualization@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 B1A1FBB1060 for ; Mon, 8 Aug 2016 06:09:08 +0000 (UTC) (envelope-from vas@mpeks.tomsk.su) Received: from relay2.tomsk.ru (mail.sibptus.tomsk.ru [212.73.124.5]) by mx1.freebsd.org (Postfix) with ESMTP id 22EDA1895 for ; Mon, 8 Aug 2016 06:09:07 +0000 (UTC) (envelope-from vas@mpeks.tomsk.su) X-Virus-Scanned: by clamd daemon 0.98.5_1 for FreeBSD at relay2.tomsk.ru Received: from [212.73.125.240] (HELO admin.sibptus.transneft.ru) by relay2.tomsk.ru (CommuniGate Pro SMTP 5.1.16) with ESMTPS id 39311515; Mon, 08 Aug 2016 12:08:49 +0600 Received: from admin.sibptus.transneft.ru (sudakov@localhost [127.0.0.1]) by admin.sibptus.transneft.ru (8.14.9/8.14.9) with ESMTP id u78693Pu040687; Mon, 8 Aug 2016 13:09:03 +0700 (KRAT) (envelope-from vas@mpeks.tomsk.su) Received: (from sudakov@localhost) by admin.sibptus.transneft.ru (8.14.9/8.14.9/Submit) id u78690pl040683; Mon, 8 Aug 2016 13:09:00 +0700 (KRAT) (envelope-from vas@mpeks.tomsk.su) X-Authentication-Warning: admin.sibptus.transneft.ru: sudakov set sender to vas@mpeks.tomsk.su using -f Date: Mon, 8 Aug 2016 13:08:59 +0700 From: Victor Sudakov To: Thomas Laus Cc: freebsd-virtualization@freebsd.org Subject: Re: Converting from VMDK to RAW Message-ID: <20160808060859.GA40283@admin.sibptus.transneft.ru> References: <20160807131117.GA23554@admin.sibptus.transneft.ru> <20160807140825.GA35627@mail.laus.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160807140825.GA35627@mail.laus.org> Organization: AO "Svyaztransneft", SibPTUS X-PGP-Key: http://www.dreamwidth.org/pubkey?user=victor_sudakov X-PGP-Fingerprint: 10E3 1171 1273 E007 C2E9 3532 0DA4 F259 9B5E C634 User-Agent: Mutt/1.6.1 (2016-04-27) X-BeenThere: freebsd-virtualization@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "Discussion of various virtualization techniques FreeBSD supports." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Aug 2016 06:09:08 -0000 Thomas Laus wrote: > > > > I would like to convert some FreeBSD VMs from VMware to bhyve. Which > > is the best way to convert virtual disks from the VMDK to the RAW > > format (which I think is the format bhyve uses)? > > > I have used /devel/vmdktool to do the job in the past. It has always > worked for me. Now it's in sysutils/vmdktool. However, it's not all that simple. I have downloaded the VM disk from VMware ESXi and the image consists of two files: myhost-flat.vmdk and myhost.vmdk. The latter is a small text file containing meta-information about the disk. The former looks like a RAW disk, at least I can mdconfig it and mount the partitions. $ file "myhost-flat.vmdk" myhost-flat.vmdk: DOS/MBR boot sector; partition 1 : ID=0xee, start-CHS (0x0,0,2), end-CHS (0x3ff,255,63), startsector 1, 20971519 sectors the problem is that sysutils/vmdktool does not recognize either of them: $ vmdktool -i myhost.vmdk myhost.vmdk: File too small (must be at least 1024 bytes) $ vmdktool -i myhost-flat.vmdk myhost-flat.vmdk: Bad VMDK magic (got 8ec031fc, want 564d444b) $ Probably I don't need any converters at all because the *-flat.vmdk is already a RAW image. -- Victor Sudakov, VAS4-RIPE, VAS47-RIPN sip:sudakov@sibptus.tomsk.ru