Friday, March 20, 2015

Moving a VMware machine from one physical machine to another.

First, SSH has to be enabled on each of the physical hosts.
on the VM host, hit F2 and log in.
Go to Troubleshooting Options.  I turned on both the ESXi shell and the SSH shell, then restarted management agents, I don't know if I had to do all that, but I did.
Once you've done that, go to your vSphere and go to the Configuration tab.
Click Security Profile under Software.
Click Properties under firewall, I put a check mark in SSH Client and SSH server.

This would be done on both physical servers.


I used Putty to connect to the server that housed the machine I wanted to move.  Once your connected, type:

scp -r /vmfs/volumes/(your datastore name)/(your VM host folder) root@ip.of.new.server:/vmfs/volumes/place/it/goes

It should then ask for the root password.  Those are not two separate commands, there's a space between (your VM host folder) and root, but it would all be on the same command.

SCP lets you move files, SCP -r lets you move directories, if you forget the R you'll get an error that its not a regular file.
I would also get "no such file or directory" the first couple of times I tried this, ESXi is case sensitive, so make sure you use proper case.

I also had issues finding out the path of my files.  To find out your path, go to your vSphere Client.
Click Configuration
Under Hardware, go to Storage
click on your datastore, this gave me the /vmfs/volumes/ part, the hex identifier can be replaced with the name you gave your datastore, this is located under identification.
You can right click the datastore, and go to Browse Datastore to see the folders that hold your virtual machines.


Also, in my environment I was only getting transfer rates of 4-5mbps.
This is on a gig network, with 10k SAS drives, transferring from a G7 to a G5 HP server.

**********
Also....

If you go have a big enough drive, you can copy the files to your computer, and then upload them to the other server.  This is the video that helped me.
https://www.youtube.com/watch?v=XSZdWQMynhw&index=4&list=PLe-uhdcSI8Z3FSPcGdUvnurCcGuW4vESm

*****************Update on transfer speed*******************
I was able to double the 4-5mbps by changing the raid of the target server.  I was running RAID 5, changed to RAID 10 and saw 9/10mbps,  So the limitation before was the Hard Drive speed, which makes sense and I should have known, but I guess I just took for granted.

No comments:

Post a Comment

Samsung refrigerator not making ice

How I got my stupid fridge to work again. Normally, I press/hold the blue button till it chimes. Well that didn’t work this time. Darn. I re...