Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 8 Aug 2016 13:08:59 +0700
From:      Victor Sudakov <vas@mpeks.tomsk.su>
To:        Thomas Laus <lausts@acm.org>
Cc:        freebsd-virtualization@freebsd.org
Subject:   Re: Converting from VMDK to RAW
Message-ID:  <20160808060859.GA40283@admin.sibptus.transneft.ru>
In-Reply-To: <20160807140825.GA35627@mail.laus.org>
References:  <20160807131117.GA23554@admin.sibptus.transneft.ru> <20160807140825.GA35627@mail.laus.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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



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