Highlighted
Contributor
Contributor

BUG: vmware-vdiskmanager does not accept advertised -h option

Per the bug reporting instructions, I am reporting this bug here.

The vmware-vdiskmanager program embedded inside VMware Fusion.app version 8.1.0 is defective. The usage message shows an example of using the -h option, but attempting to use the -h option produces an error message that the option is illegal.

$ '/Applications/VMware Fusion.app/Contents/Library/vmware-vdiskmanager' -h myesxihost
/Applications/VMware Fusion.app/Contents/Library/vmware-vdiskmanager: illegal option -- h
VMware Virtual Disk Manager - build 3272237.
Usage: vmware-vdiskmanager OPTIONS <disk-name> | <mount-point>
Offline disk manipulation utility
  Operations, only one may be specified at a time:
     -c                   : create disk.  Additional creation options must
                            be specified.  Only local virtual disks can be
                            created.
     -d                   : defragment the specified virtual disk. Only
                            local virtual disks may be defragmented.
     -k                   : shrink the specified virtual disk. Only local
                            virtual disks may be shrunk.
     -n <source-disk>     : rename the specified virtual disk; need to
                            specify destination disk-name. Only local virtual
                            disks may be renamed.
     -p                   : prepare the mounted virtual disk specified by
                            the volume path for shrinking.
     -r <source-disk>     : convert the specified disk; need to specify
                            destination disk-type.  For local destination disks
                            the disk type must be specified.
     -x <new-capacity>    : expand the disk to the specified capacity. Only
                            local virtual disks may be expanded.
     -R                   : check a sparse virtual disk for consistency and attempt
                            to repair any errors.
     -e                   : check for disk chain consistency.
     -D                   : make disk deletable.  This should only be used on disks
                            that have been copied from another product.


  Other Options:
     -q                   : do not log messages


  Additional options for create and convert:
     -a <adapter>         : (for use with -c only) adapter type
                            (ide, buslogic, lsilogic). Pass lsilogic for other adapter types.
     -s <size>            : capacity of the virtual disk
     -t <disk-type>       : disk type id


  Disk types:
      0                   : single growable virtual disk
      1                   : growable virtual disk split in 2GB files
      2                   : preallocated virtual disk
      3                   : preallocated virtual disk split in 2GB files
      4                   : preallocated ESX-type virtual disk
      5                   : compressed disk optimized for streaming
      6                   : thin provisioned virtual disk - ESX 3.x and above


     The capacity can be specified in sectors, KB, MB or GB.
     The acceptable ranges:
                           ide/scsi adapter : [1MB, 8192.0GB]
                           buslogic adapter : [1MB, 2040.0GB]
        ex 1: vmware-vdiskmanager -c -s 850MB -a ide -t 0 myIdeDisk.vmdk
        ex 2: vmware-vdiskmanager -d myDisk.vmdk
        ex 3: vmware-vdiskmanager -r sourceDisk.vmdk -t 0 destinationDisk.vmdk
        ex 4: vmware-vdiskmanager -x 36GB myDisk.vmdk
        ex 5: vmware-vdiskmanager -n sourceName.vmdk destinationName.vmdk
        ex 6: vmware-vdiskmanager -r sourceDisk.vmdk -t 4 -h esx-name.mycompany.com \
              -u username -f passwordfile "[storage1]/path/to/targetDisk.vmdk"
        ex 7: vmware-vdiskmanager -k myDisk.vmdk
        ex 8: vmware-vdiskmanager -p <mount-point>
              (A virtual disk first needs to be mounted at <mount-point>)
0 Kudos
8 Replies
Highlighted
Expert
Expert

What is "-h" supposed to do? I searched on the web and elsewhere, and found no other mention of the "-h" option.

Could the bug be "typo in man page example"?

0 Kudos
Highlighted
Contributor
Contributor

Yes, it is possible that it is a faulty example that should be removed. I am not in a position to know if that is the case; I can only report the discrepancy between the given example and the program's actual functionality.

I assumed the -h option would specify an ESXi host to connect to, -u would specify a username on that server, and -f a file containing that user's password.

If that's not correct, then the next bug is that I want to convert a vmdk to disk type 6, "thin provisioned virtual disk - ESX 3.x and above". When I attempt to do this, it says:

$ '/Applications/VMware Fusion.app/Contents/Library/vmware-vdiskmanager' -r indisk.vmdk -t 6 outdisk.vmdk 
Converting /dev/disk6 to outdisk.vmdk
VMware Virtual Disk Manager can only convert to ESX thin disks if the destination is remote.
VMware Virtual Disk Manager - build 3272237.

If the program is not supposed to have a -h option, then an explanation is needed for how to supply the remote destination when converting to disk type 6.

0 Kudos
Highlighted
User Moderator
User Moderator

I assumed the -h option would specify an ESXi host to connect to, -u would specify a username on that server, and -f a file containing that user's password.

For details about converting a virtual disk to an ESXi host, see e.g. https://pubs.vmware.com/vsphere-50/topic/com.vmware.ICbase/PDF/vddk_disk_utils.pdf (pages 18 ...20)

If that's not correct, then the next bug is that I want to convert a vmdk to disk type 6, "thin provisioned virtual disk - ESX 3.x and above". ...

Thin provisioning is a VMFS file system feature, i.e. you need to specify the remote ESXi host for the "-t 6" option make it to work.

André

0 Kudos
Highlighted
Contributor
Contributor

Thank you André for that reference. Indeed, that document says:

"For remote <targetdisk> on an ESX/ESXi host, use the -h, -u, and -f options."

and describes those options in the way I hypothesized. Yet those options are declared to be illegal by the version of vmware-vdiskmanager included inside VMware Fusion 8.1.0. That is the bug I am reporting.

0 Kudos
Highlighted
User Moderator
User Moderator

I'm not a MAC user, so I can't reproduce this myself. Anyway, please don't mind me asking whether you ran the command as shown in example 6 with all options (-r, -t 4|6, -h, -u -f) in place?

André

0 Kudos
Highlighted
Contributor
Contributor

Yes, I ran it with all those options, and even tried copying and pasting the example command from the help screen into the terminal verbatim; it continues to say "/Applications/VMware Fusion.app/Contents/Library/vmware-vdiskmanager: illegal option -- h"

0 Kudos
Highlighted
User Moderator
User Moderator

Hi,

You're talking about example 6 after you run vmware-vdiskmanager without command line options?

I'm seeing the same thing here on both Fusion 7.x as well as VMware Workstation 12.x.

The -h option isn't listed in the help as a valid option unless as extra parameter with the -r option, while it might have been so in the past,

For testing I've also tried --h and --host now, same error.

It is possible you might have to use the VDDK instead, but I doubt that there's a mac OS X variant in the VDDK (haven't checked)

--
Wil

| Author of Vimalin. The virtual machine Backup app for VMware Fusion, VMware Workstation and Player |
| More info at vimalin.com | Twitter @wilva
0 Kudos
Highlighted
Immortal
Immortal

Hi ryandesign,

Thanks for raising this issue, and I have reported a bug tracking it.

Best Regards.

Tang

0 Kudos