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

vixMntApi on Linux

$
0
0

Hi All,

 

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

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

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

 

VixDiskLib_ConnectEx()

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

VixMntapi_OpenDisks()

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

VixMntapi_GetDiskSetInfo()

-          Sucessful.

VixMntapi_GetVolumeHandles()

-          Successful

VixMntapi_MountVolume()

 

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

 

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

Num Volumes 1

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

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

       missing codepage or helper program, or other error

       In some cases useful info is found in syslog - try

       dmesg | tail  or so

 

mount: unknown filesystem type 'ntfs-3g'

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

After mount

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

 

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

 

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

 

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

Any pointers regarding the same would be beneficial.


Broken links to VDDK 5.0 Programmer's Guide

$
0
0

Transport Mode Problem

$
0
0

 

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

 

 

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

 

 

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

 

 

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

 

 

Matt

 

 

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.

Viewing all 2039 articles
Browse latest View live


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