VMware vSphere

 View Only
  • 1.  Mount vmdk , read only, after vmfs-fuse

    Posted Dec 20, 2016 06:54 AM

    Hi guys

    I am trying to recover data from a vmdk (esx6.0)

    its seems to read only

    its a raid 1

    vmfs-fuse /sdd1 /mn/vmfs  = ok

    ls -la

    total 1564763144

    drwxr-xr-x 2 root root           700 Nov 16 23:37 .

    drwxr-xr-t 6 root root          1820 Apr  6  2016 ..

    -rw------- 1 root root       6144512 Nov 17 00:47 Server 2008 Test_1-ctk.vmdk

    -rw------- 1 root root 1610612736000 Nov 17 00:47 Server 2008 Test_1-flat.vmdk

    -rw------- 1 root root           579 Nov 16 23:37 Server 2008 Test_1.vmdk

    vmware-mount -p Server\ 2008\ Test_1-flat.vmdk

    FILE: FileLockCreateEntryDirectory creation failure on '/mnt/vmfs/Server 2008 Test/Server 2008 Test_1-flat.vmdk.lck': Read-only file system

    Failed to get the list of partitions: It is not safe to mount the virtual disk.  It may be in use.

    from the log

    2016-12-20T14:33:48.872+08:00| vmware-mount| I125: Log for VMware Workstation pid=1283 version=12.5.2 build=build-4638234 option=Release

    2016-12-20T14:33:48.872+08:00| vmware-mount| I125: The process is 64-bit.

    2016-12-20T14:33:48.872+08:00| vmware-mount| I125: Host codepage=UTF-8 encoding=UTF-8

    2016-12-20T14:33:48.872+08:00| vmware-mount| I125: Host is Linux 4.8.0-kali1-amd64 Kali GNU/Linux Rolling

    2016-12-20T14:33:48.918+08:00| vmware-mount| I125: OBJLIB-LIB: Objlib initialized.

    2016-12-20T14:33:48.918+08:00| vmware-mount| I125: VixDiskLib: Attempting to locate advanced transport module in "/usr/lib/vmware".

    2016-12-20T14:33:48.918+08:00| vmware-mount| I125: VixDiskLib: Could not load default plugins from /usr/lib/vmware/lib64/libdiskLibPlugin.so: Cannot open library: /usr/lib/vmware/lib64/libdiskLibPlugin.so: cannot open shared object file: No such file or directory.

    2016-12-20T14:33:48.918+08:00| vmware-mount| I125: VixDiskLib: Advanced transport module not loaded.

    2016-12-20T14:33:48.918+08:00| vmware-mount| I125: VixDiskLib: Using transport modes from DiskLib: file:nbdssl:nbd.

    2016-12-20T14:33:48.918+08:00| vmware-mount| I125: VMware VixDiskLib (6.0) Release build-4638234

    2016-12-20T14:33:48.929+08:00| vmware-mount| I125: >>>>>>>>> Starting FuseMount Process [PID: 1283] <<<<<<<<<

    2016-12-20T14:33:48.929+08:00| vmware-mount| I125: UTIL: Change file descriptor limit from soft 1024,hard 4096 to soft 4096,hard 4096.

    2016-12-20T14:33:48.929+08:00| vmware-mount| I125: --- Mounting Virtual Disk: Server 2008 Test_1-flat.vmdk ---

    2016-12-20T14:33:48.931+08:00| vmware-mount| W115: FILE: FileLockCreateEntryDirectory creation failure on '/mnt/vmfs/Server 2008 Test/Server 2008 Test_1-flat.vmdk.lck': Read-only file system

    2016-12-20T14:33:48.931+08:00| vmware-mount| I125: Error: File access error(30): 'Server 2008 Test_1-flat.vmdk'

    2016-12-20T14:33:48.931+08:00| vmware-mount| I125: Error: Failed to acquire lock on 'Server 2008 Test_1-flat.vmdk'

    2016-12-20T14:33:48.931+08:00| vmware-mount| W115: Failed to get the list of partitions: It is not safe to mount the virtual disk.  It may be in use.

    2016-12-20T14:33:48.931+08:00| vmware-mount| I125: VixDiskLib: VixDiskLib_Exit: Unmatched Init calls so far: 1.

    itried chmod +x

    ch:smileyhappy:mod +755

    I dont have another drive to copy it to, since its 1.5TB

    is there another way than , creating a esxi server ?

    thanks you

    Edit , oviously mounting the vmdk to a vm doesnt work either

    --------------------

    root@DESK:~# vmfs-fuse /dev/sdd1 /mnt/vmfs

    root@DESK:~# losetup /dev/loop0 /mn^Cskimage-flat.vmdk

    root@DESK:~# ^C

    root@DESK:~# cat /mnt/vmfs/Server\ 2008\ Test/Server\ 2008\ Test_1-flat.vmdk

    cat: '/mnt/vmfs/Server 2008 Test/Server 2008 Test_1-flat.vmdk': Input/output error

    root@DESK:~# losetup /dev/loop0 /mnt/vmfs/Server\ 2008\ Test/Server\ 2008\ Test_1-flat.vmdk

    root@DESK:~# fdisk -l /dev/loop0

    fdisk: cannot open /dev/loop0: Input/output error



  • 2.  RE: Mount vmdk , read only, after vmfs-fuse

    Posted Dec 20, 2016 08:46 PM

    Hi
    vmfs-fuse mounts readonly - so dont be surprised.
    Which version of vmfs-tools do you use ? - all the versions installable via apt-get or yum will not handle vmdks larger than 256gb.

    If you are seriously interested in reading and writing VMFS from Linux you should watch how I handle those problems.
    Feel free to call me via skype - I have solutions for most of the roadblocks you mentioned.
    Also have a look at the iso I use for this tasks :
    http://sanbarrow.com/livecds/moa64-nogui/MOA64-nogui-incl-src-111014-efi.iso


    To evaluate the partitiontable of a flat.vmdk I use
    sgdisk -p flat.vmdk > result.txt.
    It might surprise you that I do not use for example vmware-mount at all - there are superior workarounds.

    Sorry - dont have much time at the moment - lets have a chat soon

    Ulli



  • 3.  RE: Mount vmdk , read only, after vmfs-fuse

    Posted Dec 29, 2016 09:55 AM

    Thanks for the help. i tried to use the iso , but counot make it work

    I end up using ufs explorer pro version 5.20 (previous v didnot work)