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

Change Disk mode using API

$
0
0

Hi,

 

Is there a way to change disk mode from persistent to non-persistent and vice versa via some api?

 

Thanks.


VMDK diff ?

$
0
0

I see that the forum is not very active, so I'd appreciate a short response to  simple question: is there any vmdk diff program out there ? I'm trying to create differenciated disks (linked clones) out of two simmilar instalations that are not one a child of the other.

 

-Carlos

file list from a partial VMDK file

$
0
0

Hi,

 

I am working with 2 sites.

 

On site #1 I am using VMware Player (Windows Virtual Machines).

 

I want people on site #2 to be able to see the progress of the work – to see the file list of the virtual machine.

 

Due to some network bandwidth limitations, I can't transfer the "entire" virtual machines files between the sites.

 

I was wondering if there is a way to transfer just a small partial part of the VMDK file, and still to see the file tree of the virtual machine.

 

I used some application to cut the VMDK file to a transferaable size (only the first MBytes).

When I tried to use "vmware-mount" utility for this partial VMDK file, I can mount it, but when I am trying to access the file, I get the error message "The file or directory is corrupted and unreadable".

 

Many thanks!!!

VixDiskLib in kernel

$
0
0

Does anyone know if it is safe to use the the vddk libs in the kernel? If not off the shelf has anyone had any luck modifying the OS project to make it kernel safe?

 

Thanks,

Rob

How to convert .vmc file into .vmx file programatically?

$
0
0

Hi,

 

I am trying to convert .VMC(Virtual PC format) file into .VMX file programatically in c++ .

are there any direct API's to convert this ?if not then what i need to do for this?

 

Nandkumar T.

VixDiskLib_Write is very slow compare to VixDiskLib_Read

$
0
0

Hi All,

 

I want to read and restore remote disk from a ESXi server.

The read speed is OK. it is about 1MB/s,

But the restore speed is always 64KB/s.

I have tried using large buffer size(1MB) and small buffer size(4KB).

I have tried set UNBUFFERED flag.

I have also tried to connect to another ESXi server.

All attempts get similar results.

 

The VDDK library is 5.0, The ESXi server is 4.0.0

The transport mode is "nbd"

my restore code snippet:

 

    vixError = VixDiskLib_Open(_connection, path, 0, &_handle);

    printf("Disk is open using transport mode \"%s\".\n", VixDiskLib_GetTransportMode(_handle));

 

    VixDiskLibInfo* info = 0;
    VixDiskLib_GetInfo(_handle,    &info);

    FILE* fp = fopen("disk.img", "rb");
    for(size_t i=0; i<info->capacity; i+=128)
    {
        fread(diskbuf, VIXDISKLIB_SECTOR_SIZE, 128, fp);
        VixDiskLib_Write(_handle, i, 128, diskbuf);
        printf("%d\n", i);
    }
    fclose(fp);

 

    VixDiskLib_FreeInfo(info);

    vixError = VixDiskLib_Close(_handle);

Hot Add using VDDK on Ubuntu when copying vmdk disks

$
0
0

We get this message not allowing hot add transport when using Linux vddk

 

2011-10-19T16:06:32.045-04:00 [7F1BC2F46720 error 'Default'] Cannot use advanced transport modes for 172.31.39.1/moref=vm-44/moref=snapshot-48: Snapshot with MoRef "moid=snapshot-48" does not belong to Virtual Machine with MoRef "vm-44"..

diskLibPlugin: 2011-10-19T16:06:32.045-04:00 [7F1BC2F46720 error 'Default'] Cannot use advanced transport modes for 172.31.39.1/moref=vm-44/moid=snapshot-48: Snapshot with MoRef "moref=snapshot-48" does not belong to Virtual Machine with MoRef "vm-44"..

 

Questions:

 

For connections should we say "moref=snapshot-48" or just "snapshot-48" as in our Init code as shown below:

 

      cnxParams.vmxSpec = "moref=vm-44";
      string srcSnapshot = "moref=snapshot-48";

 

 

 

We really need to be able to use the advanced transport modes!

 

thanks,

Kris Dines

The change don't take effect after remount

$
0
0

Modify the vmdk's contend seems not saved

1>mount the vmdk and modify it

tar myos.ova

vmware-mount -o rw /tmp/osroot.vmdk /mnt

touch /mnt/bin/aa

vmware-mount -X

 

2>re-mount it, but seems the aa isn't there anymore

 

vmware-mount -o rw /tmp/osroot.vmdk /mnt

 

ls /mnt/bin/aa


How to access vmdk flat file

$
0
0

Execute the command vmware-mount -f aaa.vmdk /mnt/aaa

 

After that, how could i access the /mnt/aaa/flat?

 

Thanks

Mounting a volumes of a GPT disk on Windows

$
0
0

Hi,

 

I'm trying to mount volumes of a GPT disk using the Windows implementation of the VDDK. In these environments, mounting works perfectly:

 

- natively within a windows vm: it "sees" all the GPT partitions and volumes

- using the vddk on Linux

 

It doesn't work at all in these environments:

 

- using the vddk on Windows

 

The Windows vddk seems to "see" only one partition instead of multiple GPT partitions. I assume that the visible partition is the MBR protective partition. I cannot mount it.

 

Now my questions:

 

- is it supposed to work on Windows?

- or am I facing a known restriction of the vddk?

 

Thanks a lot for your help,

Uli

Failed to get allocated bitmap

$
0
0

Hi,

 

After taking snapshot of a VM, attempt to get the change blocks with last-change-ID = "*" failed with "Unknown Error".   The datastore is VMFS and the VMDKs are regular ones (i.e. not rdm).

 

Can't find any clue in vix logs and vmware.log.

 

Appreciate any hint/help.

 

thanks,

James

non-ASCII tmpDirectory value?

$
0
0

Hi -

 

I am trying to find out whether non-ASCII characters can be used when configuring the tmpDirectory in the config file inputted to VixDiskLib_InitEx such that VixDiskLib can use advanced transports.  In my case, it appears to be unable to read the tmp directory path from the config file, and consequently will not allow advanced transports (in this case, hotadd).

 

Below is all the information about what I tried and the log output I received.

 

- Jenni

 

The config file I feed to VixDiskLib_InitEx has the following contents:

tmpDirectory = "C:\Documents and Settings\Administrator\Local Settings\Configuración local\Temp\jenni"

 

(I also attempted encapsulating the path with single quotes as well.)

 

This is the vddk logging output (note that the libdir value is actually Configuración, not Configuración.  I believe that's just an artifact from how the log is being printed as VDDK appears to find the libdir fine.):

 

VixDiskLib_InitEx:

debug:  VixDiskLib: config options: libdir 'C:\Documents and Settings\Administrator\Local Settings\Configuración local\Temp\201104131326\Vddk-1.2.1', tmpDir '<null>'.
debug:  VixDiskLib: Advanced transport plugin was successfully loaded into vixDiskLib. Accelerated transport modes available.
debug:  VixDiskLib: Enabling advanced transport modes.
debug:  VixDiskLib: Cannot find temporary directory. Disabling advanced transport modes.
debug:  VMware VixDiskLib (1.2) Release build-323406
debug:  Using system libcrypto, version 90809F
VixDiskLib_ConnectEx log output:
debug:  TicketResolveHostName: Resolving IP address for hostname vc.dev.eng.int.
debug:  TicketResolveHostName: Resolved to 10.11.11.11.
debug:  VixDiskLibVim: TicketLogin
debug:  VixDiskLibVim: TicketFindVMByMoRef: vmxPath = -vm-656-
debug:  VixDiskLibVim: TicketLoadVM
debug:  VixDiskLibVim: Root Snapshot list has 1 elements.
debug:  VixDiskLibVim: Unable to find key for disk [DEV-iSCSI01] KAS-FD0/KAS-FD0.vmdk, trying snapshot tree.
debug:  VixDiskLibVim: TicketCollectSnapshots
debug:  VixDiskLibVim: TicketLoadSnapshot
debug:  VixDiskLibVim: TicketLoadVMCb
debug:  VixDiskLibVim: TicketLoadInternalSic
debug:  VixDiskLibVim: TicketLoadNfcTicket: Request GetVMFiles diskKey = 2000, readOnly = 1, openSnapshot = 1
debug:  VixDiskLibVim: TicketLogout
debug:  NBD_ClientOpen: attempting to create connection to vpxa-nfc://[DEV-iSCSI01] KAS-FD0/KAS-FD0.vmdk@dev029.dev.eng.int:902
debug:  Started up WSA
debug:  SSLVerifyCertAgainstSystemStore: The remote host certificate has these problems:
* The host certificate chain is not complete.
debug:  SSLVerifyIsEnabled: failed to read registry value. Falling back to default behavior: verification off. LastError = 0
debug:  SSLVerifyCertAgainstSystemStore: Certificate verification is disabled, so connection will proceed despite the error
debug:  Opening file [DEV-iSCSI01] KAS-FD0/KAS-FD0.vmdk (vpxa-nfc://[DEV-iSCSI01] KAS-FD0/KAS-FD0.vmdk@dev029.dev.eng.int:902)
debug:  DISKLIB-LINK  : Opened 'vpxa-nfc://[DEV-iSCSI01] KAS-FD0/KAS-FD0.vmdk@dev029.dev.eng.int:902' (0x1e): custom, 102400 sectors / 50 MB.
debug:  DISKLIB-LIB   : Opened "vpxa-nfc://[DEV-iSCSI01] KAS-FD0/KAS-FD0.vmdk@dev029.dev.eng.int:902" (flags 0x1e, type custom).

 

 

At this point, the code finds that VixDiskLib_ConnectEx has given us an NBD connection instead of the desired HOTADD connection (presumably due to the tmpdir coming up as null).  I confirmed that given a tmpDirectory value using all ASCII characters, this same setup can connect using HOTADD without issue.

VixDiskLib_Combine Missing

$
0
0

I downloaded the latest version of the VDDK SDK for Windows (file is VMware-vix-disklib-5.0.0-427917.i386.exe) and looking in visDiskLib.h there is not function declaration for VixDiskLib_Combine.  Did I download the incorrect version of the SDK?

 

Thank,
John

How to check the current NFC connections for a host?

$
0
0

If my understanding is correct: Vix connections consume NFC connections on a host.

 

My Question:

Is there a way to get a list of a hosts open NFC connections?  Or perhaps just the number of open nfc connections?

 

Because the nfc connections are a limited resource, it would be useful to know how many are currently being used by a host.

 

-Gary

mount gui for windows 7 64 bit?

$
0
0

is there a gui to mount disks under windows 7 64 bit?

 

I've installed the ddk and I can mount, but I can't get vmount to work.

 

thanks.


creating a vmdk file of a physical disk

$
0
0

 

I'm just getting into the VDDK.  I want to create a VMDK file that is a replication of my physical drive, much like the VMWare p2v converter does.

 

 

Can that be achieved using the VDDK?  Or does the VDDK just allow me to create the VMDK file and write to it?

 

 

Do I still have to write the kernel level code that can read the entire physical drive into the VMDK?

 

 

Reading from harddisk and Writing as VMDK using VDDK

$
0
0

Hi,

 

I wrote a program to read from the hard disk(raw read) and write to a VIXDISKLIB_DISK_MONOLITHIC_SPARSE file. While writing I calculated the StartSector (2nd parameter to VixDiskLib_Write) like this

 

1. Start Sector - "Actual Disk Offset / 512"

2. Number of sectors - "no of blocks to write * 4096" (each block is of size 2MB).

 

The file gets created and gets attached - but the data is raw.

 

Is the way in which I write the data is correct? How can I verify whether each block I write is correct? The system I am testing this is Windows 7 & Visual Studio 2008. Help is really appericiated.

 

Thanks,

./Siva.

How to sign the VDDK redistribution aggrement?

$
0
0

Hi,

 

The company I work for wanted the redistribute VDDK along with the software and want to sign the VDDK redistribution aggrement. The company is a TAP partner elite level and have contacted TAP account manager for details. Can someone advice on the timeframe it will generally take to sign the VDDK distribution agreement?

VMDK Child disk creation help

$
0
0

Hi,

 

While creating a child disk is this sequence possible

 

1. Create a disk using VixDiskLib_Create(with parentpath specified in the appglobals) instead of VixDiskLib_CreateChild.

2. Use VixDiskLib_Attach to attach the created disk to a parent? (assume the created disk contains only the changed block data).

 

The VDDK documentation spcifies "Attaching an  arbitrary  child  in  a disk   chain". Can someone tell me is the above implementation valid - if not how can a arbitray child be added in a disk chain?

 

Any help is apperitiated.

 

Thanks,

./Siva.

Unable to GetVolumeMountPoints - Error code 22.

$
0
0

One of my customers occasionally gets the following VDDK error when mounting a volume and getting volume info after successfully opening all disks and getting the disk set handle:

 

12/14/2011 20:26:41 (info) [LoadTempHive] Registry hive C:\WINDOWS\TEMP\vmware-SYSTEM\vixmntapi2 is loaded under the name mntApi256317022430194376
12/14/2011 20:26:41 (warn) Unable to open key mntApi256317022430194376\MountedDevices.
12/14/2011 20:26:41 (info) Unloaded hive mntApi256317022430194376
12/14/2011 20:26:41 (info) DeleteHiveLogs: Deleted 1 hive log file on cleanup.
12/14/2011 20:26:41 (info) Unable to GetVolumeMountPoints - Error code 22.

 

What is error code 22 and is there a comprehensive list of possible errors and their explanations?

 

The main problem seems to be "Unable to open key mntApi256317022430194376\MountedDevices." Why would this occur, and what should be the recovery action?

 

Thanks,

 

Rich

Viewing all 947 articles
Browse latest View live