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
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
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:
Checking transport mode nbdssl.
Transport mode nbdssl passed pre-flight checks. Adding to list of available transports.
Transport mode nbd passed pre-flight checks. Adding to list of available transports.
Narrowing down applicable 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
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".
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:
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 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
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?
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. ... 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
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.
Is it possible to delete an individual file from a VMDK disk mounted using VixMntApi?
./Siva.
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:
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?
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.
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
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.
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?
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
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.
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
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
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.
Does one need a license to redistribute VDDK modules on the "Distributable Code List"?
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:
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.
Hello~
I'm writing a python program which will R/W VMDKfile by using vixDiskLib.dll.
I'd like to speed up R/W spped because some files will be read/wrote many times, these file's size might be very huge.
How do I ensure that these files be cached as many as possible?
Or can I adjust the buffer size?
Thank you very much ![]()
Best regards,
Wood
Hi folks,
We are a Cloud Provider who uses CommVault as the primary backup solution for our virtualized and physical workloads. Out whole backup environment is virtual as well including Media Agents and VSA Proxies. These VSA Proxies are just a W2K8 R2 server that is used to HotAdd snapshots for the backup process.
We have always had issues with the VSA Proxies around the HotAdd process with typical issues in having random HotAdd failures. Our original issue revolved around the fact that when HotAdd is required to mount disks past the 1st controller it would fail with the HotAdd. Our VSA Proxies right now have 3 controllers so I would assume we should be able to mount 45 disks. We had solved the issue in the past without really knowing how but after a recent upgrade/migration, it appears we have issues again.
CommVault support has not really been very helpful with this issue and after much searching I am basically at the end of my rope.
I suspect that the issue may be centered around the order or binding of the adapters being different than how they are represented in VMware. I have come to this forum as this all revolves around VDDK and the interworkings of VMware.
Technically I should be able to use 4 controllers but to be honest, if we could get 3 working without issues I would be happy.
We are running vSphere 5.0 U1 with all datastores now being Version 5.
What I would really love is an explaination of the events that are logged in the VixDisk log in CommVault with the hopes that it sheds some light on this issue. SImple things like:
1.. 2444 474 12/05 01:09:30 ### diskLibPlugin: 2012-12-05T01:09:30.516-05:00 [01140 verbose 'Default'] ScsiEnum_GetAdapterPort: scsi port \\.\Scsi0: bus type is 3
2444 474 12/05 01:09:30 ### diskLibPlugin: 2012-12-05T01:09:30.516-05:00 [01140 verbose 'Default'] ScsiEnum_GetAdapterPort: scsi port \\.\Scsi1: bus type is 3
2444 474 12/05 01:09:30 ### diskLibPlugin: 2012-12-05T01:09:30.516-05:00 [01140 verbose 'Default'] ScsiEnum_GetAdapterPort: scsi port \\.\Scsi2: bus type is 10
Why is the 3rd Adapter showing with bus type 10 when they are the same?
2.. CreateFile \\.\PhysicalDrive15 failed 2
Are these normal? We will have 15 through 64 typically here for this failure
3.. TryReleaseDevice: DynLinkApi_SetupDiRemoveDeviceInterface failed. Error = 0xe000021b.
We have groups of 3 of these in the logs as well. Could this be part of the problem?
4.. Mounting VM vim.VirtualMachine:vm-85249 using transport hotadd failed : Failed to hot-add SCSI targets: Vmomi::MethodFault::Exception: vim.fault.GenericVmConfigFault.
This is a HotAdd failure. It was trying to mount the drives at 1:3 1:4 1:5 but failed. If I run this job manually after te fact by itself, no issues. I seems to be due the fact that I am HotAdding many VM drives to the VSA Proxy.
At this point in time, any advice would be helpful.
Cheers,