I had an esxi host with a bad disk drive. Even though it was raided and a simple shutdown, replace the drive, boot, and select auto repair;  the server owner wanted the virtual machines backed up.

There was no urgency as there would be no outage since the virtual machines were not in use at the moment.

The host is an HP DL360 G6 with 2 volumes.  The first held hypervisor and two templates.
The second volume was over a terabyte and housed twenty-two virtual machines.  Each VM had a 62 gigabyte vmdk.

There are a few ways to handle virtual machine backups.  If you don’t have a backup solution in place, probably the easiest way would be to use the vsphere client and use the “export OVF template” option under the File/Export menu. The Open Virtualization Format is used to transport virtual machines. One advantage is that it will compress your VMDK files which is a good thing if you don’t have a large amount of free server space to store copies of the virtual machines.

Server space was not an issue so I thought I would simply move the virtual machines to storage.

I mounted the NFS directory and brought down the virtual machines. I used the “Datastore Browser” and selected the datastore where the Virtual Machines are stored.  I selected a folder and clicked move.  There is a warning message which you can OK through and then selected the NFS mount where it will go.

This process will move the files of the virtual machine but leave the configuration on the host. If you were to reboot, you would see “unreachable” for the VM entry of any virtual machine you moved.

Running the moves serially; I found 66 gigabytes(the vmdk and the other files) would move on average 20 minutes. If I started more moves, the time obviously would increase.  I found going past 4 moves would really start to bog things down and the client would have issues.   One case I tried 10 moves and went to bed.  The next morning I found there were 4 timeout errors and about 5 moves left with the longest taking about 66 minutes.  A quick check of the folders found that all had moved in about 2 hours or so.  The client was confused.  I terminated the migration time windows.

One thing to consider is there isn’t a label on what is being moved.  Just the process bar.

For the 22 virtual machines, it was about 8 hours or so to move them.

After doing the disk swap; I started the process to move them back.  The time was a less as I did that 10 VM move through the night and finished up with a couple batches of 4.

The host needed a reboot to recognize they had returned.  After that; I powered them up and there were no issues.

This was not the most efficient way to handle the disk swap and backup.  However, it was one of the rare times to simply play and see what happened.

Advertisements