Saturday, 21 August 2010

Guide to Using Double-Take To Accomplish a Minimal Downtime Fileserver P2V Conversion

Guide to Using Double-Take To Accomplish a Minimal Downtime Fileserver P2V Conversion


Scenario: you have been given the task to complete a P2V conversion of a large fileserver with minimal downtime

A solution: Use double-take to replicate the data drives to virtual disks, and then use VMware Converter on the O/S drive

Below is a brief walk-through:

1: Obtain the software (in this walk-through I am using Double-Take/HP StorageWorks Storage Mirroring Standard Edition for Windows, Version 4.5.0.1629.0, which comes packaged in SWSM4500_i386.exe)

2: Create a virtual machine with the same number of drives as the original and install Windows onto the O/S drive (this server does not need to be domain joined,) and letter the drives the same as the original (the drives don't need to be as large as the physical originals, just need to have enough free space to accommodate all the data)

Example:



3: Copy the setup_1629.exe obtained from unpacking SWSM4500_i386.exe, to your physical file server and virtual replication target server, and run

4: Double-Take install from the screen below is as follows:


Next >
I accept the terms in the license agreement
Next >
Client and Server Components
Next >
Complete
Next >
User Name: < up to you >
Organization: < up to you >
Activation code: EVAL
Next >
Next >
Next >


Next >



Next >
Next >
Install

Install Double-Take on both your physical file server and virtual replication target server

Note: the eval key is used here as this will only be a temporary installation of Double-Take

5: The physical file server and virtual replication target server, will both need restarts when the install completes

6: Open the HP StorageWorks Storage Mirroring Management Console (does not matter on which server you do this)


Cancel out of the Welcome to HP StorageWorks Storage Mirroring screen


If both the physical file server and virtual replication target server are on the same network, they will be auto-discovered as below, otherwise use the add server button to add to the console:


Right-click on both servers in turn and select 'Logon' (recommend using local administrator here)
Right-click on the fileserver and select 'New > Replication Set' and name
Tick the drive(s) on the fileserver to be replicated


Right-click on the replication set and select 'Connection Manager'
Choose the 'Target Server' and 'Mappings – One To One'


Click 'Connect'
Select 'Yes' to the 'Save changes now?' prompt
The replication will now start and just need to wait until the 'Mirror Status' is idle (will start at 0%)


7: From here; it is just a case of running VMware Converter on the O/S drive of the fileserver then attaching the data drive(s) from the replication target server to the VMware Converted fileserver O/S disk, shutting down the physical fileserver, and booting up the virtual one.

Thursday, 12 August 2010

Using VMware vSphere CLI to convert Sparse Disk to Thick

Scenario:

VMware virtual machines are being transferred from one hosting provider to another. You are given a desktop SATA disk with the virtual machines files on and you upload the files using the vSphere Client to a VMFS datastore connected to one of your ESXi servers. You right-click on the VMX file and import the machine. The disks appear as either 0 bytes in size or 'Type:' = sparse. You remove the disks and re-add, they still come up as 'Type:' = sparse, and the virtual machine will not boot


The solution:

Use the VMware vSphere CLI to convert the Sparse Disk to Thick using the following command, then remove the sparse disks from the VM and add the converted disks (keeping SCSI IDs in order):

Command syntax:

vmkfstools.pl --server=IPADDRESSOFVMHOSTorHOSTNAME -i /vmfs/volumes/SOURCEPATH/SOURCEFILENAME.vmdk /vmfs/volumes/DESTINATIONPATH/DESTINATIONFILENAME.vmdk


Example:

C:\Program Files (x86)\VMware\VMware vSphere CLI>vmkfstools.pl --server=esxi01 -i /vmfs/volumes/"test store"/DC1/scsi0-0-0-DC1.vmdk /vmfs/volumes/"test store"/DC1/DC1_0.vmdk

Enter username: root
Enter password:


UPDATE: Or you could just storage vMotion the sparse disk and this will have the same affect.