We have a VMware ESXi 4.0 installed on a SD-card and our datastore is on a dedicated internal RAID array. Our datastore is running out of space, so we have decided to recreate our internal HDD array from a RAID10 1,2TB* to a RAID5 2,1TB** to give us more disk space for the datastore. In order to do this, we need to recreate the array - hence, killing the existing datastore.
What is the best way of migrating our datastore from the old array to a new one using vSphere? Any tips would be appreciated. Many thanks.
* Currently we have 8 x 300GB HDDs as RAID10 which gives us a 1,2TB datastore
** We want to setup the same 8 x 300GB HDDs as RAID5 which will give us a 2,1TB datastore
If the old datastore gets destroyed you need to move all files from the datastore to a temporary datastore if you do not want to do a backup and a restore. Depending on your license you can move the guests completely while they are online (svMotion) or offline (vmotion). Recreate the datastore and move them back.
AWo
Thanks for your quick reply AWo! We are using the free ESXi version - are we also able to download/use "svMotion" or "vmotion"? If not, how do we going about moving the files?
You need vCenter for vMotion or if you only have one free ESXi server you need the remote CLI:
http://www.vmware.com/pdf/vsphere4/r41/vsp4_41_vcli_inst_script.pdf
http://www.vmware.com/support/developer/vcli/vcli41/doc/reference/index.html
Look for the "vifs" command.
AWo
Thanks for the feedback. I have had a look at the vSphere CLI. When trying to run "vifs.pl", I get the following error:
Error connecting to server at 'https://localhost/sdk/webService': Perhaps host is not a vCenter or ESX server
Any ideas?
Just an idea... could I use the inbuild file manager within the vSphere client to copy the dirs from the datastore and then with the new array, recreate the dirs and re-copy back?
Post the command you have used and describe what you try to do.
AWo
Whoops, my mistake - I had a typo. Nevertheless, when I do a:
C:\Program Files (x86)\VMware\VMware vSphere CLI\bin>vifs.pl --server 192.168.1.1 --listds
The Content Listing is blank. Via the CLI, how can I view my datastore name and get a listing of the folders and files within? Can I use the CLI to copy a whole dir structure?
vifs.pl --server <IP of your ESX or vCenter Server> --username <vCenter or ESX user name> --password <the users password> --listds
To copy a file:
vifs.pl --server <IP of your ESX or vCenter Server> --username <vCenter or ESX user name> --password <the users password> --move <source> <target>
See: http://www.vmware.com/support/developer/vcli/vcli41/doc/reference/vifs.html
AWo
With the syntax I used, it prompted me for a username and password. Regardless, I put the whole syntax in as you mentioned and my Content Listing is still blank
Using the vSphere client and file browser, I see that my dirs have at least 10 files - is there a way of copying a whole dir as it would be a bit tedious to have to copy each file individually - or what about using the file browser itself and the upload dir function?
Thanks for your continued help.
I tried it with "--listds" and everything was fine.
You can copy the whole dir by using "vifs.pl --username <user> --password <password> --server <ESX or vCenter IP> --copy "[<Datastore Name>] /<Source Dir>/" "[<Datastore Name>] /<Target Dir>/"
Be aware that this is case sensitive. Do you use the ESX IP address and the root user defined there?
I tried it and it worked.
AWo