Quantcast
Channel: VMware Communities : Discussion List - Virtual Disk Development Kit
Viewing all 2039 articles
Browse latest View live

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?

Retrieve VirtualDiskType with VI SDK

$
0
0

Hi,

 

I am new with vi sdk and I was starting on looking for which property could return the type of the virtual disk.

 

Also, is there any way to see the property of independency of virtualDisks?

 

Thanks in advance

Advanced Transport Modes

$
0
0

 

Hi,

 

 

I am trying to use VDDK in c# on 64bit Windows 2003 and having problems using san transport.

 

 

  My process:

 

 

VixDiskLib_InitEx - Works fine

 

 

VixDiskLib_ConnectEx - Returns VIX_OK

 

 

in console I see:

 

 

Advanced Transport Modes Checking transport mode nbdssl.

Advanced Transport Modes Transport mode nbdssl passed pre-flight checks. Adding to list of available transports.

Advanced Transport Modes Checking transport mode nbd.

Advanced Transport Modes Transport mode nbd passed pre-flight checks. Adding to list of available transports.

Advanced Transport Modes Narrowing down applicable transport modes.

Advanced Transport Modes Confirmed that mode san is applicable.

 

 

 

 

 

VixDiskLib_Open - Returns VIX_E_FILE_ACCESS_ERROR

 

 

VixDiskLib_Close

 

 

VixDiskLib_Disconnect

 

 

 

 

 

Any idea why it returns  VixDiskLib_Open returns VIX_E_FILE_ACCESS_ERROR. I do not see any log entries created in hostd.log on ESX server.

 

 

 

 

 

 

 

 

Thanks

 

 

VixDiskLib_Open fails with VIX_E_FILE_ACCESS_ERROR: You do not have access rights to this file

$
0
0

 

Hello

 

 

 

Currenly I'm struggling with the snapshot reference.

 

 

 

This is fragment of the code I'm using:

 

 

 

cnxParams.vmxSpec = "moref=vm-3724";

               cnxParams.serverName = "hh-vms";

               cnxParams.credType = VIXDISKLIB_CRED_UID;

               cnxParams.creds.uid.userName = "userName";

               cnxParams.creds.uid.password = "password";

               cnxParams.port = 0;

 

               VixError vixError = VixDiskLib_InitEx(1, 1, NULL, NULL, NULL, "bin", "config.vddk");

               out << VixDiskLib_ListTransportModes() << endl;

               vixError = VixDiskLib_ConnectEx(&cnxParams, FALSE, "snapshot-3841", NULL, &appGlobals.connection);

               VixError vixError = VixDiskLib_Open(connection, "HFR_XP_Mini_2/HFR_XP_Mini_2_2-000001.vmdk", 0, &_handle)

 

When executing this, the following available transport modes where shown: file:san:hotadd:nbdssl:nbd

 

 

The log shows, that the vmdk would be tried to connect via san, ndbssl and nbd but all connections fails with  "You do not have access rights to this file".

 

 

 

 

VixDiskLib_Open fails with VIX_E_FILE_ACCESS_ERROR: You do not have access rights to this file Using system libcrypto, version 9070AF

               VixDiskLib_Open fails with VIX_E_FILE_ACCESS_ERROR: You do not have access rights to this file Vmacore::InitSSL: doVersionCheck = true, handshakeTimeoutUs = 20000000

               VixDiskLib_Open fails with VIX_E_FILE_ACCESS_ERROR: You do not have access rights to this file Connecting to host hh-vms on port 443 using protocol https

               VixDiskLib_Open fails with VIX_E_FILE_ACCESS_ERROR: You do not have access rights to this file Initializing SSL context

               VixDiskLib_Open fails with VIX_E_FILE_ACCESS_ERROR: You do not have access rights to this file Connected using API Namespace vim.version.version5.

               VixDiskLib_Open fails with VIX_E_FILE_ACCESS_ERROR: You do not have access rights to this file Authenticating user administrator

               VixDiskLib_Open fails with VIX_E_FILE_ACCESS_ERROR: You do not have access rights to this file Logged in!

               VixDiskLib_Open fails with VIX_E_FILE_ACCESS_ERROR: You do not have access rights to this file Performing SearchIndex find.

               VixDiskLib_Open fails with VIX_E_FILE_ACCESS_ERROR: You do not have access rights to this file MoRef vm-3724 is a valid virtual machine.

               VixDiskLib_Open fails with VIX_E_FILE_ACCESS_ERROR: You do not have access rights to this file Found vm moref=vm-3724

               VixDiskLib_Open fails with VIX_E_FILE_ACCESS_ERROR: You do not have access rights to this file Examining special transport modes.

               VixDiskLib_Open fails with VIX_E_FILE_ACCESS_ERROR: You do not have access rights to this file Checking transport mode san.

               VixDiskLib_Open fails with VIX_E_FILE_ACCESS_ERROR: You do not have access rights to this file BIOS UUID obtained: 44454c4c-3000-1050-8057-c4c04f56304a

               VixDiskLib_Open fails with VIX_E_FILE_ACCESS_ERROR: You do not have access rights to this file Performing SearchIndex find.

               VixDiskLib_Open fails with VIX_E_FILE_ACCESS_ERROR: You do not have access rights to this file Could not find virtual machine.

               VixDiskLib_Open fails with VIX_E_FILE_ACCESS_ERROR: You do not have access rights to this file Transport mode san passed pre-flight checks. Adding to list of available transports.

               VixDiskLib_Open fails with VIX_E_FILE_ACCESS_ERROR: You do not have access rights to this file Checking transport mode hotadd.

               VixDiskLib_Open fails with VIX_E_FILE_ACCESS_ERROR: You do not have access rights to this file BIOS UUID obtained: 44454c4c-3000-1050-8057-c4c04f56304a

               VixDiskLib_Open fails with VIX_E_FILE_ACCESS_ERROR: You do not have access rights to this file Performing SearchIndex find.

               VixDiskLib_Open fails with VIX_E_FILE_ACCESS_ERROR: You do not have access rights to this file Could not find virtual machine.

               VixDiskLib_Open fails with VIX_E_FILE_ACCESS_ERROR: You do not have access rights to this file Transport mode hotadd failed pre-flight check. Ignoring.

               VixDiskLib_Open fails with VIX_E_FILE_ACCESS_ERROR: You do not have access rights to this file Checking transport mode nbdssl.

               VixDiskLib_Open fails with VIX_E_FILE_ACCESS_ERROR: You do not have access rights to this file Transport mode nbdssl passed pre-flight checks. Adding to list of available transports.

               VixDiskLib_Open fails with VIX_E_FILE_ACCESS_ERROR: You do not have access rights to this file Checking transport mode nbd.

               VixDiskLib_Open fails with VIX_E_FILE_ACCESS_ERROR: You do not have access rights to this file Transport mode nbd passed pre-flight checks. Adding to list of available transports.

               VixDiskLib_Open fails with VIX_E_FILE_ACCESS_ERROR: You do not have access rights to this file Creating mount directory C:\DOKUME1\holger\LOKALE1\Temp\vmware-holger\4220a60a-93a8-bdf2-f197-f922e2e1dbb3-vm-3724\san.

               VixDiskLib_Open fails with VIX_E_FILE_ACCESS_ERROR: You do not have access rights to this file Starting to write unmount info.

               VixDiskLib_Open fails with VIX_E_FILE_ACCESS_ERROR: You do not have access rights to this file Mount operation obtained backup info.

               VixDiskLib_Open fails with VIX_E_FILE_ACCESS_ERROR: You do not have access rights to this file Successfully mounted snapshot ssid:snapshot-3841 on mount point C:\DOKUME1\holger\LOKALE1\Temp\vmware-holger\4220a60a-93a8-bdf2-f197-f922e2e1dbb3-vm-3724\san

               VixDiskLib_Open fails with VIX_E_FILE_ACCESS_ERROR: You do not have access rights to this file Got credentials to access disk VixDiskLib_Open fails with VIX_E_FILE_ACCESS_ERROR: You do not have access rights to this file HFR_XP_Mini_2/HFR_XP_Mini_2_2-000001.vmdk using mode san.

               VixDiskLib_Open fails with VIX_E_FILE_ACCESS_ERROR: You do not have access rights to this file Obtained list of SCSI disk devices.

               VixDiskLib_Open fails with VIX_E_FILE_ACCESS_ERROR: You do not have access rights to this file Establishing new connection for hh-vms:administrator

               VixDiskLib_Open fails with VIX_E_FILE_ACCESS_ERROR: You do not have access rights to this file Connecting to host hh-vms on port 443 using protocol https

               VixDiskLib_Open fails with VIX_E_FILE_ACCESS_ERROR: You do not have access rights to this file Connected using API Namespace vim.version.version5.

               VixDiskLib_Open fails with VIX_E_FILE_ACCESS_ERROR: You do not have access rights to this file Authenticating user administrator

               VixDiskLib_Open fails with VIX_E_FILE_ACCESS_ERROR: You do not have access rights to this file Logged in!

               VixDiskLib_Open fails with VIX_E_FILE_ACCESS_ERROR: You do not have access rights to this file Starting to fetch block map.

               VixDiskLib_Open fails with VIX_E_FILE_ACCESS_ERROR: You do not have access rights to this file Performing SearchIndex find.

               VixDiskLib_Open fails with VIX_E_FILE_ACCESS_ERROR: You do not have access rights to this file VM Hosted by VMware ESX, version 4.0.0

               VixDiskLib_Open fails with VIX_E_FILE_ACCESS_ERROR: You do not have access rights to this file Trying to open new LUN LVID:4b025e16-05da754e-d68b-00212800629e/499e95bd-33bc1e15-c5d3-00144feb150a/1.

               VixDiskLib_Open fails with VIX_E_FILE_ACCESS_ERROR: You do not have access rights to this file Attempting to open LVID:4b025e16-05da754e-d68b-00212800629e/499e95bd-33bc1e15-c5d3-00144feb150a/1.

               VixDiskLib_Open fails with VIX_E_FILE_ACCESS_ERROR: You do not have access rights to this file No path to device LVID:4b025e16-05da754e-d68b-00212800629e/499e95bd-33bc1e15-c5d3-00144feb150a/1 found.

               VixDiskLib_Open fails with VIX_E_FILE_ACCESS_ERROR: You do not have access rights to this file Failed to open new LUN LVID:4b025e16-05da754e-d68b-00212800629e/499e95bd-33bc1e15-c5d3-00144feb150a/1.

               VixDiskLib_Open fails with VIX_E_FILE_ACCESS_ERROR: You do not have access rights to this file Cannot access LUN LVID:4b025e16-05da754e-d68b-00212800629e/499e95bd-33bc1e15-c5d3-00144feb150a/1, cannot open disk snapshot-3841[VMStorage1] HFR_XP_Mini_2/HFR_XP_Mini_2_2-000001.vmdk. Giving up.

               VixDiskLib_Open fails with VIX_E_FILE_ACCESS_ERROR: You do not have access rights to this file

               VixDiskLib_Open fails with VIX_E_FILE_ACCESS_ERROR: You do not have access rights to this file Closing connection hh-vms:administrator

               VixDiskLib_Open fails with VIX_E_FILE_ACCESS_ERROR: You do not have access rights to this file Creating mount directory C:\DOKUME1\holger\LOKALE1\Temp\vmware-holger\4220a60a-93a8-bdf2-f197-f922e2e1dbb3-vm-3724\nbdssl.

               VixDiskLib_Open fails with VIX_E_FILE_ACCESS_ERROR: You do not have access rights to this file Starting to write unmount info.

               VixDiskLib_Open fails with VIX_E_FILE_ACCESS_ERROR: You do not have access rights to this file Mount operation obtained backup info.

               VixDiskLib_Open fails with VIX_E_FILE_ACCESS_ERROR: You do not have access rights to this file Successfully mounted snapshot ssid:snapshot-3841 on mount point C:\DOKUME1\holger\LOKALE1\Temp\vmware-holger\4220a60a-93a8-bdf2-f197-f922e2e1dbb3-vm-3724\nbdssl

               VixDiskLib_Open fails with VIX_E_FILE_ACCESS_ERROR: You do not have access rights to this file Sending soap request to VixDiskLib_Open fails with VIX_E_FILE_ACCESS_ERROR: You do not have access rights to this file: randomAccessOpenReadonly

               VixDiskLib_Open fails with VIX_E_FILE_ACCESS_ERROR: You do not have access rights to this file Received soap response from VixDiskLib_Open fails with VIX_E_FILE_ACCESS_ERROR: You do not have access rights to this file: randomAccessOpenReadonly

               VixDiskLib_Open fails with VIX_E_FILE_ACCESS_ERROR: You do not have access rights to this file Got credentials to access disk VixDiskLib_Open fails with VIX_E_FILE_ACCESS_ERROR: You do not have access rights to this file HFR_XP_Mini_2/HFR_XP_Mini_2_2-000001.vmdk using mode nbdssl.

               VixDiskLib_Open fails with VIX_E_FILE_ACCESS_ERROR: You do not have access rights to this file NfcFssrvr_DiskOpen: received NFC error 11 from server: NfcFssrvrOpen: permission check failed for file VixDiskLib_Open fails with VIX_E_FILE_ACCESS_ERROR: You do not have access rights to this file HFR_XP_Mini_2/HFR_XP_Mini_2_2-000001.vmdk, access = 3

               VixDiskLib_Open fails with VIX_E_FILE_ACCESS_ERROR: You do not have access rights to this file Creating mount directory C:\DOKUME1\holger\LOKALE1\Temp\vmware-holger\4220a60a-93a8-bdf2-f197-f922e2e1dbb3-vm-3724\nbd.

               VixDiskLib_Open fails with VIX_E_FILE_ACCESS_ERROR: You do not have access rights to this file Starting to write unmount info.

               VixDiskLib_Open fails with VIX_E_FILE_ACCESS_ERROR: You do not have access rights to this file Mount operation obtained backup info.

               VixDiskLib_Open fails with VIX_E_FILE_ACCESS_ERROR: You do not have access rights to this file Successfully mounted snapshot ssid:snapshot-3841 on mount point C:\DOKUME1\holger\LOKALE1\Temp\vmware-holger\4220a60a-93a8-bdf2-f197-f922e2e1dbb3-vm-3724\nbd

               VixDiskLib_Open fails with VIX_E_FILE_ACCESS_ERROR: You do not have access rights to this file Sending soap request to VixDiskLib_Open fails with VIX_E_FILE_ACCESS_ERROR: You do not have access rights to this file: randomAccessOpenReadonly

               VixDiskLib_Open fails with VIX_E_FILE_ACCESS_ERROR: You do not have access rights to this file Received soap response from VixDiskLib_Open fails with VIX_E_FILE_ACCESS_ERROR: You do not have access rights to this file: randomAccessOpenReadonly

               VixDiskLib_Open fails with VIX_E_FILE_ACCESS_ERROR: You do not have access rights to this file Got credentials to access disk VixDiskLib_Open fails with VIX_E_FILE_ACCESS_ERROR: You do not have access rights to this file HFR_XP_Mini_2/HFR_XP_Mini_2_2-000001.vmdk using mode nbd.

               VixDiskLib_Open fails with VIX_E_FILE_ACCESS_ERROR: You do not have access rights to this file NfcFssrvr_DiskOpen: received NFC error 11 from server: NfcFssrvrOpen: permission check failed for file VixDiskLib_Open fails with VIX_E_FILE_ACCESS_ERROR: You do not have access rights to this file HFR_XP_Mini_2/HFR_XP_Mini_2_2-000001.vmdk, access = 3

               Error: VixDiskLib_Open fails with VIX_E_FILE_ACCESS_ERROR: You do not have access rights to this file  d You do not have access rights to this file

 

I know that in my case only nbdssl or nbd are available, but on other machines SAN may be possible also so I prefer to use the automatic transport mode selection.

 

 

I was able to write to the virtual disk  when I don't suppliy the snapshot reference as shown as follows:

 

 

vixError = VixDiskLib_ConnectEx(&cnxParams, FALSE, NULL,

NULL, &appGlobals.connection);

 

VixDiskLib: config options: libdir 'd:\workspace\VMware\vmware\Debug\libdir', tmpDir 'C:\DOKUME1\holger\LOKALE1\Temp\vmware-holger'.

               VixDiskLib: Advanced transport plugin was successfully loaded into vixDiskLib. Accelerated transport modes available.

               VixDiskLib: Enabling advanced transport modes.

               VMware VixDiskLib (1.1) Release build-207031

               Using system libcrypto, version 9070AF

               NBD_Clientopen: attempting to create connection to vpxa-nfc://[VMStorage1] HFR_XP_Mini_2/HFR_XP_Mini_2_2.vmdk@esx001.hh.novastor.local:902!52 a0 1f 83 c8 f6 cd 44-bd dc e7 4c 4b f6 a7 58

               Started up WSA

               SSLVerifyCertAgainstSystemStore: The remote host certificate has these problems:

 

                

  • A certificate in the host's chain is based on an untrusted root.

               SSLVerifyIsEnabled: failed to read registry value. Assuming verification is disabled. LastError = 0

               SSLVerifyCertAgainstSystemStore: Certificate verification is disabled, so connection will proceed despite the error

               Opening file VixDiskLib_Open fails with VIX_E_FILE_ACCESS_ERROR: You do not have access rights to this file HFR_XP_Mini_2/HFR_XP_Mini_2_2.vmdk (vpxa-nfc://[VMStorage1] HFR_XP_Mini_2/HFR_XP_Mini_2_2.vmdk@esx001.hh.novastor.local:902!52 a0 1f 83 c8 f6 cd 44-bd dc e7 4c 4b f6 a7 58)

               DISKLIB-LINK  : Opened 'vpxa-nfc://[VMStorage1] HFR_XP_Mini_2/HFR_XP_Mini_2_2.vmdk@esx001.hh.novastor.local:902!52 a0 1f 83 c8 f6 cd 44-bd dc e7 4c 4b f6 a7 58' (0x1a): custom, 16777216 sectors / 8 GB.

               DISKLIB-LIB   : Opened "vpxa-nfc://[VMStorage1] HFR_XP_Mini_2/HFR_XP_Mini_2_2.vmdk@esx001.hh.novastor.local:902!52 a0 1f 83 c8 f6 cd 44-bd dc e7 4c 4b f6 a7 58" (flags 0x1a).

 

So my actual problem is:

 

 

The API reference says that it is necessary to supply the snapshot reference when using SAN transport mode. But if I give that reference, the opening of the disk fails for all transport modes. If I don't give the snapshot reference I can open and write to the virtual disk (choosen tranpsort mode: NBD), but SAN transport won't be available.

 

 

In other words: When opening a disk via VixDiskLib_Open the transport mode is choosen automatically. If SAN is possible, I had had to give the snapshot reference to VixDiskLib_ConnectEx before using VixDiskLib_Open. If SAN isn't possible, the snapshot reference has to be omitted to VixDiskLib_Open as otherwise I'll got the permission error.

 

 

Regards,

 

 

Holger

 

 

VixDiskLib_ConnectEx

$
0
0

Hi,

 

I use vddk 5.0. Sometimes I have the case when call to VixDiskLib_ConnectEx hangs. Unfortunately I don't have more info right now, but may be somebody met  such behaviour and know the solution?

VDDK Hang on Mounting Windows Volume

$
0
0

I have a customer who is getting repeated instances of VDDK hanging on a

vixMntapi_MountVolume(handle, read_only). We are logging information output by VMware, and the log contains the following:

 

.. Opening virtual disks successful...

 

05/28/2012 20:27:30 (info) DiskLibProvider_GetDisk: Open successful - index 0.
05/28/2012 20:27:30 (info) DiskLibProvider_GetDisk: Open successful - index 1.
05/28/2012 20:27:30 (info) Copying registry hive from \\.\vstor2-mntapi10-shared-F67766A9000010000000000006000000\\Boot\BCD to C:\WINDOWS\TEMP\vmware-SYSTEM\vixmntapi3.
05/28/2012 20:27:30 (info) [LoadTempHive] Registry hive C:\WINDOWS\TEMP\vmware-SYSTEM\vixmntapi3 is loaded under the name mntApi358269972130227761
05/28/2012 20:27:30 (info) Error 13 reading Element value from key mntApi358269972130227761\Objects\{9dea862c-5cdd-4e70-acc1-f32b344d4795}\Elements\24000001
05/28/2012 20:27:30 (info) Unloaded hive mntApi358269972130227761
05/28/2012 20:27:30 (info) DeleteHiveLogs: Deleted 1 hive log file on cleanup.
05/28/2012 20:27:31 (info) Copying registry hive from \\.\vstor2-mntapi10-shared-F67766A9000010000000000006000000\Windows\system32\config\SOFTWARE to C:\WINDOWS\TEMP\vmware-SYSTEM\vixmntapi3.

... and hangs there for 30 minutes. We restart after that. I have verified that the C: drive is not out of space, so does anyone know what exactly "copying registery hive" means and why it would hang doing this? I verified that there is indeed a vixmntapi3 and vixmntapi3.log in the vmware-SYSTEM directory.

 

Thanks,

 

Rich

Deleting a file from VMDK disk using VixMntApi

$
0
0

Is it possible to delete an individual file from a VMDK disk mounted using VixMntApi?

 

./Siva.


VixDiskLib: disk locked after network failure

$
0
0

Hi,

 

I am trying to implement restore functionality in my application as described in the Designing vSphere Backup Solutions documentations. The application connects to a VM on a remote vCenter using VixDiskLib_ConnectEx, opens a virtual disk for writing and writes data on the disk.

 

I need to handle this scenario: if a netork failure occurs during writing data on disk then the application waits for the network to become available again and resumes writing data. The way I see it, the right thing to do is close the disk, re-open it and keep writing on it. Problem is, the disk cannot be closed. Logs show that the close comand could not be sent and so the disk remains locked. This is the full sequence of actions that replicate this:

 

  1. make a VM snapshot using the vSphere client
  2. open connection to the VM disks using default transport and snapshot's reference ID
  3. open a disk for writing in mode = unbuffered; the disk belongs to the snapshot
  4. write data in the first sector
  5. simulate a network failure: disable the network adapter and enable it
  6. wait for the network to become available; keep pinging the vCenter until it can be reached
  7. close the disk
  8. close the connection
  9. open a new connection
  10. open disk on the new connection
  11. write data in the first sector

 

The error occurs when opening the disk on the new connection: file already locked. I also attached the full code; connection settings are hardcoded in Main.

 

Any idea how to make this work?

VMDK block changed table

$
0
0

Hi,

   Im  new to vmdk.

I want to know an information regarding the VMDK and  i have gonethrough the vmdk spec but couldnt find it.

 

In VHD we have BAT, from which we can find the blocks which have data and their offsets.

 

What is present just like that in vmdk.

 

Im having 1 full backup in vmdk format and 2 incremental backup.

 

Now i want to collect the blocks which have data .

Probably i think i can find the whole details in the last incremental backup. Am i right.?

I want to find the block number and the offset for them. Which backup file contains the data of the block whether full or the incrementals.

 

How to find the block details and where.

 

Thanks in Advance.

 

Regards,

Siva.

vixdisklib_Open fail in vsphere 4.1 with many disks

$
0
0

when I use vixdisklib_open the esx4.1 disks, the first disk is works well,but then open the second disk, vixdisklib_open return a error value 1(unknow error). only in vsphere 4.1 has this issue. anyone know why?

 

the fial scene

1、I use vmware vshpere client create a VM

2、then I create a other virtual disk for the VM.

3、I use vddk API (vixdisklib_open)to open VM disks,  the first disk goes well, but the second disk return a error value 1.

 

the success scene

1、I use vmware vshpere client create a VM

2、then I create a other virtual disk for the VM.

3、I take a snapshot for the VM, then I use vddk API (vixdisk_open)to open vm disks, the tow disk all go well with no error.

 

anyone has see this issue.

thanks

How to find out disktype after opening a VMDK file?

$
0
0

Is there a way to find out what is the type of the disk after opening an existing VMDK file? Please let me know even if there is any other way other than using VDDK to find the type of disk.

 

Thanks,

./Siva.

Increase disk size

$
0
0

Hello,

 

i'm trying to increase a disk size, with the help of vmware-vdiskmanager. but am running up against a small problem.

when i use vmware-vdiskmanager -x 50gb path/to/*.vmdk i get a message that the diskname or a argument is missing.

 

i have already try'd relocation of the virtual disk, but this has not helped. can someone help me?

syntax for vmware-mount.exe

$
0
0

 

 

I'd like to mount a vmdk on an  ESX 3.5 and try something like

vmware-mount.exe Q: /h:10.0.0.35 /u:root /s:password /i: ????  xp-sp2.vmdk

How do I specify /i ?

 

What does

Unable to get a Vim ticket for this virtual machine

mean ?

 

 

___________________________________

 

description of vmx-parameters: http://sanbarrow.com/vmx.html

VMware-liveCD: http://sanbarrow.com/moa.html

 

 

Using VDDK .NET wrapper on Windows 64-bit system

$
0
0

Hi,

I'm so confused with this problem for a long time.

 

The program goes well on 32-bit system, such as: Windows server 2003, Windows server 2008, Windows XP and Windows 7.

 

Now I'd like to run the program on 64-bit system.

 

Each time the program interupt with the same exception:

System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.

 

Here is the code.

 

 

                const int HOSTPORT = 902;
                const string diskPath = "[datastore1] UBUNTU/UBUNTU.vmdk";
                // const string libdir = "C:\\Program Files\\VMware\\VMware Virtual Disk Development Kit";
                VixDiskLibConnectParams cnxParams = new VixDiskLibConnectParams();
                cnxParams.serverName = "10.10.0.227";
                cnxParams.credType = VixDiskLibCredType.VIXDISKLIB_CRED_UID;
                cnxParams.creds.uid.userName = "root";
                cnxParams.creds.uid.password = "******";
                cnxParams.port = HOSTPORT;
                ulong vixError = vixDisk.Init(1,
                    0,
                    null, null, null,
                    null);
                if (vixError != 0)
                {
                    MessageBox.Show(vixDisk.GetErrorText(vixError, null));
                    return;
                }
                IntPtr pConnection = IntPtr.Zero;
                GCHandle.Alloc(pConnection);
                vixError = vixDisk.Connect(cnxParams, out pConnection);  // Exception occures here.
                if (vixError != 0 || pConnection.Equals(null))
                {
                    MessageBox.Show(vixDisk.GetErrorText(vixError, null));
                    return;
                }
                IntPtr pDiskhandle = IntPtr.Zero;
                pDiskhandle = Marshal.AllocHGlobal(8);
                GCHandle.Alloc(pDiskhandle);
                vixError = vixDisk.Open(pConnection, diskPath, VIXDISKLIB_FLAG_OPEN_READ_ONLY, out pDiskhandle);
                if (vixError != 0 || pDiskhandle.Equals(null))
                {
                    MessageBox.Show("ERROR: There was an error opening the disk using vixDisk API's");
                    MessageBox.Show(vixDisk.GetErrorText(vixError, null));
                    return;
                }
              
                vixError = vixDisk.Close(pDiskhandle);
                if (vixError != 0)
                {
                    MessageBox.Show("ERROR: There was an error closing the disk using vixDisk API's");
                    return;
                }
                // releases all resources held by VixDiskLib
                vixDisk.Exit();

 

The wrapper is:

 

      [DllImport("vixDiskLib.dll", ExactSpelling = true, EntryPoint = "VixDiskLib_Connect")]

      public static extern System.UInt64

      Connect(VixDiskLibConnectParams connectParams,

              out IntPtr connection);

 

Please let me know if you need any more information.

 

Thanks in Advance,

Yangyang

 



Does storage vmotion break changed block tracking?

$
0
0

Hello

 

I have observed that after online storage vmotion, the changeid used with changed block tracking is no longer valid. Does that mean that I have to run a full backup after each storage vmotion? (ESXi 5.1)

 

This is the error I get in the API:

 

SOAP Fault:
-----------
Fault string: Error caused by file XXXXXXX.vmdk
Fault detail: FileFaultFault

 

Regards

 

            Frank

Question on Disk Restore from Incremental Backup

$
0
0

After successfull backup implementation it is time for restore . In the backup implementation I have taken a backup of Virtualdisks, configuration and stored Changed Block information for each of the disks I backup. I also store the CBT information for each incremental I take.

 

Now when I do a restore, according to the technote on backup and restore, it is recommended to restore the disks full first and the incrementals subsequently. Is that really necessary? Since I store all the CBT info in the files, which ever incremental I decided to restore, I can compare the CBT info and get the changed blocks from the full till that incrementals - open the child disk (corresponding incremental) and restore the blocks from the CBT I created. To illustrate,

 

Full Backup CBT:(start - length)

 

1 - 50

1000 - 300

3000 - 1000

 

Incremental 1 CBT : (start-length)

 

6 - 10

2000 - 500

3000 - 2000

 

I will collate the above information to the following info:

1 - 50

1000 - 300

2000 - 500

3000 - 2000

 

I will open the incremental1.vmdk and read the above offsets and lengths. Would I not get be getting the correct information? Please let me know if I am overlooking something in the implementation.

 

Thanks,

./Siva.

Q: VDDK licensing

VixDiskLib_Open() returns VixError = 1 when connecting to ESX/ESXi (Not through vCenter)

$
0
0

Hi Folks,

 

Environment:

- VDDK: 5.1

- Target hosts: ESX4.1 and ESXi 5.0 (being managed by vCenter 4 and 5 respectivley)

 

I have an issue where VixDiskLib_Open() returns VixError = 1 (see below for more details) when I connect to an ESX host. When I connect to a vCenter and attempt to open the exact same virtual disk, then I have no such problems. 

 

I’ve tried using both VixDiskLib_Connect() and VixDiskLib_ConnectEx().  Both connect calls return ok but the subsequent VixDiskLib_Open() always fails in both cases. I’ve also tried VixDiskLib_Init() and VixDiskLib_InitEx and again the problem persists in both cases. I’ve tried various vCenters and hosts and the issue is always the same: no problems when logging in to the Vcenter, but logging in directly to an ESX host results in problems opening disks. Omitting the call to VixDiskLib_PrepareForAccess() does not change the behavior.

 

As for the actual error received, I’ve attached the full contents of the default log file as well as a screenshot of the console, both of which I hope help in pinpointing the cause of this issue.

 

Thanks,

James

 

Here are the full contents of the log file:

 

VixDiskLib: config options: libdir '<null>', tmpDir 'C:\Users\ms\AppData\Local\Temp\vmware-ms'.

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

VixDiskLib: Advanced transport module not loaded.

VMware VixDiskLib (5.0) Release build-427917

POLL Using the WSAPoll API Implementation for PollDefault

VixDiskLibVimResolveHostName: Resolving IP address for hostname newbexesx6.

VixDiskLibVimResolveHostName: Resolved to 71.100.140.11.

HOSTINFO 6807883587803 @ 2727578Hz -> 0 @ 1000000000Hz

HOSTINFO ((x * 3075478684) >> 23) + -2495944602184482

VThreadBase detected multiple threads.

VixDiskLibVim: VixDiskLibVimLogin

VixDiskLibVim: TicketFindVMByMoRef: vmxPath = -vm-6685-

VixDiskLibVim: VixDiskLibVimLoadVM

VixDiskLibVim: VixDiskLibVimLoadVMCb

VixDiskLibVim: VixDiskLibVimLoadVMCb failure - VixError = 1.

VixDiskLibVim: VixDiskLibVimLogout

 

 

Here’s a screenshot of the console:

Get datastores names with searchManagedEntity function

$
0
0
hi,
I'm trying to locate a specific nas storage

Datastore datastore = (Datastore) new InventoryNavigator(rootFolder).searchManagedEntity("DataStore", "nfs_store");

System.out.print(datastore.getName());


Unfortunetaly, it does not return any name. It seems that the datastore object still null. By the way, I test the same with host as following:


HostSystem host = (HostSystem) searchManagedEntity("HostSystem", "host1");

System.out.print(host.getName());


and I got the right name.


Could be the searchManagedEntity function is not the suitable one to search datastore managed objects? if it is the case how is it possible to get datastores properties ?


Note: searchManagedEntity takes two arguments for the managed object: searchManagedEntity(type,name)


Thanks in advance.

Viewing all 2039 articles
Browse latest View live


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