Zero Out Free Space

This is post #10 in my December 2013 series about Linux Virtual Machine Performance Tuning. For more, please see the tag “Linux VM Performance Tuning.” When we talked about the rationale behind storing logs centrally one big reason was thin-provisioned virtual disks. Those disks grow over time because filesystems on a virtual machine currently have no way to tell the underlying storage that they’re done using certain blocks on disk. There is a way to make these VMs thin again, and I wrote about it as step 9 in my guide to preparing Linux Template VMs. In short, we run a script on the VM that writes zeroes to most of the free space on the VM: #!/bin/sh # Determine …

Read More

Preparing Linux Template VMs

Dan over at Bashing Linux has a good post on what he does to prep his template VMs for use with Puppet. He’s inspired me to share how I prepare my Linux VMs to become a template. He’s got a few steps I don’t have, mainly to prep for Puppet, and I have a few steps he doesn’t have. One big difference is that I don’t prepare my template images for a particular configuration management system, but instead bootstrap them once they’re deployed. Why? I use my templates for a variety of things, and sometimes the people who end up with the VMs don’t want my management systems on them. It also means I have to handle some of what …

Read More

Can't Change Virtual Disk Formats When Targeting a Datastore Cluster

As I work more and more with vSphere 5 I am finding a few anomalies. One of them appears to be a bug where you cannot switch a VM’s disk format during a storage vMotion, when you target a datastore cluster. To be more precise, it looks like you should be able to, but it doesn’t end up happening. The workaround is to disable Storage DRS for that VM, target a datastore directly, then edit the Storage DRS settings afterwards to re-enable DRS for that VM. This is what it looks like when I try. I select “thin provision” from the virtual disk format, choose a datastore cluster (in this case it’s my “Tier 2” cluster), and click next:   …

Read More