VMware Cloud Community
darkdragon001
Enthusiast
Enthusiast
Jump to solution

Merging snapshot disks failed

I tried to remove all snapshots with the corresponding button from vSphere Client. But at the end, my datastore was full. Some check and notice-popup if the free space is sufficient would be great for the future.

The disk is named as flat (in vSphere Client and the file is called disk-flat.vmdk). But the 12G disk is only about 2G big. I think this problem came from extending the disk size (it previously was a thin disk, but after expanding it was named as thick). Did someone of you notice this, too?

When having a correctly created flat disk, is merging always possible without the need of extra space?

The VM is still working, so I think there is no loss of data (only some data is written twice -> in one vmdk file and in the parent one). I am having some space at another datastore. I think there are vmkfstools on the ESXi hidden console (or SSH). Can I use them to create one vmdk file (descriptor + -flat.vmdk file) at the other datastore. Is this possible with the different snapshot delta-files or will this cause problems? Can I then just use the unix mv command to move them to the original datastore (after I have deleted the old files) or do I have to modify the descriptor file or something similar?

Thanks for your help!

Message was edited by: darkdragon001

Reason: snapshots for vmkfstools

0 Kudos
1 Solution

Accepted Solutions
a_p_
Leadership
Leadership
Jump to solution

To resolve the situation, I recommend you create a clone of the disk on the other datastore, test it and if it works you can delete the old disks and copy/move the clone to the original folder.

- create a new folder on the second datastore (e.g. "clone")

- shutdown the VM

- vmkfstools -i /vmfs/volumes/datastore1/YourVM/YourVM-00000x.vmdk -d thick /vmfs/volumes/datastore2/clone/YourVM.vmdk

- create a backup of the current vmx file

- open "Edit Settngs" and point the virtual disk to the cloned disk

- test your VM

- if everything is ok you can delete the vmdk files in the original folder, copy the cloned vmdk to this folder and edit the VM's settings

In the "vmkfstools" command you have to specify the current snapshot vmdk file as the source. You will find the snapshot name in the VM's settings or in the vmx file.

André

View solution in original post

0 Kudos
9 Replies
Dave_Mishchenko
Immortal
Immortal
Jump to solution

I would suggest reading through these

http://kb.vmware.com/kb/1015180

http://kb.vmware.com/kb/1007849

When you create a virtual disk, 2 files are created. Dave

VMware Communities User Moderator

Now available - vSphere Quick Start Guide

Do you have a system or PCI card working with VMDirectPath? Submit your specs to the Unofficial VMDirectPath HCL.

a_p_
Leadership
Leadership
Jump to solution

To resolve the situation, I recommend you create a clone of the disk on the other datastore, test it and if it works you can delete the old disks and copy/move the clone to the original folder.

- create a new folder on the second datastore (e.g. "clone")

- shutdown the VM

- vmkfstools -i /vmfs/volumes/datastore1/YourVM/YourVM-00000x.vmdk -d thick /vmfs/volumes/datastore2/clone/YourVM.vmdk

- create a backup of the current vmx file

- open "Edit Settngs" and point the virtual disk to the cloned disk

- test your VM

- if everything is ok you can delete the vmdk files in the original folder, copy the cloned vmdk to this folder and edit the VM's settings

In the "vmkfstools" command you have to specify the current snapshot vmdk file as the source. You will find the snapshot name in the VM's settings or in the vmx file.

André

0 Kudos
darkdragon001
Enthusiast
Enthusiast
Jump to solution

When merging is done when the VM is powered off, will there be an additional temporary delta file? Because you don't have any I/O access.

When not, I should not need any other free space, right?

@André: That's exactly the procedure I would like to do. vmkfstools doesn't tell me the option "thick" after -d. Only zeroedthick and eagerzeroedthick. Is only thick still possible? (I already know the differences: http://communities.vmware.com/thread/97227)

After this all is done successfully, I planned to extend the disk. Can this be somehow done with one command (copying and extending)? Or is it better to do it afterwise?

I just found the options --deletevirtualdisk and --renamevirtualdisk. Can't I just do this with the file browser within vSphere client? Or is it better to use vmkfstools for that?

Thanks for your help!

0 Kudos
a_p_
Leadership
Leadership
Jump to solution

When merging is done when the VM is powered off, will there be an additional temporary delta file? Because you don't have any I/O access.

When not, I should not need any other free space, right?

With the VM powered off, you will need no disk space for an additional delta file. However you will need additional space if the base disk is thin provisioned and also if you have multiple snapshots and you are not already on Update 02. (see Dave's links)

@André: That's exactly the procedure I would like to do. vmkfstools doesn't tell me the option "thick" after -d. Only zeroedthick and eagerzeroedthick. Is only thick still possible? (I already know the differences: http://communities.vmware.com/thread/97227)

"thick" and "zeroedthick" are the same. You can actually omit "-d thick" as zeroedthick is the default.

After this all is done successfully, I planned to extend the disk. Can this be somehow done with one command (copying and extending)? Or is it better to do it afterwise?

I would do one thing at a time. First make sure the cloned disk works as expected, then use the GUI to grow the virtual disk and last but not least expand the partition within the guest OS.

I just found the options --deletevirtualdisk and --renamevirtualdisk. Can't I just do this with the file browser within vSphere client? Or is it better to use vmkfstools for that?

There are some operations which can only be done on the CLI (like renaming)

André

0 Kudos
darkdragon001
Enthusiast
Enthusiast
Jump to solution

With the VM powered off, you will need no disk space for an additional delta file. However you will need additional space if the base disk is thin provisioned and also if you have multiple snapshots and you are not already on Update 02. (see Dave's links)

Okay, I have to get Update02. Is this possible with the free products (ESXi + vSphere Client)?

@André: That's exactly the procedure I would like to do. vmkfstools doesn't tell me the option "thick" after -d. Only zeroedthick and eagerzeroedthick. Is only thick still possible? (I already know the differences: http://communities.vmware.com/thread/97227)

"thick" and "zeroedthick" are the same. You can actually omit "-d thick" as zeroedthick is the default.

1) So the linked article is wrong?

2) I'm having some questions about the syntax:

vmkfstools -i /src.vmdk -d thick /dst.vmdk is valid (because "thick" as a word is not shown from the help of the command)

when ommiting the "thick" or "thin", do I have to ommit the "-d", too?

-> what's vlid:

vmkfstools -i /src.vmdk -d /dst.vmdk OR vmkfstools -i /src.vmdk /dst.vmdk

What about deleting using the --deletevirtualdisk option? is there any difference to removing it within the file browser?

Thanks for your help!

0 Kudos
a_p_
Leadership
Leadership
Jump to solution

Okay, I have to get Update02. Is this possible with the free products (ESXi + vSphere Client)?

Yes it is. If you installed the "Host Update Utility" with the vSpere Client, you can use this to patch the host.

"thick" and "zeroedthick" are the same. You can actually omit "-d thick" as zeroedthick is the default.

1) So the linked article is wrong?

Ok, I have to admit, they are no exactly the same. Both formats allocate the disk space during creation. The zeroedthick will wipe the data blocks as it accesses them the first time, thick doesnt.

2) I'm having some questions about the syntax:

vmkfstools -i /src.vmdk -d thick /dst.vmdk is valid (because "thick" as a word is not shown from the help of the command)

when ommiting the "thick" or "thin", do I have to ommit the "-d", too?

Yes, the "-d" is the parameter for the format. If you want to use the default format you just need to specify vmkfstools -i

What about deleting using the --deletevirtualdisk option? is there any difference to removing it within the file browser?

Personally I never used this. I think it's easier to delete the files from the datastore or using the "rm" command on the CLI.

Just make sure you delete the correct ones Smiley Wink

Thanks for your help!

You are welcome.

André

0 Kudos
darkdragon001
Enthusiast
Enthusiast
Jump to solution

Yes it is. If you installed the "Host Update Utility" with the vSpere Client, you can use this to patch the host.

Well I installed this. Now I'm having problems with the Updates: http://communities.vmware.com/thread/286459

Copying and moving the rest worked so far.

0 Kudos
DSTAVERT
Immortal
Immortal
Jump to solution

Try using VMware Standalone Converter to make copy of the VM. You can expand the disk at the same time you are cloning.

-- David -- VMware Communities Moderator
darkdragon001
Enthusiast
Enthusiast
Jump to solution

Try using VMware Standalone Converter to make copy of the VM. You can expand the disk at the same time you are cloning.

Thanks for your answer.

I considered doing this, too. But the problem is, that this VM has several disks configured as independent. I don't have the space to convert all of them. So I would have to leave them away in my conversion (or create a new VM only using this one vmdk). And at the end, I would have to readd them and so on. I think in this case, the option using vmkfstools was better.

0 Kudos