History log of /freebsd-11.0-release/usr.bin/mkimg/vmdk.c
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
# 303975 11-Aug-2016 gjb

Copy stable/11@r303970 to releng/11.0 as part of the 11.0-RELEASE
cycle.

Prune svn:mergeinfo from the new branch, and rename it to RC1.

Update __FreeBSD_version.

Use the quarterly branch for the default FreeBSD.conf pkg(8) repo and
the dvd1.iso packages population.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation

# 302408 08-Jul-2016 gjb

Copy head@r302406 to stable/11 as part of the 11.0-RELEASE cycle.
Prune svn:mergeinfo from the new branch, as nothing has been merged
here.

Additional commits post-branch will follow.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation


# 269745 09-Aug-2014 marcel

Create a redundant grain directory and table. Previously we were
cheating by assigning the same sector offset to both directories,
but it seems that VirtualBox doesn't like that. Neither does
qemu from the looks of it. We now actually write the directory
and table twice.

MFC after: 3 days


# 268646 15-Jul-2014 marcel

Add image_data() for checking whether a sequence of blocks has data.
Use this for VHD and VMDK to avoid allocating space in the image
for empty sectors.

Note that this negatively affects performance because mkimg uses a
temporary file for the intermediate storage. When mkimg has better
internal book keeping, performance can be significantly improved.


# 268236 03-Jul-2014 marcel

Add VHD support to mkimg(1). VHD is used by Xen and Microsoft's Hyper-V
among others.

Add an undocumented option for unit testing (-y). When given, the image
will have UUIDs and timestamps synthesized in a way that gives identical
results across runs. As such, UUIDs stop being unique, globally or
otherwise.

VHD support requested by: gjb@


# 266176 15-May-2014 marcel

MFuser/marcel/mkimg:
Add support for different output formats:
1. The output file that was previously written is now called the raw format.
2. Add the vmdk output format to create VMDK images.

When the format is not given, the raw output format is assumed.


# 266132 15-May-2014 marcel

Replace unchecked calls to write(2) and lseek(2) with calls to
sparse_write() and make sure to check for errors. In particular,
lseek(2) may not be possible (e.g. the output file is stdout)
and sparse_write(2) will do what is optimal (i.e. use lseek(2)
when possible).


# 266124 15-May-2014 marcel

Check allocation errors and free memory we allocated.


# 266112 15-May-2014 marcel

As it appears the image must be rounded to the nearest megabyte,


# 266099 15-May-2014 marcel

Commit rough but working code:
o The VMDK image can be queried and comverted by qemu-img
o VMware Fusion finds no errors when recovering using
'vmware-vdiskmanager -R' and the disk can be added to any
vortual machine.


# 266039 14-May-2014 marcel

Give output formats a chance to (re-)size the image before the
scheme adds the partitioning metadata. This is needed by VMDK
to round the image size to the grain size.


# 265725 09-May-2014 marcel

Add image_get_size() so formats can query about the image size.
Create the VMDK (embedded) descriptor file and round its size
to a multiple of 512.

TODO: We need the name of the output file -- it's in the extent
description. For now, just use "mkimg.vmdk".


# 265684 08-May-2014 marcel

Define the sparse extent header and document the steps to take
to create the VMDK file. Add some notes as well.

What I needed to know (roughly) is what interface the image API
is to provide and whether there are (knowledge) gaps that prevent
me from implementing it for real.


# 265625 08-May-2014 marcel

Add a linker set for output formats. This is mostly copied and trimmed
from the linker set for schemes. Add stubs for raw and vmdk output
formats so as to demonstrate that the usage message is correct.