Quantcast
Channel: VMware Communities : All Content - Virtual Disk Development Kit
Viewing all 947 articles
Browse latest View live

VMDK files that are 2 GB AND sparse AND compressed

$
0
0

Hello everyone,

 

I have studied the VMDK specs over the last few days. I have a bit of a unique use case because we actually want to use VMDK files as the back end for a "normal" (i.e. non-virtual) volume backup application. We chose VMDK because we want these volume backups to be usable by VMWare as virtual disks. We can settle for importable if direct mounting is not possible, but we would like VMware to be able to read the files somehow.

 

To be clear, we intend to write our own code that creates these VMDK files. I.e. we are not limited by what the SDK supports, but we are limited by what the VMware software can read.

 

We need these disks to have the following properties:

 

- split into 2GB files (so that we can store them on most filesystems)

- sparse

- compressed grains

 

The problem I am facing right now is that it ALMOST seems to be possible to do what I need to do within the file format as specified, but there are some problems. In particular when compression is used.

 

According to the spec, compression seems to only be supported for streamOptimized files. But these files cannot apparently be split into 2GB parts (the spec says that "These disks are currently used only in the monolithic form.").

 

But if I ignore this sentence, I could easily create a spec-confirming non-monolithic streamOptimized disk, simply by specifying multiple extents in the descriptor. Is it OK to do this? I.e. could VMware import such a disk?

 

Alternatively I could create a "twoGbMaxExtentSparse" disk and simply set the metaDataMarker and Compressed flags (bits 16 and 17) in the extent header. Would VMware be able to use those (mount or import)?

 

I also found a mention on the web "ACE compressed/encrypted sparse extents", but these do not seem to be described in the spec. From the name it seems that these types of extents would be a better match for my use case. Do they exist? If so, is there a format specification?

 

Any help or pointers would be appreciated.


VIX_E_DISK_OUTOFRANGE - Possible scenarios?

$
0
0

Hi there,

 

I am seeing the  VIX_E_DISK_OUTOFRANGE ("DiskLinkRWv failed : You have requested access to an area of the virtual disk that is out of bounds (17)") error when writing to a disk. This has only happened for one user yet and unfortunately I have no access to that vSphere environment or to the copy of the disk. So I want to ask this as a general question: what are the possible scenarios where I could get the above error message?

 

- obviously, when the virtual disk I created is smaller than the data I want to write. However, the same code ran fine in hundreds of similar tests, so it is not just that simple (I am trying hard to reproduce the issue though)

- disk does not end on VMFS block boundaries? in this case block size is 2 MB and disk is exactly 40 GB (40960 MB)

- can shared data store have an influence?

- vMotion?

- ESX cluster?

- data store (almost) out of disk space?

- snapshots?

- vSphere versions?

- anything else?

 

The mentioned copy was done without CBT and the transfer method was NBD.

 

Thanks in advance,

Eros

How to solve "Fail to load libvixDiskLibVim.so"

$
0
0

When I mount or umount a virtual disk, I have some unhappy message.

It is like this:

 

root@client1:/mnt# vmware-mount -k /root/data/VM33/VM33.vmdk

VixDiskLib: Failed to load libvixDiskLibVim.so : Error = libvixDiskLibVim.so: cannot open shared object file: No such file or directory.

How can I solve this problem?

Thank you very much!

VDDK and IPv6

$
0
0

Does VDDK fully support IPv6 ?

 

The release notes say "The 1.2 release of VDDK has not been tested with VADP and the new IPv6 features of vSphere 4". What does that refer to ?

VixDiskLib_Open VIX_E_FILE_NOT_FOUND for Windows 2008 R2

$
0
0

Hi,

In order to connect to virtual disk of windows server 2008 R2 I use VDDK 1.2.1. In order to connect to virtual disk I have followed guide line from http://www.vmware.com/support/developer/vddk/vddk12_api_programming.pdf and the code is working for every VMs, except for a windows server 2008 R2 after a snapshot is taken with quiesce=true and memory = false. This is strange because with all other VM which support quiesce no problem appears.

 

Windows 2008 R2 is "fresh" installed  and the only program installed is vmwaretools (ESXi 4.1 and vmwaretools are updated). VM Windows 2008 R2 was created with ESXi 4.1 and disk.EnableUUID = true (in order to have an application-consistent snapshot)

 

the code in c# is the following (simplified):

 

morefid is the moref of windows server 2008 R2

 

//Crete Snapshot (quiesce option enabled)

 

VDDKMethods.Connect(host, user, password, morefid, ref connPtr);

string diskfilename="[Storage 2T] Win server 2008 R2/Win server 2008 R2.vmdk";

Wrapper.VixError vixError = Wrapper.VixDiskLib_Open(connPtr, diskfilename, Wrapper.VIXDISKLIB_FLAG_OPEN_READ_ONLY, ref diskPtr);

//Remove Snapshot

 

the VixDiskLib_Open error is the following: VIX_E_FILE_NOT_FOUND
this error is strange, because without quiesce option the code is working correctly.
Furthermore: if the VM already contains a quiesce snapshot, it's not possible to connect to disk, until quiesce snapshot is removed.

 

Taking a snapshot of VM "Win Server 2008 R2" with quiesce=true and memory=false two delta files are created:

-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-rw-------    1 root     root             983552 Jun 14 15:33 Win server 2008 R2-000001-ctk.vmdk
-rw-------    1 root     root           16809984 Jun 14 15:33 Win server 2008 R2-000001-delta.vmdk
-rw-------    1 root     root                416 Jun 14 15:33 Win server 2008 R2-000001.vmdk
-rw-------    1 root     root             983552 Jun 14 15:33 Win server 2008 R2-000002-ctk.vmdk
-rw-------    1 root     root           16809984 Jun 14 15:33 Win server 2008 R2-000002-delta.vmdk

-rw-------    1 root     root                416 Jun 14 15:33 Win server 2008 R2-000002.vmdk
-rw-------    1 root     root         2147483648 Jun 10 15:05 Win server 2008 R2-33bcfcee.vswp
-rw-------    1 root     root              28477 Jun 14 15:33 Win server 2008 R2-Snapshot159.vmsn
-rw-r--r--    1 root     root                139 Jun 14 15:33 Win server 2008 R2-aux.xml
-rw-------    1 root     root             983552 Jun 14 15:05 Win server 2008 R2-ctk.vmdk
-rw-------    1 root     root        16106127360 Jun 14 15:33 Win server 2008 R2-flat.vmdk
-rwx------    1 root     root             169309 Jun 14 15:33 Win server 2008 R2-vss_manifests159.zip
-rw-------    1 root     root               8684 Jun 10 14:07 Win server 2008 R2.nvram
-rw-------    1 root     root                575 Jun  3 13:06 Win server 2008 R2.vmdk
-rw-r--r--    1 root     root                431 Jun 10 10:56 Win server 2008 R2.vmsd
-rwx------    1 root     root               2990 Jun 14 15:33 Win server 2008 R2.vmx
-rw-------    1 root     root                273 Jun 14 15:15 Win server 2008 R2.vmxf

 

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

Before snapshot process no delta files are present. According to vmware support this is "normal" behaviour for quiesce snapshot on Win Server 2008 R2.

 

Thanks for your help!

 

becco

VDDK requires DNS resolving

$
0
0

I have a VDDK based application running on machine A, turning to vCenter B, in order to read a virtual disk for a VM located on host C

VixMntapi_OpenDisks was failing, claiming that the server has refused the connection.

 

Further investigation found that

    - The host was known to the vCenter by its DNS name

    - Machine A's DNS could not resolve C

 

One I fixed A's DNS resolving the problem was fixed.

 

Is this expected ?

Is A required to know how to resolve DNS names of hosts, or is there a way around it ?

vmware-mount.exe is not working in Windows 7 64bit

$
0
0

Hi,

 

I am trying to mount an vmdk files under Windows 7 64bit. I am following a blog http://4sysops.com/archives/free-vmware-diskmount-gui-mount-vmdk-files/

 

I downloaded and installed the virtual disk development kit. I am able to mount my vmdk file successfully in command line and able to view files. But when it is not showing up in windows explorer. Can anybody help me with this?

 

I wanted to transfer some files from a vmdk. I have VMWARE workstation installed.

 

Thanks,

RT

Remote Mount Win2k8 vmdk but size 99mb?

$
0
0

Guys,

 

I downloaded and installed latest VDDK 1.2.1 and managed to remotely mount ESXi VM vmdk as below :

 

  • Windows Server 2008 without SP = Mounted = Drive Browseable = Size is Okay (20GB)
  • Windows Server 2008 SP2 = Mounted = Drive Browseable = Size in ONLY 99MB?

 

Anyone know what causing this? Is it because vddk don't support Windows Server 2008 SP2 vmdk?

 

Thanks


Redistribution problem vddk

$
0
0

Hi,

 

I have created simple application which mount vmdk file and getosinfo with vs2010 and vddk. I am able to getos info on development machine but problem is when  i am running same exe on other machine its successfully open vmdk file but at the time of mounting it is giving error that driver not found.

 

So tried by installing vddk on other machine then its working correct .but for me it is not possible to install vddk on all machine.

Is there any way to solve this problem?

vmware-mount cannot find my virtual machine

$
0
0

Hi,

 

I'm trying to use vmware-mount under a Linux host connecting to a vcenter but always end up with an error telling me :

 

Jul 18 15:49:16.433: VixDiskLibVim: TicketFindVMByInvPath: vmxPath = -BI/Linux/invikrt2-
VixDiskLibVim: TicketFindVMCb failure - VixError = 4000.
Jul 18 15:49:16.539: VixDiskLibVim: TicketLogout
Jul 18 15:49:16.651: LIBFUSE   : Failed to open disk: The virtual machine cannot be found (4000)
Jul 18 15:49:16.651: Fuse initialization failed.
Failed to mount disk '[VMFS_Linux01] invikrt2/invikrt2.vmdk': Cannot open the virtual disk

 

I've read the different posts around this issue, but it seems clear to me that my path are correct. I'm attaching a screenshot of vcenter. My command line is:

 

vmware-mount -v "BI/Linux/invikrt2" -h vcenter01 -u "oliviert" -F pw "[VMFS_Linux01] invikrt2/invikrt2.vmdk" /mnt/tmp

 

Any idea of what I'm doing wrong or how I can debug this?

 

Thanks

vmware-mount under Linux

$
0
0

Hi,

 

I was trying to get some hands on with vmware-mount (shipped as part of VDDK 1.2.1) on SLES-11-SP1-32bit and finding some issues.

 

The following is the command that has been executed

 

vmware-mount -v <DataCenter>/vm/<VM-Name> -h <VC-Host> -u <User-name> -F <PWD-file>   "[DataStore] <Path-to-vmdk>" <mntpoint>

 

When I execute this command for a VM which is shutdown we get the following error messages

 

/dev/loop0 looks like swapspace - not mounted

mount: you must specify the filesystem type

mount: unknown filesystem type 'ntfs-3g'

Failed to mount partition 1 of disk '[DataStore] <Path-to-vmdk>' on '<mntpoint>': The virtual disk does not have any partitions that the host system knows how to mount

 

When the machine is powered on we get the following error messages.

 

Failed to open disk: The file is already in use (70403103916047)

Failed to mount disk '[DataStore] <Path-to-vmdk>' : It is not safe to mount the virtual disk.  It may be attached to a suspended or powered-on VM, or it may be inside a snapshot chain.

 

The machine where the mount command is issued is a SLES-11 32 bit – SP1 machine with kernel version  2.6.32.12 and the guest VM being mounted is a SLES-10, 32-bit

 

Can someone let me know how to get this binary executed successfully.

 

Also what are the supported file systems for the mount operation.

VDDK write failure

$
0
0

Hi,

 

VDDK write over SAN mode is failing with error "Failed to write to Disk One of the parameters supplied is invalid". But the same is working with NBD transport mode.

Observed following errors in hostd log:

[2011-07-14 12:08:09.720 F6421900 trivia 'VersionValidator'] ALLOWED: Host is not licensing-restricted

[2011-07-14 12:08:09.733 F6421900 info 'App'] AdapterServer caught exception: 5d8ace80

 

The ESX server has valid license.

 

Environment:

ESX: 4.1 build-260247

VDDK 1.2.1

 

Please suggest the cause for the error.

 

Thanks

Sachin

Open disk using SAN gets "Unknown error"

$
0
0

 

I am getting an "Unknown error" when trying to open a snapshot virtual disk using SAN (VixDIskLib_Open). The open then falls back to nbdssl which succeeds. I believe I am doing everything that has been recommended in the documentation and this forum including:

 

 

1. Calling VixDiskLib_InitEx and VixDiskLib_ConnectEx and supplying the VDDK library path and a config file.

 

 

2. Passing a snapshot ref and  null as transport mode in the connect as recommended.

 

 

3. Implemented our own logging functions as we are multi-threaded.

 

 

4. Doing all opens/closes (and all other Vddk calls except Read/Write) in a single thread as recommended.

 

 

5. The backup proxy is a physical machine not a VM.

 

 

We are a .NET application and we have implemented wrappers for all the Vddk calls - I believe all this is working correctly.

 

 

Now we also have a VCB implementation, and indeed can switch between VCB and VDDK with a simple change in our GUI. The interesting thing is that the VcbMounter open of the virtual disk over the SAN works, so that implies that the SAN and disk devices are correctly configured and visible to our backup proxy node.

 

 

I am enclosing relevant logs from both the Vddk attempt and VcbMounter attempt to open the virtual disks using the SAN. Is there anything you can think of to try and make the SAN connection work?

 

 

Rich

 

 

 

 

 

VixDiskLib_Init(Ex) parameters clarification

$
0
0

Hello,

 

Could anybody explain majorVersion, minorVersion, and configFile parameters or where can I find detailed description please?

 

1. The version related parameters (majorVersion, minorVersion) could be {1,0} or {1,1} does it mean that vddk 1.2.1 will have {1,2} for proper initialization?

 

2. What is the difference (if any) in behavior of the VDDK when different minorVersion are specified?

Is my assumption right (?): If I specify {1,0} during usage of VDDK 1.2.1 it will expose exact behavior of the VDDK 1.0.

 

3. Can anybody list supported parameters which could be specified in the configFile?

 

Any info would be highly appreciated!

Thank You

Intermittent VIX Error 7 When Reading Disks from ESX

$
0
0

I'm using VDDK to obtain random read-only access to disks on an ESX (through I connect using a vCenter hostname).  Occasionally I receive the following error:

7 – VIX_E_FILE_ERROR
A file access error occurred on the host or guest operating system.

What causes this error?

 

What logs should I look at to track this down?  ESX/vCenter?

 

Thanks!

Mike


VixDiskLib_Open error due to disk lease failure

$
0
0

Hi,

 

VixDiskLib_Open using SAN is failing with following error:-

 

diskLibPlugin: [2011-08-15 14:36:50.343 05052 error 'DiskLibPlugin'] Acquiring disk lease for snapshot-12121[XX_Data] ABCCOMXXVM/ABCCOMXXVM.vmdk failed with vmodl.fault.SystemError.

 

Anybody aware of any possible reasons for this failure?

 

TiA.

NFS error

$
0
0

 

I created an NFS export that is mapped to my ESX host. When I try to create a new folder in the NFS share, ESX says:

 

 

 

 

 

"Call "FileManager.MakeDirectory" for object "ha-nfc-file-manager" on ESX "hostname" failed."

 

 

 

 

 

What does that error mean? I clearly can't make a directory. It isn't mounted read-only. On my NetApp storage array, I have read-write access.

 

 

 

 

 

thanks,

 

 

-h

 

 

vixMntApi on Linux

$
0
0

Hi All,

 

I am trying to use the VDDK Mount API (VDDK-5.0) to mount the file system of Linux VM which is powered on.

The guest Linux VM (SUSE-11 SP1) has 2 disks. The 1st disk contains the swap and OS partition and the 2nd disk contains a volume with EXT-3 file system. I am trying to open the 2nd disk ONLY which contains the ext3 file system.

The following are the set of function calls that I am using after the necessary initialization

 

VixDiskLib_ConnectEx()

-          Able to connect to the 2nd disk in the read only mode

VixMntapi_OpenDisks()

-          Able to open the 2nd disk in the read only Mode

VixMntapi_GetDiskSetInfo()

-          Sucessful.

VixMntapi_GetVolumeHandles()

-          Successful

VixMntapi_MountVolume()

 

However when the VixMntapi_MountVolume() is called with read / write permission I get the following error messages.

 

DiskSet Info - flags 4 (passed - 4), mountPoint /var/run/vmware/fuse/9381386470237378719/flat.

Num Volumes 1

Log:Mounting Partition 1 from disk <username>@<VC>:[<DATASTORE>] <VM-NAME>/<VM_NAME_1>.vmdk

mount: wrong fs type, bad option, bad superblock on /dev/loop0,

       missing codepage or helper program, or other error

       In some cases useful info is found in syslog - try

       dmesg | tail  or so

 

mount: unknown filesystem type 'ntfs-3g'

VixMntapi_MountVolume: Failed to mount partition 1 of disk on '/tmp/vmware-root/9381386470237378719_1': The virtual disk does not have any partitions that the host system knows how to mount.

After mount

The virtual disk does not have any partitions that the host system knows how to mount (24010)

 

When the VixMntapi_MountVolume() is called with read permissions ONLY, I get an error message saying the operation is not permitted.

 

When I run the same program with read / write permissions when the guest linux VM is powered off, then I was able to successfully mount the file system.

 

Is the mount of the file system of the guest Linux VM possible when the guest VM is powered ON?

Any pointers regarding the same would be beneficial.

Broken links to VDDK 5.0 Programmer's Guide

$
0
0

Transport Mode Problem

$
0
0

 

We use CA Arcserve R15 with VDDK, we have an IBM DS series SAN, the backup proxy is an x3650 IBM server with a single fibre connection to the san switches.  My problem is that the transport mode used is inconsistent.  As an example I backed up the same server 10 times which ran in advanced transport mode, over the SAN at about 5.2gb/min.

 

 

Than suddenly it would only use NDB getting about 400mb/min no matter what I did.  Than it started going over the SAN again but with advanced transport mode disabled, getting about 1.2gb/min.  I'm trying to get my testing sorted out so I can put this in production but I'm not having much luck.

 

 

Than when i multiplex the job the first server goes over the SAN, whichever gets going first, than all the remaining servers go over the network - each time.

 

 

Any help or direction would be appreciated - the esx hosts are 4.1, arcserve R15 proxy on W2k8 and vddk 1.2 writing to LTO4.

 

 

Matt

 

 

Viewing all 947 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>