VMware Cloud Community
MrSpock77
Enthusiast
Enthusiast

Copying virtual disks without fragmentation?

Hi,

I have tried several ways to copy virtual disks (vmdk) between datastores (FastSCP, Datastore Browser, vSphere CLI), but it seems that none of them pre-allocate the files on the target (ESXi 4.1). I guess that may cause the vmdk's to be deframented, with degraded performance as result. I want to move a VM from one host to another, but I don't want to cause unnecessary fragmentation on the target.

How does ESXi handle file copy operations to prevent fragmentation (without VMotion)? I guess this is a limitation in the VMWare API's, but does that mean it won't be a problem?

Any help is appreciated. Thanks.

0 Kudos
9 Replies
DSTAVERT
Immortal
Immortal

I wouldn't worry too much about fragmentation. Have a look at the following knowledgebase article. http://kb.vmware.com/kb/1006810

-- David -- VMware Communities Moderator
0 Kudos
MrSpock77
Enthusiast
Enthusiast

David, thanks for the article.

Maybe I am exaggerating the influence of fragmented disks, but I am still a bit curious about how severe fragmentation will be in reality. It would be great to have a utility which can visualize the physical structure of the virtual disks.

In this case I will move the virtual disks to an empty datastore. Without any great knowledge about the file system in ESXi I assume that fragmentation will be zero. But if my assumption is wrong the vmdk may be spread over the physical storage anyway and degrading performance.

0 Kudos
geoffasare
Contributor
Contributor

Thanks for the article

0 Kudos
AndreTheGiant
Immortal
Immortal

Unfortuanally there is no tool to know VMFS fragmentation.

But rememeber also the fragmentation inside the vmdk that could be worst...

But usually you have really to do not care about this problem. Storage controller, especially from the SAN FC and iSCSI, have usual a lot of cache to mitigate this problem.

Andre

Andrew | http://about.me/amauro | http://vinfrastructure.it/ | @Andrea_Mauro
0 Kudos
MrSpock77
Enthusiast
Enthusiast

Fragmentation in the guest OS can be handled, but it's impossible to handle and monitor fragmentation in the VMFS. If anyone knows the technical details involved in copy operations to an empty datastore I'll gladly learn more about that.

Unfortunately I don't have a SAN (as I only have two hosts today), but I do have an integrated PERC H700 RAID Controller with 512 MB cache and the drives configured in RAID 1. Will that cause a noticeable difference compared to a SAN?

0 Kudos
AndreTheGiant
Immortal
Immortal

This is a big question!

I do not know your type of disks, but could be fine.

Andre

Andrew | http://about.me/amauro | http://vinfrastructure.it/ | @Andrea_Mauro
0 Kudos
a_p_
Leadership
Leadership

In your first post you mentioned Veeam's FastSCP. According to the Specs it pre-allocates the disk space.

from http://www.veeam.com/vmware-esxi-fastscp.html

Disk space preallocation

Veeam FastSCP performs automatic disk space preallocation on target ESX storage to prevent fragmentation.

...

Update 3.0.3 includes full VMware vSphere 4.1 support

André

0 Kudos
MrSpock77
Enthusiast
Enthusiast

André,

Well, according to Veeam that's not true for thick disks on ESXi. (With thin disks you'll get fragmentation over time anyway.)

"With ESXi, preallocation is only possible for thin disks, and in this

case we do preallocate. For thick disks and any other files, it is

simply not possible at the moment with VMware APIs."

The big question is why the API allows pre-allocation on ESX but not on ESXi.

0 Kudos
DSTAVERT
Immortal
Immortal

Unless you have slow local disks and a disk controller with no write caching you really don't need to be concerned. If you do have slow disks and no write caching on the controller that is where to spend your efforts.

-- David -- VMware Communities Moderator
0 Kudos