VMware Cloud Community
DanasK
Contributor
Contributor
Jump to solution

How to move VMs from one host to another without full VI and vMotion?

Hi,

could you help me with one issue?

I have two hosts with ESXi 3.5 U5 installed, which are connected to shared iSCSI storage (Openfiler) - VMs are installed on storage disk. My requirement is to have a cheap DR solution - in case of one host failure I need to move and start VMs on working host. How to achieve it without having VMware Infrastructure 3.5 and vMotion?

I have found this article:

http://www.virtualizetips.com/2010/04/how-to-move-a-vm-without-vcenter-or-storage-vmotion/

but ESXi does not have CLI by default, and RCLI needs VMware Infrastructure. So, how to move VMs between hosts (of course I mean "cold" move) without byuing any additonal VMware SW? Is it possible overall in my situation?

Thanks.

BR,

Danas

Reply
0 Kudos
1 Solution

Accepted Solutions
DSTAVERT
Immortal
Immortal
Jump to solution

If the virtual machines are running from shared storage (Both hosts see the same storage either iSCSI or NFS) then it is simple. If one host fails then browse the datastore on the working ESXi host. Navigate the folders to each virtual machine, right click on the VMX file and Add to Inventory. You will then be able to power on the virtual machine.

To move a VM from one host to another, as long as both hosts had the same processors, you can pause the VM on one host, browse and add the VM to the inventory on the second host and un pause.

If the virtual machines are on local storage but both hosts are connected to the same shared storage, clone the virtual machines on a daily basis from local storage to the shared storage. Use something like ghettoVCB http://communities.vmware.com/docs/DOC-8760 to do the clone. In the event of a server failure you will be able to browse the datastore, add to inventory on the shared storage and power on the cloned machine.

-- David -- VMware Communities Moderator

View solution in original post

Reply
0 Kudos
17 Replies
alefestaedist
Hot Shot
Hot Shot
Jump to solution

The iScsi storage is shared between host or better can you mount it from one store to another? just thought if you present the DR host with the same iscsi name you should able to mount the vmfs from there all you have to do is to manage the disk path inside the vmx file of the VM, but you may always do this:

1) attach the iscsi disk once to the DR host

2) create a VM and download the vmx

3) copy the disk path

4) download the vmx of all your VM's and change it accordingly to the path you copied before.

in case of a DR

1) attach the iscsi datastore and mount it

2) upload the modifide VMX to the VM

3) register the VM

Will try this solution since it is just a "thinkin out loud" right now.

Reply
0 Kudos
DanasK
Contributor
Contributor
Jump to solution

OK, but how to do this? I do not have CLI, as I mentioned before - is it possible to perform these actions using VI Client?

In my solution both hosts see the same disk mounted from Openfiler storage, i.e. they share the same disk where VMs from both hosts are located.

BR,

Danas

Reply
0 Kudos
alefestaedist
Hot Shot
Hot Shot
Jump to solution

humm you may use powercli on an esx 3.5.

from http://blogs.vmware.com/vipowershell/2009/05/powercli-is-official-whats-new.html

Does that mean that PowerCLI 4.0 only works with vSphere 4.0? Not at all, in fact you can use PowerCLI to manage ESX and VC all the way back to 3.0 and 2.0, respectively (see how confusing that is?) Best of all, the code you wrote for managing ESX 3.0 or 3.5 will most likely work on vSphere with no modification, and you can use it to manage and automate a mixed environment of all these versions.


Alex

DanasK
Contributor
Contributor
Jump to solution

OK, but I have ESXi, not ESX - does PowerCLI work with ESXi edition?

Thanks.

BR,

Danas

Reply
0 Kudos
lowteck
Enthusiast
Enthusiast
Jump to solution

we used to have a similar environment (2 ESX 3.5 hosts).

For our DR solution we used VCB to backup our running VM's to a network share.

In the event of a host failure or any roll back scenario, we could use the VCB backups and converter to restore.

low

alefestaedist
Hot Shot
Hot Shot
Jump to solution

yes it  works if you look at this "http://www.vmware.com/support/developer/PowerCLI/PowerCLI41U1/doc/viwin_install.pdf" you will see at page 7 the supported versions.

Alex

Reply
0 Kudos
alefestaedist
Hot Shot
Hot Shot
Jump to solution

Indeed I agree with Iow VCB is a great resource ,implemented this solution a couple of time but the main problem is the time you spent waiting to get back online.

Anyway is a safe solution so in a DR it give you the assurance that you "will"  get back online...LOL

Reply
0 Kudos
lowteck
Enthusiast
Enthusiast
Jump to solution

please award correct or helpful answers .

thanks....

low

Reply
0 Kudos
DanasK
Contributor
Contributor
Jump to solution

Hi,

I try to move VM using move-VM command in PowerCLI, but get a message, but...

[vSphere PowerCLI] C:\Program Files\VMware\Infrastructure\vSphere PowerCLI> move
-vm -vm Test1 -destination 192.168.30.102
Move-VM : 2011.03.15 15:33:11    Move-VM        Could not find VIContainer with
name '192.168.30.102'.

At line:1 char:8
+ move-vm <<<<  -vm Test1 -destination 192.168.30.102
    + CategoryInfo          : ObjectNotFound: (192.168.30.102:String) [Move-VM
   ], VimException
    + FullyQualifiedErrorId : Core_ObnSelector_SelectObjectByNameCore_ObjectNo
   tFound,VMware.VimAutomation.ViCore.Cmdlets.Commands.MoveVM

Move-VM : 2011.03.15 15:33:11    Move-VM        VIContainer parameter: Could no
t find any of the objects specified by name.
At line:1 char:8
+ move-vm <<<<  -vm Test1 -destination 192.168.30.102
    + CategoryInfo          : ObjectNotFound: (VMware.VimAutom...ner Destinati
   on:RuntimePropertyInfo) [Move-VM], ObnRecordProcessingFailedException
    + FullyQualifiedErrorId : Core_ObnSelector_SetNewParameterValue_ObjectNotF
   oundCritical,VMware.VimAutomation.ViCore.Cmdlets.Commands.MoveVM

The same situation occurs if I use ESXi host name instead of IP address. What's wrong in this case?

Thanks.

P.S. Both ESXi hosts share the same iSCSI storage, and VMs are located in this shared storage.

BR,

Danas

Reply
0 Kudos
jjj0923
Contributor
Contributor
Jump to solution

all good stuff here and I just learned alot.

too bad this does not work with esxi:

This section discusses how to connect to the target system and launch the Managed Object Browser (MOB).
The MOB is a Web-based server application hosted on all ESX hosts and vCenter Server systems. The MOB lets
you explore the objects on the system and obtain information about available properties and methods. It’s a
great tool for investigating server-side objects and for learning about the VMware Infrastructure object model.

Reply
0 Kudos
DanasK
Contributor
Contributor
Jump to solution

So, have I understood you correctly - there is no possibility to move VMs between hosts in my config having ESXi installed?

Thanks.

BR,

Danas

Reply
0 Kudos
jjj0923
Contributor
Contributor
Jump to solution

I would have to say "no" there is no way. I experimented for three hours today woth powercli and read lots of posts. Could not get it to work.

the best method I'd found this far is this:

show down the vm and copy the files from one server to san and then copy from san to new host datastore and creat a new vm but point to the files that have been copied.

or

use ghettovcb and ghetto-restore.

Jeff

Reply
0 Kudos
lowteck
Enthusiast
Enthusiast
Jump to solution

hey Danas,

There is a way, use vcb.

the downside is it is a time consuming restore process(using converter to deploy to new host)

the upside is you can setup vcb to do this on a schedule (although it can take a signifigant amount of time, you can do it while the vm is running).

and it is an effect method of disaster recovery.

low

Reply
0 Kudos
DSTAVERT
Immortal
Immortal
Jump to solution

If the virtual machines are running from shared storage (Both hosts see the same storage either iSCSI or NFS) then it is simple. If one host fails then browse the datastore on the working ESXi host. Navigate the folders to each virtual machine, right click on the VMX file and Add to Inventory. You will then be able to power on the virtual machine.

To move a VM from one host to another, as long as both hosts had the same processors, you can pause the VM on one host, browse and add the VM to the inventory on the second host and un pause.

If the virtual machines are on local storage but both hosts are connected to the same shared storage, clone the virtual machines on a daily basis from local storage to the shared storage. Use something like ghettoVCB http://communities.vmware.com/docs/DOC-8760 to do the clone. In the event of a server failure you will be able to browse the datastore, add to inventory on the shared storage and power on the cloned machine.

-- David -- VMware Communities Moderator
Reply
0 Kudos
jjj0923
Contributor
Contributor
Jump to solution

just found this...

I'll give it a try this afternoon.

http://www.mikedipetrillo.com/mikedvirtualization/2008/10/quick-migration-for-vmware-the-power-of-po...

update: close but no cigar - requires that source and desitnation hosts share datastore where VM to be transferred is kept.

Reply
0 Kudos
Camek
Enthusiast
Enthusiast
Jump to solution

Agree... We used this method for over a year until we got vCenter.  Works fine but you do have to do things like make sure to power off the VM and shared storge makes it a lot easier.

Reply
0 Kudos
DanasK
Contributor
Contributor
Jump to solution

"If the virtual machines are running from shared storage (Both hosts  see the same storage either iSCSI or NFS) then it is simple. If one host  fails then browse the datastore on the working ESXi host. Navigate the  folders to each virtual machine, right click on the VMX file and Add to  Inventory. You will then be able to power on the virtual machine.

To  move a VM from one host to another, as long as both hosts had the same  processors, you can pause the VM on one host, browse and add the VM to  the inventory on the second host and un pause."

YESSS! Thanks, DSTAVERT! Smiley Happy

Reply
0 Kudos