VMware Cloud Community
Horpel
Contributor
Contributor
Jump to solution

Copying VM Clone to remote host?

We currently have a Vcenter setup limited to 3 hosts.  I am trying to create a system for disaster recovery assuming our main Center were to fail.

Thus, I need to schedule a clone of the VM to take place every week - but then I need to copy that clone to a remote host that is not within the same datacenter although it IS on the same network.

Is there a way to accomplish this aside manually removing a host from Vcenter and adding the (4th) remote host every time I want to make the copy?

If I copy the clone to an external disk, I have to copy it again to the remote host.  That's 2 copy instances over the network and that can take hours to complete.

I would like to reduce it to a single copy and perhaps even automate it with a script, but I'm not all that familiar with the CLI in ESXi.

Any ideas are appreciated.

0 Kudos
28 Replies
Horpel
Contributor
Contributor
Jump to solution

Heh, the author of that page coincidentally blocked the view of total/available storage.

My NFS services were already setup, so I only needed to do the second half of what is described in that link - but it did it exactly as he/she did.

The share exists on a Dell MD1000 with around 3TB of storage (Approx 1.8TB available).

No Firewall inbetween.

0 Kudos
tomtom901
Commander
Commander
Jump to solution

Allright, it works without any problems in my lab. If possible, could you configure a seperate partition for this NFS folder (in example 100 GB) and see if that works? Although VMware says they do not put a limit on the maximum size, I think the 3TB is too big. Are you running 2008 or 2008 R2 as source for the NFS?

0 Kudos
Horpel
Contributor
Contributor
Jump to solution

I think I found a hardware solution. 

My Vcenter machine is 2008 R2 and happened to have 2 TB of unused storage sitting beside it.  I hooked it up via SAS with a PERC 5/E and partitioned 2TB into 3 different volumes and left one drive untouched for a spare.

Once I configured NFS for the server, I added it to each host and it recognized 500GB from each without a problem.

I am cloning my VM to the storage as I type this!

I will let you know the results once I've had a chance to fire it up.

I believe this is the resolution I was looking for and I appreciate all of the help!

0 Kudos
tomtom901
Commander
Commander
Jump to solution

Should work without any problems, I think it was still hitting the TB limit on your last attempt. If you could mark answers as helpfull or correct, that should help others in the future, and please, do let us know.

0 Kudos
Horpel
Contributor
Contributor
Jump to solution

If you could mark answers as helpfull or correct,


Already done.

Smiley Wink

0 Kudos
Horpel
Contributor
Contributor
Jump to solution

I've run into a problem here :smileycry:

I've accomplished what I needed to do except for a tiny piece of the puzzle.

I was able to clone the VM to the shared NFS storage.  No problem.

I was able to boot the VM from the independent host and it was useable, but understandably slow as molasses while running over the network.

I continued with the expected procedure of copying the cloned directory to the Independent host's Local storage using the "Move a file" function while browsing the shared datastore.  However, this is where I run into some issues.

First, it appears that the folder was indeed moved.  But some files remained on the shared storage (huh?).

After the move was complete (which required 6 hours), when I created the new VM using the previously configured disk, 2 things happened:

1. An additional directory was created on the same datastore and it contains a .vmx file, nvram file, a log file, and a few others...

2. The VM will not boot

I have recreated the VM several times and I keep getting the same results.

Why is the additional directory being created?

Am I missing something?

I have created VM's with an existing disk before and not had such problems...

0 Kudos
Horpel
Contributor
Contributor
Jump to solution

bump Smiley Sad

0 Kudos
tomtom901
Commander
Commander
Jump to solution

Perhaps the move didn't go OK.. The extra directory is being created because you added a new VM, and did not import the one from the existing VM. Try that next time, right click the clone's .vmx file and choose Add to Inventory:

Screen Shot 2013-11-25 at 19.24.00.png

0 Kudos
Horpel
Contributor
Contributor
Jump to solution

No Kiddin?  Didn't know that was possible.  I always create a new VM with an existing disk.

I will try your suggestion.  Thanks again!

0 Kudos