Is there a tool which can search linked clones of a chosen virtual machine in selected directories?

Alternatively is there a tool which would show the path to the parent virtual disk of a selected virtual disk (.vmdk file)? This would make potential creation of the search tool much easier.


Script showing parent .vmdk file

There seems to be no tool which can show parent .vmdk file. Very good source of information for the script was VMDK Handbook.


monstart=512    # header start in monolithic vmdk
monlen=1024     # header length in monolithic vmdk

err () { echo "$@" >&2 ; exit 1 ; }

test "$#" = 1 || err Usage: vmw-vmdk-parent disk-image.vmdk
test -f "$1" || err "$1" does not seem to be a file
test -r "$1" || err "$1" is not readable

if test $(stat -c %s "$1") -le 1500 ; then
    # separate header file (smaller than 1500 B)
    cat "$1"
    # monolithic vmdk file with embedded header
    dd if="$1" status=noxfer bs=1 skip=$monstart count=$monlen 2>/dev/null
) |
    grep ^parentFileNameHint |
    sed 's/^parentFileNameHint="\([^"]*\)"$/\1/' ||
    err Error during processing "$1"
  • A script for searching linked clones will probably follow later :) – pabouk Jul 28 '13 at 0:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.