VMware Cloud Community
juanpa909
Contributor
Contributor

VMware creates snapshots even when disks are "independant".

I've converted a KVM virtual machine (.img) to vmware (vmdk) format by using qemu-img (I couldn't convert it with a VMware tool). Then created a new VM from vSphere Client, selecting that vmdk file as the "existing disk". I don't want VMware to take snapshots of this disk, so I select "Independant" when the wizard asked me. However, after doing some changes to the VM, I see a vmname.s001.vmdk file in the VM folder, with the same size as the original vmdk file. I opened Snapshots Manager and I see no snapshot there. However, if I delete vmname.s001.vmdk and try to run the VM, VMware says it can't because the vmdk file cannot be found.

Maybe I'm doing some step wrong? Is there another way than selecting disk as independant to completely disable snapshots?

Thanks in advance

Tags (1)
Reply
0 Kudos
8 Replies
a_p_
Leadership
Leadership

Welcome to the Community,

files with "..-s001.vmdk" are no snapshots, but parts of virtual disk created in a 2GB sparse disk format. Snapshots are named "...-00000x.vmdk"

André

Reply
0 Kudos
juanpa909
Contributor
Contributor

Thanks for the answer.. No need to say I'm a newbie, right? ja.

is there a way I can convert an .img KVM VM to a VMware ESXi VM not getting a 2GB sparse disk? Another tool? With defaults settings when converting with qemu-img I got a 6 GB vmdk file and then used it as the VM disk, resulting in a waste of space since I got 2 disks of the same size when there (guess) should be one.

Reply
0 Kudos
a_p_
Leadership
Leadership

Sorry, I may have missed something here. Maybe it's just the name of the .vmdk file which is misleading, because ESXi does not support sparse disks (except for snapshots). Can you please provide a list of files which were created in the VM's folder and also post (attach) the VM's latest vmware.log file!?

André

Reply
0 Kudos
juanpa909
Contributor
Contributor

Files created where:

pentaho-test.nvram

pentaho-test.vmx

pentaho-test.vmsd

pentaho-test.vmxf

vmware-1.log

vmware.log

pentaho-test.vmdk

pentaho-test-s001.vmdk

If I remember correctly, pentaho-test-s001.vmdk was only created after changing some configurations to the SO in the VM. Or at least, after booting it.

Reply
0 Kudos
a_p_
Leadership
Leadership

I checked the log file and it looks like this is only a naming issue and all the files and settings seem to be ok. So nothing to worry.

Btw. I didn't see any trace of a second 6GB file!?

André

Reply
0 Kudos
juanpa909
Contributor
Contributor

Original vmdk file is pentaho-test.vmdk. I guess that's the only file that should be in the VM folder. Both pentaho-test.vmdk and pentaho-test-s001.vmdk weight 6GB aprox. What I want to do is to get rid of the pentaho-test-s001.vmdk because is wasting 6 GB of space and I don't know why it's there. I repeated the process and got the same everytime. And if I delete the file through SSH and try to run the VM, VMware throws the error attached.

I attached a couple of screen captures in case it helps, where shown what it looks like when browsing the datastore, before and after renaming the pentaho-test.vmdk to pentaho-test.vmdk.bak.

just in case, reading the log I found these lines that mention pentaho-test-s001:

2012-08-21T12:23:16.327Z| vmx| DISK: OPEN ide0:0 '/vmfs/volumes/502395c9-7d6fa0ad-7097-54e6fc802e8d/pentaho-test/pentaho-test.vmdk' independent-persistent R[]
2012-08-21T12:23:16.402Z| vmx| DISKLIB-VMFS  : "/vmfs/volumes/502395c9-7d6fa0ad-7097-54e6fc802e8d/pentaho-test/pentaho-test-s001.vmdk" : open successful (10) size = 5814222848, hd = 9791621. Type 8
2012-08-21T12:23:16.402Z| vmx| DISKLIB-DSCPTR: Opened [0]: "pentaho-test-s001.vmdk" (0xa)
Reply
0 Kudos
a_p_
Leadership
Leadership

With ESXi, each virtual disk consists of two files. A .vmdk header file (only a few hundred bytes in size) and the data .vmdk file.

The datastore browser usually only displays these two files as one, with the name of the header file with the size of the data file. According to the different screen shots the file sizes of these two files are ok. I guess the "display" issue is caused by the name of the data file. What you could do is to:

  • power off the VM
  • remove the VM from the host's Inventory
  • rename "pentaho-test-s001.vmdk" to "pentaho-test-flat.vmdk"
  • edit "pentaho-test.vmdk" to point to the renamed data file
  • add the VM to the Inventory again by right clicking the .vmx file

André

Reply
0 Kudos
juanpa909
Contributor
Contributor

Yes, as you said, it was a "display" issue. Did a ls -l via SSH and only -s001.vmdk file is 6 GB size.. pentaho-test.vmdk is just a couple of bytes size. I followed the steps and everything went fine. Info shown when browsing datastore from vSpherve Client lost me a little because it showed two 6 GB files, and I thought it was wasting space for nothing... but that was incorrect.

I still don't see things as with other VM -one that was converted with vConverter from a physical machine- but at least I know I'm not wasting space. Browsing the P2V VM folder from the GUI I see only one 10 GB vmdk file, but listing via SSH the two files are shown. If there is a way to correct this issue i'd really appreciate your help, just to know how things work.

Thanks for all the help!

Reply
0 Kudos