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

Maximum number of changeId for CBT

$
0
0

Hello,

 

I wrote a program that by using CBT will give me the amount of changes on a particular VM. My concern is that if this program will introduce problems to any backup solution that uses CBT to enable incremental backups, like Veeam or vRanger on the same VM.

 

Let's say I need a good resolution from my  CBT script, and through the day I take 24 data points; now if my backup solution generates a backup job every 2 or 3 days, how can I be sure that it can still use that "old" changeId from 2 or 3 days ago?

 

In other words, how many points in time (changeId's) can I have and be able to call QueryChangedDiskAreas to get the changed blocks.

 

Any help is highly appreciated,

 

 

Juan Aristizabal.


Vddk 5 ESX 5

$
0
0

Is it correct that you cant connect with vddk5 to esx5?

Looks like you can connect vddk5 to esx4 and vddk1.2.1 to esx5?

 

I do not get any relevant error up in any logfile either?

 

The vddk 5 documentation mentions that vSphere API fails to ESX5 which is wrong, as this just applies to vddk5 after all I have seen so long?

 

Tos2k

VixDiskLib_Clone() Error

$
0
0

Hi,

 

I am working in a project using VDDK API. I have been able to Connect, Open, Read and Write to VM virtual disks using VixDiskLib. But I have a problem using VixDiskLib_Clone() function to copy a vdisk. I have defined this function:

 

public static bool Clone(vixDiskSourceVixDisk, string SourceDiskPath, vixDisk TargetVixDisk, string TargetDiskPath, VixDiskLibProgressFunc ProgressFunc)

{

 

VixDiskLibCreateParams CreateParams = new VixDiskLibCreateParams();

 

CreateParams.adapterType = VixDiskLibAdapterType.VIXDISKLIB_ADAPTER_SCSI_LSILOGIC;

CreateParams.capacity = 20 * 2048;

CreateParams.diskType = VixDiskLibDiskType.VIXDISKLIB_DISK_MONOLITHIC_SPARSE;

CreateParams.hwVersion = vixDiskLib.VIXDISKLIB_HWVERSION_WORKSTATION_6;

 

IntPtr clientData = (IntPtr) null;

ulong ulStatus;

 

ulStatus = vixDiskLib.Clone(TargetVixDisk.VixConnHandle, TargetDiskPath, SourceVixDisk.VixConnHandle, SourceDiskPath, out CreateParams, ProgressFunc, clientData, true);

 

if (ulStatus != 0)

{

string msg = vixDisk.GetError(ulStatus);

return false;

}

return true;

}

 

If I define Target Server as blank "" to copy to local and call Clone() I get error: "invalid parameter was supplied"

 

TargetVmdkPath = @"C:\Users\Alberto\Desktop\vddk\test.vmdk";

TargetServer = "";

TargetVmxPath = "";

TargetDatacenter = "";

TargetDatastore = "";

TargetUser = "";

TargetPass= "";

TargetPort = 0;

 

If I define Target as ESX I can Connect,Open, Read.. disks in that ESX with Connect(), Open(), Read(). But when I call Clone() I get error: "Cannot connect to host" (17179887184) and I get this log in ESX hostd.log:

 

VixDiskLib_Clone() Error Event 155 : User root@127.0.0.1 logged in

VixDiskLib_Clone() Error Key esxFull, not found

VixDiskLib_Clone() Error Key backup, not found

VixDiskLib_Clone() Error FormatField: Invalid (vim.LicenseManager.DiagnosticInfo.key)

VixDiskLib_Clone() Error Task Created : haTask--vim.SearchIndex.findByInventoryPath-158510209

VixDiskLib_Clone() Error Task Completed : haTask--vim.SearchIndex.findByInventoryPath-158510209

VixDiskLib_Clone() Error Task Created : haTask--vim.SearchIndex.findByDatastorePath-158510210

VixDiskLib_Clone() Error Task Completed : haTask--vim.SearchIndex.findByDatastorePath-158510210

VixDiskLib_Clone() Error Task Created : haTask--vim.NfcService.randomAccessOpen-158510212

VixDiskLib_Clone() Error Task Completed : haTask--vim.NfcService.randomAccessOpen-158510212

VixDiskLib_Clone() Error Event 156 : User root logged out

VixDiskLib_Clone() Error Activation VixDiskLib_Clone() Error : Invoke done VixDiskLib_Clone() Error on vmodl.query.PropertyCollector:ha-property-collector

VixDiskLib_Clone() Error Throw vim.fault.NotAuthenticated

VixDiskLib_Clone() Error PROXY connection to NFC(useSSL=0): found session ticket:[N9VimShared15NfcTicketByPathE:0xa1240b4]

VixDiskLib_Clone() ErrorVixDiskLib_Clone() Error NfcNetTcpGetSockFd: sockFd = 0, sSockFd = 53

VixDiskLib_Clone() ErrorVixDiskLib_Clone() Error NfcServerLoop: sockFd ready for READ

VixDiskLib_Clone() ErrorVixDiskLib_Clone() Error NfcServerLoop: Received session complete

VixDiskLib_Clone() Error Result:

(vim.fault.NotAuthenticated) {

   dynamicType = ,

   object = 'vmodl.query.PropertyCollector:ha-property-collector',

   privilegeId = "System.View",

   msg = ""

}

VixDiskLib_Clone() Error Failed to send response to the client: Broken pipe

 

 

I have imported the function in C# as:

 

 

public static extern System.UInt64 Clone(IntPtr dstConnection, string dstPath, IntPtr srcConnection, string srcPath, out VixDiskLibCreateParams vixCreateParams, VixDiskLibProgressFunc progressFunc, IntPtr progressCallbackData, bool overWrite);

 

 

Regards,

Alberto

VDDK 1.2.1, ESX 5 - hotadd not supported?

$
0
0

Hi!

 

I get the following error:

 

 

using transport hotadd failed : Failed to hot-add SCSI targets: This operation is not supported

 

VMware ESXi 5.0.0 build-474610

 

 

Any ideas? Why is that special, why is it unsupported?

 

 

Tos2k

How to create dynamic vmdk file?

$
0
0

Hi,

 

I want to create dynamic VMDK file.I am using VixDiskLib_Create()  API of VDDK file.But i didn't found any option for dynamic disk.

How to create?

please help me

ESX disk creation with VixDiskLib_Create()

$
0
0

Hello everybody.

 

I have little question: How should I use this function to create virtual disk on ESX server?

What machine I have to specify in connection parameters? What exactly path to the disk have to be?

 

I have machine with moref 256 registered. It has path "[datastore1] Ubuntu/Ubuntu.vmx"

 

All goes fine, but function  VixDiskLib_Create() return Error code 3 with text "One of the parameters was invalid".

 

My code:

char tempStr[MAX_PATH];
VixError vixError;

 

StringCbCopy(VixConnectParams.serverName,24,"192.168.1.240");
StringCbCopy(VixConnectParams.creds.uid.userName,21,"login");
StringCbCopy(VixConnectParams.creds.uid.password,128,"password");
VixConnectParams.port = 902;
VixConnectParams.credType=VIXDISKLIB_CRED_UID;

 

StringCbCopy(tempStr,MAX_PATH,"moref=256");

VixConnectParams.vmxSpec=tempStr;

 

vixError= VixDiskLib_InitEx(1,
                                         0,
                                         NULL,
                                         NULL,
                                         NULL,
                                         NULL,
                                         NULL);
if(vixError!=VIX_OK)
      return false;

 

vixError= VixDiskLib_ConnectEx(&VixConnectParams,
                                                   false,
                                                   NULL,
                                                   NULL,
                                                   &VixConnection);
if(vixError!=VIX_OK)
      return false;

 

VixDiskLibCreateParams createParams;

 

createParams.adapterType=VIXDISKLIB_ADAPTER_SCSI_LSILOGIC;
createParams.capacity=536870912;
createParams.diskType=VIXDISKLIB_DISK_MONOLITHIC_SPARSE;
createParams.hwVersion=VIXDISKLIB_HWVERSION_CURRENT;

 

//opening disk
vixError=VixDiskLib_Create(VixConnection,
                                         "[datastore1] Ubuntu/test.vmdk",
                                         &createParams,
                                         NULL,
                                         NULL);
if(vixError!=VIX_OK)
{
     char *r=VixDiskLib_GetErrorText(vixError,NULL);
      return false;
}

Extremely slow write times with vmware-mount and NTFS

$
0
0

Hello all,

 

I have a weird problem that I can't seem to solve. I am using vmware-mount on 64-bit Ubuntu 11.10 to mount remote disks that are on an ESXi 4.1 hypervisor. I mount the disk as a flat representation and mount specific partitions manually via loopback devices.

 

When mounting an ext4 partition on the remote disk, everything works great. When mounting an NTFS partition, there appears to be a serious write problem. Mounting and then unmounting is quick; mounting, writing to the disk and unmounting takes about 30 seconds per MB written. Specifically it's the unmount that takes a long time (I assume because it's flushing all the writes and won't complete the unmount until they're done).

 

I copied the remote disk directly to my Ubuntu machine's local filesystem, and ran the same commands. This effectively resolves the write delay, so it seems to be something to do with the way vmware-mount reads and writes to remote disks with NTFS partitions.

 

Is there any obvious solution to this problem, other than using a different NFS system on the hypervisor itself to make the VMDKs available to other machines? I'm able to provide any more information that might help solve the write problem.

can convert a vmdk to be stored on ESXi

$
0
0

How do I use vmware-vdiskmanager.exe to convert an existing vmdk on a Windows host to a vmdk stored on ESXi ?

 

When ever I try it looks like it is starting but then I get error 0x4650 - and cant connect to the host.

 

sample command that fails:

 

E:\Program Files\VMware\VMware Virtual Disk Development Kit\bin>vmware-vdiskmanager.exe -r r:\ws8\2k8r2core-efi\2k8r2core-efi.vmdk -t 6 -h 192.168.1.8 -u root -f pfile.txt "[2tb]/test/n.vmdk"

Creating disk '[2tb]/test/n.vmdk'
SSLVerifyIsEnabled: failed to open the product registry key. Falling back to default behavior: verification off. LastError = 0
SSL_VerifyX509: Certificate verification is disabled, so connection will proceed despite the error
SSLVerifyIsEnabled: failed to open the product registry key. Falling back to default behavior: verification off. LastError = 0
SSL_VerifyX509: Certificate verification is disabled, so connection will proceed despite the error
SSLVerifyIsEnabled: failed to open the product registry key. Falling back to default behavior: verification off. LastError = 0
SSL_VerifyX509: Certificate verification is disabled, so connection will proceed despite the error
[NFC ERROR] NfcNewAuthdConnectionEx: Failed to connect to peer. Error: Login (username/password) incorrect
VixDiskLib: NFC Error during user connect: Login (username/password) incorrectFailed to convert disk: Cannot connect to the host (0x4650).

 

I create the passowrdfile like this

 

echo mysecretpassword > pfile.txt


Unable to use VDDK 5.0 API and VIX 1.11 API in the same application

$
0
0

I am working on an application that requires the use of both the VDDK *and* VIX APIs in the same Linux 64-bit client application.

 

It appears that each distribution comes with its own (somewhat overlapping) set of libraries that the main API libs (libvixDiskLib.so and libvix.so) are dependent on.  And my problem is that I can't get both APIs to work using the same set of shared, dependent libs.  They work grest when paired with the libs they came with, but not when I try to combine them (which you *have* to do since they are dynamically shared).

 

Since the VIX release is more recent, I tried using those libs with the VDDK (libvixDiskLib.so).  This results in a crash when trying to open a VMDK.

 

Conversely, if I try to use the (older) VDDK libs with VIX (libvix.so), the library cannot be loaded because of an unresolved symbol in libgvmomi.

 

Is there a way to use both of these APIs from the same application?

 

It would seem to me that we need a release of the VDDK lib that will work with the dependent libs that come with the latest VIX distribution.

 

Or, is there another way?

 

The VDDK libs I am using come from the latest, 5.0, distribution:

 

-rw-r--r--  1 dev dev  1555256 Jun 10  2011 libcrypto.so.0.9.8
-rw-r--r--  1 dev dev   322272 Jun 10  2011 libcurl.so.4
-rw-r--r--  1 dev dev   986352 Jun 10  2011 libglib-2.0.so.0
-rw-r--r--  1 dev dev   273464 Jun 10  2011 libgobject-2.0.so.0
-rw-r--r--  1 dev dev    17768 Jun 10  2011 libgthread-2.0.so.0
-rw-r--r--  1 dev dev  5993808 Jun 10  2011 libgvmomi.so.0
-rw-r--r--  1 dev dev   325912 Jun 10  2011 libssl.so.0.9.8
-rw-r--r--  1 dev dev 71369496 Jun 10  2011 libtypes.so
lrwxrwxrwx  1 dev dev       18 Feb 15 12:33 libvixDiskLib.so -> libvixDiskLib.so.5
lrwxrwxrwx  1 dev dev       22 Feb 15 12:33 libvixDiskLib.so.5 -> libvixDiskLib.so.5.0.0
-rw-r--r--  1 dev dev  1719744 Jun 10  2011 libvixDiskLib.so.5.0.0
lrwxrwxrwx  1 dev dev       21 Feb 15 12:33 libvixDiskLibVim.so -> libvixDiskLibVim.so.5
lrwxrwxrwx  1 dev dev       25 Feb 15 12:33 libvixDiskLibVim.so.5 -> libvixDiskLibVim.so.5.0.0
-rw-r--r--  1 dev dev   156216 Jun 10  2011 libvixDiskLibVim.so.5.0.0
lrwxrwxrwx  1 dev dev       17 Feb 15 12:33 libvixMntapi.so -> libvixMntapi.so.1
lrwxrwxrwx  1 dev dev       21 Feb 15 12:33 libvixMntapi.so.1 -> libvixMntapi.so.1.1.0
-rw-r--r--  1 dev dev  1954064 Jun 10  2011 libvixMntapi.so.1.1.0
-rw-r--r--  1 dev dev  7051120 Jun 10  2011 libvmacore.so
-rw-r--r--  1 dev dev  5602488 Jun 10  2011 libvmomi.so

 

The VIX libs I am using come from the latest, 1.11, distribution (version for Workstation-8.0.0-and-vSphere-5.0.0):

 

-rw-r--r-- 1 root root 1767620 Feb  9 12:56 libcrypto.so.0

-rw-r--r-- 1 root root 1767620 Feb  9 12:56 libcrypto.so.0.9.8

-rw-r--r-- 1 root root  322272 Feb  9 12:56 libcurl.so.4

-rw-r--r-- 1 root root  322272 Feb  9 12:56 libcurl.so.4.1.1

-rw-r--r-- 1 root root  986352 Feb  9 12:56 libglib-2.0.so.0

-rw-r--r-- 1 root root  986352 Feb  9 12:56 libglib-2.0.so.0.2400.2

-rw-r--r-- 1 root root   12520 Feb  9 12:56 libgmodule-2.0.so.0

-rw-r--r-- 1 root root   12520 Feb  9 12:56 libgmodule-2.0.so.0.2400.2

-rw-r--r-- 1 root root  273464 Feb  9 12:56 libgobject-2.0.so.0

-rw-r--r-- 1 root root  273464 Feb  9 12:56 libgobject-2.0.so.0.2400.2

-rw-r--r-- 1 root root   17864 Feb  9 12:56 libgthread-2.0.so.0

-rw-r--r-- 1 root root   17864 Feb  9 12:56 libgthread-2.0.so.0.2400.2

-rw-r--r-- 1 root root 7478928 Feb  9 12:56 libgvmomi.so.0

-rw-r--r-- 1 root root  365066 Feb  9 12:56 libssl.so.0

-rw-r--r-- 1 root root  365066 Feb  9 12:56 libssl.so.0.9.8

-rw-r--r-- 1 root root 6007232 Feb  9 12:56 libvix.so

-rw-r--r-- 1 root root 1291560 Feb  9 12:56 libxml2.so.2

-rw-r--r-- 1 root root 1291560 Feb  9 12:56 libxml2.so.2.6.26

-rw-r--r-- 1 root root   90821 Feb  9 12:56 libz.so.1

 

THANKS!

scan physical drives

$
0
0

I would like to create an application to do read physical drives, LUNs to be exact. using block size reads.

 

what are my options to develop such an application ? I saw VDDK offers only VM disks reads.

 

perhaps there is an sdk to perform such reads from within the ESXi host itself ?

 

thanks

Felix

non-blocksized read() returns EINVAL on snapshot when VM is running

$
0
0

Hi,

 

Not sure if this is the right forum, but i hope it is.

 

I am writing an application that is designed to run on a ESXi5 server. It makes a snapshot of a VM and then opens the base -flat.vmdk file for reading.

 

The problem i have is the following:

When the VM is running the read()'s have to be in a multiple of 512 bytes, else read() returns a EINVAL. When the VM is not running, it is no problem to read even a single byte.

 

Can someone explain why the behaviour depends on if the VM is running or not?

 

And is there a way to solve this problem, other then adding a buffering layer that makes all read()'s multiples of 512 bytes.

 

Thanks in advance,

Remco Hosman

Problem building sample code

$
0
0

Hi!

I did install the vddk component in my ubuntu64.

I did try the compile.

I did obtain a lot errors like "vixDiskLibSampl.cpp:(.text+0x358): undefined reference to `VixDiskLib_InitEx'"

and similar.

The pkg-config --cflags --libs vix-disklib returns a valid values (the .h and .so are in the disk).

Can any help me?

 

TIA

jorge infante

rosario - santa fe - argentina

hotadd from an Ubuntu VM?

$
0
0

Hi -

 

I've been trying to get VDDK hotadd working from an Ubuntu machine (currently trying from 10.10, but so far, no luck on any Ubuntu-based machine).

 

Using the same code and environment, hotadd works fine if I use an RHEL 5.5 machine.

 

The Open call gets to the point where I can even see the hot-added disk show up in the vSphere GUI on the Ubuntu virtual machine I'm trying to add it to, but eventually fails after VDDK prints "Get new device attempt X failed" (X goes from 0 to 9 with about 10 seconds between each attempt).

 

If I compare the VDDK output to that of the working RHEL setup, they are almost identical until the point where I start seeing the "Get new device attempt X failed" messages.  The end error code I get is the "You do not have access rights to this file".   I'm using VDDK 1.2.1.

 

Anyone ever tried something like this?

 

Attached the full VDDK output with logging turned up to the highest level that I know of at least.  (The output includes everything from the InitEx, ConnectEx, and Open calls.)

 

Some things I've tried:

1 - both installing or not installing vmware-tools on the VM I'm attempting to hotadd from

2 - using the libexpat that comes with the install, using the libexpat that comes with vmware tools, compiling from source and using libexpat v1.95.8

 

Thanks in advance for any ideas or help.

 

- Jenni

Mount vmdk as a folder on Windows

$
0
0

Hello! I use vddk v5.0 for mounting the partitions from vmdk as drives on Windows (using DefineDosDevice function). And I have the question - is there any way to mount vmdk partitions as a folder? Like SetVolumeMountPoint does (but it works only with volume guid pathes, not symbolic links like DefineDosDevice)

vmware-mount: The virtual machine cannot be found

$
0
0

Hello,

I have a vmware datacenter and i have try to mount a disk from a source linux machine (vpnssllog) to another linux machine (webapplnx) the OS version on this machines are the same.

 

i create a scripts and i run it:

 

root@webapplnx:~$ vi vmMount.sh

#!/bin/bash
export LD_LIBRARY_PATH="/usr/lib/vmware-vix-disklib/lib64:$LD_LIBRARY_PATH"
host="vceprdwin.corp.scmgroup.com"
user="administrator"
passwdfile="/root/vmpwd.txt"
part_no="0"
mount_dir="/mnt/xxx"
img_path="[rimini_prod_vmfs_cml3850_03] vpnssllog/vpnssllog.vmdk"
inv_path="SCM Group Rimini\vm\webapplnx"
vmware-mount -v "${inv_path}" -u "${user}" -h "${host}" -F "${passwdfile}" "${img_path}" "${part_no}" "${mount_dir}"
root@webapplnx:~$

 

root@webapplnx:~$ ./vmMount.sh
Failed to open disk: The virtual machine cannot be found (4000)
Failed to mount disk '[rimini_prod_vmfs_cml3850_03] vpnssllog/vpnssllog.vmdk': Cannot open the virtual disk
root@webapplnx:~$

 

 

I take inv_path from the MOB (name field) and img_path from Edit settings of the virtual machine.

From the log i take this messages:

 

 

VixDiskLib: config options: libdir '/usr/lib/vmware', tmpDir '/tmp/vmware-root'.

VixDiskLib: Attempting to locate advanced transport module in "/usr/lib/vmware/plugins64".

VixDiskLib: Could not load default plugins from /usr/lib/vmware/plugins64/libdiskLibPlugin.so: Cannot open library: /usr/lib/vmware/plugins64/libdiskLibPlugin.so: cannot open shared object file: No such file or directory.

DISKLIB-PLUGIN : Not loading plugin /usr/lib/vmware/plugins64: Not a shared library.

VixDiskLib: Transport modes available: file:nbdssl:nbd.

VixDiskLib: Advanced transport module not loaded.

VMware VixDiskLib (5.0) Release build-427917

>>>>>>>>> Starting FuseMount Process [PID: 3616] <<<<<<<<<

UTIL: Change file descriptor limit from soft 1024,hard 1024 to soft 2048,hard 2048.

--- Mounting Virtual Disk: [rimini_prod_vmfs_cml3850_03] vpnssllog/vpnssllog.vmdk ---

Current user owns '[rimini_prod_vmfs_cml3850_03] vpnssllog/vpnssllog.vmdk'. Allowing mount.

Disk flat file mounted under /var/run/vmware/fuse/7935656355595286143

LIBFUSE   :Opening disk - vmSpec -vmPath=SCM Group Rimini\vm\webapplnx-, server -vceprdwin.corp.scmgroup.com-, disk -[rimini_prod_vmfs_cml3850_03] vpnssllog/vpnssllog.vmdk-

VixDiskLibVimResolveHostName: Resolving IP address for hostname vceprdwin.corp.scmgroup.com.

VixDiskLibVimResolveHostName: Resolved to 10.64.1.30.

VixDiskLibVim: VixDiskLibVimLogin

VixDiskLibVim: TicketFindVMByInvPath: vmxPath = -SCM Group Rimini\vm\webapplnx-

VixDiskLibVim: TicketFindVMCb failure - VixError = 4000.

VixDiskLibVim: VixDiskLibVimLogout

LIBFUSE   : Failed to open disk: The virtual machine cannot be found (4000)

Fuse initialization failed.

Flat file '/var/run/vmware/fuse/7935656355595286143/flat' did not appear in the time limit.

Maximum symlink level is 7

Cannot link target dir (null): Bad address

Failed to mount disk '[rimini_prod_vmfs_cml3850_03] vpnssllog/vpnssllog.vmdk': Cannot open the virtual disk

VixDiskLib: VixDiskLib_Exit called. Unmatched Init calls so far: 1.

 

 

Please Help me !!!


Arcserve R16SP1 exclude vmdk and inventory power off vm

$
0
0

Hello,
I have the misfortune of having to configure arcserve R16 SP1 virtual machine for backup.
I have two questions about the product:
- Is there a way around the problem of the machines off, because I did not have the resources for all switched on simultaneously to the inventory.
- Is there no way to not have a backup vmdk to a VM? Example only saved the C: and not D:

 

Bests regards

vmdk mount error within Win7 x64 (running on ESXi)

$
0
0

Hello,

 

I have a Windows 7 x64 which is running on a VMware ESXi 5. I tried to run virtual machine within this windows with a VMware Player. This is working. My problem is when I try to mount the virtual disk within this Win7 with the Virtual Disk Development Kit (VMware-vix-disklib-5.0.0-614080.i386.exe). This is the log:

 

Apr 17 13:24:14.691: Using system libcrypto, version 90811F

Apr 17 13:24:14.785: DISKLIB-DSCPTR: Failed to read descriptor: Invalid extentLine '"MS-DOS-s001.vmdk"' for encoding windows-1252.
Apr 17 13:24:14.785: DISKLIB-DSCPTR: Failed to parse descriptor file in normal mode:
Apr 17 13:24:14.785: DISKLIB-LINK  : "C:\VMware\MS-DOS.vmdk" : failed to open (Disk encoding error). 
Apr 17 13:24:14.785: DISKLIB-CHAIN : "C:\VMware\MS-DOS.vmdk" : failed to open (Disk encoding error).
Apr 17 13:24:14.785: DISKLIB-LIB   : Failed to open 'C:\VMware\MS-DOS.vmdk' with flags 0x11 Disk encoding error (61).
Apr 17 13:24:14.785: SNAPSHOT: IsDiskModifySafe: Scanning directory of file C:\VMware\MS-DOS.vmdk for vmx files.
Apr 17 13:24:14.785: baseDir = 'C:\VMware\', vmx file = 'DOS.vmx'
Apr 17 13:24:14.785: SNAPSHOT: FindDiskInConfig: Could not load the dictionary file 'C:\VMware\DOS.vmx'.
Apr 17 13:24:14.785: SNAPSHOT: AnalyzeSnapshotTree: Search start:      'C:\VMware\DOS.vmx', baseDiskOnly [ ]
Apr 17 13:24:14.785: SNAPSHOT: SnapshotConfigInfoRead: Unable to load dict from 'C:\VMware\DOS.vmx'.
Apr 17 13:24:14.785: SNAPSHOT: SnapshotConfigInfoRead failed for file 'C:\VMware\DOS.vmx': Dictionary problem (6)
Apr 17 13:24:14.785: Warning: Apr 17 13:24:14.785: Failed to analyze snapshot chain 'C:\VMware\DOS.vmx'.
Will not be able to make an informed decision based on partial information.
Apr 17 13:24:14.785: Error analyzing 'C:\VMware\DOS.vmx'. Snapshot error: 6, legacySuccess: 1, numStates: 0
Apr 17 13:24:14.785: VMware-mount cannot mount this virtual disk. Make sure it is the latest snapshot and does not belong to a suspended VM. Check the logfile for more details.

Errorcode = -2.
I tried to comment the ddb.encoding line in the vmdk file but than I got another error:
Apr 17 13:36:49.581: Using system libcrypto, version 90811F
Apr 17 13:36:49.675: SNAPSHOT: IsDiskModifySafe: Scanning directory of file C:\VMware\MS-DOS.vmdk for vmx files.
Apr 17 13:36:49.675: baseDir = 'C:\VMware\', vmx file = 'DOS.vmx'
Apr 17 13:36:49.675: SNAPSHOT: FindDiskInConfig: Could not load the dictionary file 'C:\VMware\DOS.vmx'.
Apr 17 13:36:49.675: SNAPSHOT: AnalyzeSnapshotTree: Search start:      'C:\VMware\DOS.vmx', baseDiskOnly [ ]
Apr 17 13:36:49.675: SNAPSHOT: SnapshotConfigInfoRead: Unable to load dict from 'C:\VMware\DOS.vmx'.
Apr 17 13:36:49.675: SNAPSHOT: SnapshotConfigInfoRead failed for file 'C:\VMware\DOS.vmx': Dictionary problem (6)
Apr 17 13:36:49.675: Warning: Apr 17 13:36:49.675: Failed to analyze snapshot chain 'C:\VMware\DOS.vmx'.
Will not be able to make an informed decision based on partial information.
Apr 17 13:36:49.675: Error analyzing 'C:\VMware\DOS.vmx'. Snapshot error: 6, legacySuccess: 1, numStates: 0
Apr 17 13:36:49.675: VMware-mount cannot mount this virtual disk. Make sure it is the latest snapshot and does not belong to a suspended VM. Check the logfile for more details.

Errorcode = -2.
As I mentioned earlier the I can run the virtual machine with the VMware Player with any error and I can mount the disk from the VMware Player GUI as well. The virtual machine stopped as Shutdown and not suspended.
Because I need a command line interface for this vmdk mounting I have to find a solution for this.
I tried to copy the vmdk into a real machine (which is not running on the ESXi) and I could mount that virtual disk file.
Any idea what can be the problem?

Virtual Disk Development Kit (VDDK) Redistribution Information

$
0
0

Distributable Code List

 

vSphere Product Name

Distributable Code

Directories Containing   Modifiable Code

VMware Virtual Disk Development Kit

The files that can be extracted for   distribution from VDDK.EXE and TAR.GZ are as follows

 

Microsoft.VC80.DebugCRT.manifest

diskLibPlugin.dll

glib-2.0.dll

gobject-2.0.dll

gthread-2.0.dll

gvmomi.dll

iconv.dll

iconvd.dll

intl.dll

libcurl.dll

libeay32.dll

liblber.dll

libldap.dll

libldap_r.dll

libxml2.dll

msvcp71.dll

msvcp71d.dll

msvcr71.dll

msvcr71d.dll

msvcr80d.dll

ssleay32.dll

sysimgbase.dll

types.dll

vixDiskLib.dll

vixDiskLibVim.dll

vixMntapi.dll

vmacore.dll

vmomi.dll

vmware-mount.exe

vmware-vdiskmanager.exe

zlib1.dll

libcrypto.so.0.9.8

libssl.so.0.9.8

vmware-mount

vmware-uninstall-vix-disklib.pl

vmware-vdiskmanager

 

libcrypto.so.0.9.8

libgobject-2.0.so.0

libvixDiskLib.so     

libvixDiskLibVim.so.5.1.0

libvmomi.so

libcurl.so.4     

libgthread-2.0.so.0

libvixDiskLib.so.5  

libvixMntapi.so

libdiskLibPlugin.so

libgvmomi.so.0   

libvixDiskLib.so.5.1.0

libvixMntapi.so.1

libglib-2.0.so.0  

libssl.so.0.9.8   

libvixDiskLibVim.so 

libvixMntapi.so.1.1.0

libgmodule-2.0.so.0

libtypes.so      

libvixDiskLibVim.so.5

libvmacore.so

vmware-mount

vmware-vdiskmanager

Windows: c:\Program   Files\VMware\VMware Virtual Disk Development Kit\doc\sample

 

Linux:   /usr/share/doc/vmware-vix-disklib/samples/diskLib

Connection/login problems

$
0
0

I'm playing around with VixDiskLib_Clone and VixDiskLib_Read for creating a simple backup application with CBT. My program works if I connect as user root, but if I create a new service account (e.g. 'backup') each call to VixDiskLib_Open fails with the following output:

 

12-04-27 22:12:50 [10        ] DEBUG CnxConnectAuthd: Returning false because CnxAuthdProtoAuthenticate failed
12-04-27 22:12:50 [10        ] DEBUG Cnx_Connect: Returning false because CnxConnectAuthd failed
12-04-27 22:12:50 [10        ] DEBUG Cnx_Connect: Error message: Login (username/password) incorrect
12-04-27 22:12:50 [10        ] DEBUG [NFC ERROR] NfcNewAuthdConnectionEx: Failed to connect to peer. Error: Login (username/password) incorrect
12-04-27 22:12:50 [10        ] DEBUG NBD_ClientOpen: Couldn't connect to xxxxxx:902 Login (username/password) incorrect

 

This only applies for the VixDiskLib connection. Calls to the web service API succeed with my service account 'backup'.

 

This is how I try to connect:

 

VixDiskLibConnectParams params = {0};

params.serverName = "esxihost"
params.creds.uid.userName = "backup";
params.creds.uid.password = "somesecret";
params.credType = VIXDISKLIB_CRED_UID;
params.port = 902;

 

VixDiskLibConnection conn = {0};
VixError res = VixDiskLib_Connect(&params, &conn);
CHECK_AND_THROW(res);

 

This connect stuff succeeds every time (also with account 'backup'). But subsequent calls to VixDiskLib_Open fail with the upper error message. I created the 'backup' service account with the vSphere client and added Administrator permissions to this account for the ESXi host context.

 

Once more:

- the code works if I use the root credentials of the ESXi host

- I can connect to the web service APIs with my 'backup' service account, but not via VixDiskLib_Connect/VixDiskLib_Open

- another ESXi host with same version (4.1.0, 381591), the same program and the same 'backup' service account also works

 

Any hints what's wrong or how I could figure out why this fails? vmware_hostd.log did not reveal any more useful information...

Reading only used blocks

$
0
0

A call to VixDiskLib_Clone allows to create a thin provisioned disk. If I loop over the disk via VixDiskLib_Read I also back get unused sectors. If I use the vStorage call QueryChangedDiskAreas with "*" this works but only for disk on vmfs storage.

 

How could I "emulate" a VixDiskLib_Clone with calls to VixDiskLib_Read and copy a thin provisioned disk?

Viewing all 947 articles
Browse latest View live


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