VMware Cloud Community
JBraes
Enthusiast
Enthusiast

How to migrate vm's from ESX 2.5.3 to ESX 3.0.1

How do i migrate VM's from a esx 2.5.3 host to a new 3.0.1.

We do not use virtualcenter.

The esx 3.0.1 host has no acces to the 2.5.3 VMFS datastores.

I suppose all of this is done through the use of the command prompt, but how ?

Where do I copy the config and vmdk files ?

How do I import ?

etc.. etc..

Reply
0 Kudos
21 Replies
waynegrow
Expert
Expert

The 3.0.1 host would need access to the 2.5.3 datastores to us vmkfstools. Can that access be added/zoned?

Reply
0 Kudos
acr
Champion
Champion

On the ESX 3 Server at the command line, do a man on vmkfstools and look for the --migratevirtualdisk..

You use vmkfstools -M

Reply
0 Kudos
JBraes
Enthusiast
Enthusiast

Can someone help me a little more with this.

I copied the vmdk file from the old esx 2.5.3 over to the new 3.0.1

Should i create subfolders in my vmfs ?

Are there rules for creating subfolders ? or can i simply issue a mkdir command.

when I use th vmfsktools - M command it creates an additional -flat file.

What is the purpose of this command and what should it do ?

Reply
0 Kudos
davidbarclay
Virtuoso
Virtuoso

The 3.01 release made this a little easier with native tools, but if you aren't that familiar with them you might want to take a look at Vizioncore's esxMigrator. It works well.

http://www.vizioncore.com/esxMigrator.html

(I don't work for them or have any affiliation)

Dave

Reply
0 Kudos
dpomeroy
Champion
Champion

vmkfstools -M, --migratevirtualdisk

Migrate an ESX2 virtual disk to an ESX3 virtual disk.

the flat file is the actual disk and the vmdk is a pointer. There was a good thread that had a description of all the new files you see on a VMFS3 volume, I cant find it right now.

Reply
0 Kudos
JBraes
Enthusiast
Enthusiast

All our budget went to the new esx server:) so no money for nice and easy to use tools.

I really need to know how to do this step by step , as i need to migrate about 40 VM's and management demands a step-by-step migration guide.

For some reason, all these things were better documented for the 2.5.X version.

EMC (VMWare) doesn't seem to think about us users that don't have a virtualCenter.

Reply
0 Kudos
JBraes
Enthusiast
Enthusiast

hi mister pomeroy, (sounds a bit like a nice expensive french wine Smiley Happy )

Thanks for helping me understand this. So we have got a new way of dealing with vmdk files, would have been nice if they mentioned these things in their official student guides.

For some reason I feel that the 2.5.X student guides were more difficult and gave you a lot more info on what is happening underneath the gui.

Ok all that said ..

What is next after i performed the command.

I copied the vmx file also in this directory. I suppose I import it ?

Do I need to run the hardware update thingie ??

Thanks

Jeroen

Reply
0 Kudos
acr
Champion
Champion

Jeroen

So you got the vmkfstools -M working, I think that mostly you are there..

Yes you create a folder for each VM, this will contain all the files relating to that VM..

Its often known by the VM's name.. (or at least it is when done via VC)

After you copied over the VM and ran vmkfstools -M

Did you copy over the .vmx as well

The new .vmdk files are..

*.vmdk = Header file for the *-flat.vmdk file.

*-flat.vmdk = File with all of the actual data.

The esxRanger would simplify this entire process..

Message was edited by:

acr

Wimo
Hot Shot
Hot Shot

This is how I do it. FTP the 2.5 vmdk files to the vmfs3 volume (/vmfs/volumes/SANx - or /localx, whatever you call it). Then create a new VM with a new disk. Delete that disk.

Run the following command - note that the -d thin switch is optional, that is to thin provision the disk, up to you.

vmkfstools -i /vmfs/volumes/SANx/diskfile.vmdk -d thin /vmfs/volumes/SANx/vmname/diskfile.vmdk

This will import the disk into the VM's directory. Repeat for all disks. Then add the disk(s) to the VM, C drive first. If it won't let you add more than one, you will have to upgrade virtual hardware for each as you go (right click VM, that option will be there).

Upgrade the hardware if you didn't in last step. Power on the VM, and install VM tools. You will probably have to reconfigure the network settings.

I never tried the -M switch.

kegwell
Enthusiast
Enthusiast

Here is the process that I am using, but it has yet to work. I must be missing a step or two...

1) Export the VM from the ESX 2.5 server. All VMs on this server are on local disk (not on a SAN). I do this by running: vmkfstools -e /path-to/exported.vmdk /path-to/vmdk-being-exported.vmdk

2) SCP all the files the export command from step 1 spits out to the new ESX 3.01.

3) The ESX3 server is SAN attached and all VMs run from SAN. I manually create a directory in /vmfs/volumes/.../new-vm/

4) Then, on the ESX3 server I run, vmkfstools -i /temp-location-of-SCPed-filed/exported.vmdk /vmfs/volumes.../new-vm/

5) I then CD to the /vmfs/volumes/.../new-vm/ directory

6) I see a couple new files, exported.vmdk and exported-flat.vmdk

7) Now what? I tried registering it, but it failed. I tried to SCP the .vmx, nvram, etc. files from the ESX 2 /home/vmware/.../* to the ESX 3 server and it still doesn't work. What am I doing wrong?

Thanks...

Reply
0 Kudos
Wimo
Hot Shot
Hot Shot

Did you ever actually create a new VM?

Looks like you're doing a more complicated version of my way. It looks to me like YOU are creating a directory with the name of the VM. Instead, leave the disk files one level up from there (volumes), then create a VM with the VI Client - which will create the directory - and either add the disk(s) during creation (which will leave them in that one-up directory), or just create a disk while making the VM, then delete it, and then import your disk files into that directory and attach them then.

I still think you have extra steps you don't need, notably the export at the beginning.

Reply
0 Kudos
kegwell
Enthusiast
Enthusiast

Thanks for the quick reply. From my understanding, I have to use the vmkfstools export since I have to export the VM from local disk on the ESX 2 server onto a ext3 partition, then SCP it to a ext3 partition on the ESX 3 server, the import it to the VMFS partition on the ESX 3 server. I might have failed to metnion that earlier. Thanks again. I will give it a go and report back.

Reply
0 Kudos
kegwell
Enthusiast
Enthusiast

That worked! Finally a solution. This has been driving me nuts. I'd give you points, but I didn't start the thread. Thanks again.

Reply
0 Kudos
Wimo
Hot Shot
Hot Shot

A lot of things are going to drive you nuts. But this is the place to go to get your head repaired...

Glad I could help, points or no points.

Reply
0 Kudos
azn2kew
Champion
Champion

I can't get the Veeam FastSCP to connect to my ESX3.0 server. I got some sort of authentication error which I connect using "root" account. I can logon to ESX3.0 with my root account using Virtual Infrastructure Client 2.0 with same credential?

Anyone has any idea? I have tried to telnet "telnet serverip 22" and got protocol mismatch error. In case my authentication has issue, i'm still in VI Client 2.0 console can I add another user with administrative rights? Please advice! Thanks.

If you found this information useful, please consider awarding points for "Correct" or "Helpful". Thanks!!! Regards, Stefan Nguyen VMware vExpert 2009 iGeek Systems Inc. VMware vExpert, VCP 3 & 4, VSP, VTSP, CCA, CCEA, CCNA, MCSA, EMCSE, EMCISA
Reply
0 Kudos
azn2kew
Champion
Champion

Now, I've made new changes and I can FastSCP to my host but I have problems being transfering the .vmdk files with permission denied. My virtual machine has been turned off so why is it having permission denied? Anyone has any ideas? Please advice.

here's the error:

Cannot open Local file /vmfs/volumes/454096da-aad51528-17d4-0015c5e7ea01/Citrix008/Citrix008-flat.vmdk: Permission denied

at ./.ftpcp.pl line 15

Error: Cannot put file /vmfs/volumes/454096da-aad51528-17d4-0015c5e7ea01/Citrix008/Citrix008-flat.vmdk to \psc03\psc_files\mis\office_files\VM_Backup_Images\Citrix008\Citrix008-flat.vmdk

If you found this information useful, please consider awarding points for "Correct" or "Helpful". Thanks!!! Regards, Stefan Nguyen VMware vExpert 2009 iGeek Systems Inc. VMware vExpert, VCP 3 & 4, VSP, VTSP, CCA, CCEA, CCNA, MCSA, EMCSE, EMCISA
Reply
0 Kudos
azn2kew
Champion
Champion

I made new changes when connecting using Veeam FastSCP. You must select "Proceed with root privileges after login" and must enter your root password.

Than you shouldn't have any permission denied again.

Hope this help for you too!

If you found this information useful, please consider awarding points for "Correct" or "Helpful". Thanks!!! Regards, Stefan Nguyen VMware vExpert 2009 iGeek Systems Inc. VMware vExpert, VCP 3 & 4, VSP, VTSP, CCA, CCEA, CCNA, MCSA, EMCSE, EMCISA
Reply
0 Kudos
tim_oudin
Contributor
Contributor

I can't get the Veeam FastSCP to connect to my ESX3.0

server. I got some sort of authentication error

which I connect using "root" account. I can logon to

ESX3.0 with my root account using Virtual

Infrastructure Client 2.0 with same credential?

By default root is not allowed SSH login. You have options, all of which are well documented and common to many default Linux/UNIX installations. First, connect as an unprivileged user then move your files around as necessary from the service console. Second, and less favorable option, allow root login by altering /etc/ssh/sshd_config, set 'AllowRootLogin no' to 'AllowRootLogin yes'. Follow with `service sshd restart`.

Anyone has any idea? I have tried to telnet "telnet

serverip 22" and got protocol mismatch error. In

case my authentication has issue, i'm still in VI

Client 2.0 console can I add another user with

administrative rights? Please advice! Thanks.

SSHD is running on port 22.

Cheers.

Reply
0 Kudos
azn2kew
Champion
Champion

Hi,

I was able to proceed without that "permission denied" already. But while doing transfer it timeout with this error log when using FastSCP.

Data connection opened successfully. Starting data transfer:

From: /vmfs/volumes/454096da-aad51528-17d4-0015c5e7ea01/Citrix008/Citrix008-flat.vmdk

To:
psc03\psc_files\mis\office_files\VM_Backup_Images\citrix008\Citrix008-flat.vmdk

FTP timeout. No data transferred in the last 20 seconds

It copied about 560MB of data on citrix008-flat.vmdk and stop! Do you have any ideas how to change this timeout thing.

Under options from FastSCP it shows Tools->Options-SSH Timeout sets to 20000 milliseconds? Anyone know this means? Please help!

Does anyone has any alternative to move .vmdk file from ESX Host to Windows File server???

If you found this information useful, please consider awarding points for "Correct" or "Helpful". Thanks!!! Regards, Stefan Nguyen VMware vExpert 2009 iGeek Systems Inc. VMware vExpert, VCP 3 & 4, VSP, VTSP, CCA, CCEA, CCNA, MCSA, EMCSE, EMCISA
Reply
0 Kudos