VMware {code} Community
flatino
Contributor
Contributor

Limitations opening vmdk files of running guests

Hello,

I am not able to open a VMDK file if the guest machine is running.

Using the sample code "vixDiskLibSample.exe -info" or invoking VDDK API directly the with "VixDiskLib_Open" I got some errors under some conditions.

I made the following tests and got these results.

The tests were executed on both a vmware workstation and on a ESX server: I collected the same resultson both products

-


TEST -


1) Open vmdk file of a running guest (without any snapshots: VMDK files has no snapshots): FAILS

2) Open vmdk file of a powered-off guest (without any snapshot: VMDK files has no snapshots): WORKS

3) Open vmdk file of a running guest (with snapshots):

-> If I open the CHILD VMDK: it FAILS

-> If I open the PARENT VMDK: it WORKS

4) Open vmdk file of a powered off guest (with snapshots): WORKS with both parent and child VMDKS

So I have deduced the following rules:

A) I can open VMDK files if machines are powered off.

B) If a guest machine is running -> I can open only the parent vmdk file of a machine with snapshots

C) I cannot open a vmdk file of a running machine if at least one of the following conditions is true:

- there are no snapshots for this VMDK file (this means the vmdk file i am trying to opening is the only one)

- the vmdk files is a child VMDK

Could you please confirm and doublecheck my findings ?

Thanks,

Francesco

0 Kudos
4 Replies
killermachine18
Contributor
Contributor

Hi.

A) right. But do not manipulate parent vmdk files of snapshot. This will result in a broken snapshot.

B) if a guest is running, you shold not open any vmdk file of it. Can result in a broken vm.

C) you should not be opening any vmdk files of a running machine.

flatino
Contributor
Contributor

thanks a lot for your fast reply ! I understand your points and all is clear now.

But I believed that it was possible to open a vmdk files in READ-ONLY mode: read-only should be a safe mode.

It seems a limitation if I cannot open any vmdk files in read-only mode: do you agree ?

Thanks,

Francesco

0 Kudos
admin
Immortal
Immortal

Just to add to what flatino said, you can open the non-current disks of a running VM in read-only mode.

Look at it this way, when a process opens a file in read-write mode, no other process can open the file. But many processes can open a file in read-only mode. When a VM is running the latest child disk (i.e. You Are Here disk) is opened read-write. all other disks are open read-only.

Hope that clarifies,

-Sudarsan

flatino
Contributor
Contributor

Very clear. I understood.

Many thanks again !

0 Kudos