VMware Cloud Community
gregverhoff
Contributor
Contributor
Jump to solution

Moving VM out of ESX Cluster into stand alone ESXi server

I'm getting an error trying to move a VM from VI cluster into a standalone ESXi Server, has anyone had any luck doing this? I've tried the following: Get-VM -Name “CO-WS-TEST1” -Location (Get-VMHost ‘CO-WS-TEST1’) | Move-VM –Destination (Get-VMHost ‘CO-VM-TEST2’) where CO-VM-TEST2 is a stand-alone ESXi Server and CO-WS-TEST1 is located in an ESX Cluster with VI.

I'm getting the following error:

Get-VMHost : 4/13/2009 1:08:08 PM Get-VMHost VMHost with name 'CO-VM-TEST2' not found, using the specified filter(s).

At line:1 char:60

+ Get-VM -Name CO-WS-TEST1 | Move-VM -Destination (Get-VMHost <<<< 'CO-VM-TEST2')

Move-VM : Cannot bind parameter 'Destination'. Cannot convert "" to "VMware.VimAutomation.Types.VIContainer".

At line:1 char:48

+ Get-VM -Name CO-WS-TEST1 | Move-VM -Destination <<<< (Get-VMHost 'CO-VM-TEST2')

Thanks in advance for any help you can give me.

Reply
0 Kudos
1 Solution

Accepted Solutions
halr9000
Commander
Commander
Jump to solution

Is the ESXi system managed (e.g. with a full non-free license) by your vCenter? If it's not, then you can't do a move like this. You can probably fake it with enough scripting and help from some external tools to do the disk copy.






[vExpert|http://www.vmware.com/communities/vexpert/], PowerShell MVP, VI Toolkit forum moderator

Author of the book: Managing VMware Infrastructure with PowerShell

Co-Host, PowerScripting Podcast (http://powerscripting.net)

Need general, non-VMware-related PowerShell Help? Try the forums at PowerShellCommunity.org

My signature used to be pretty, but then the forum software broked it. vExpert. Microsoft MVP (Windows PowerShell). Author, Podcaster, Speaker. I'm @halr9000

View solution in original post

Reply
0 Kudos
5 Replies
halr9000
Commander
Commander
Jump to solution

Is the ESXi system managed (e.g. with a full non-free license) by your vCenter? If it's not, then you can't do a move like this. You can probably fake it with enough scripting and help from some external tools to do the disk copy.






[vExpert|http://www.vmware.com/communities/vexpert/], PowerShell MVP, VI Toolkit forum moderator

Author of the book: Managing VMware Infrastructure with PowerShell

Co-Host, PowerScripting Podcast (http://powerscripting.net)

Need general, non-VMware-related PowerShell Help? Try the forums at PowerShellCommunity.org

My signature used to be pretty, but then the forum software broked it. vExpert. Microsoft MVP (Windows PowerShell). Author, Podcaster, Speaker. I'm @halr9000
Reply
0 Kudos
gregverhoff
Contributor
Contributor
Jump to solution

Indeed, it is not managed by the VI Server. Do you know what the rationale behind not allowing this kind of operation? It seems a bit artificial to just not allow this kind of option.

Reply
0 Kudos
norregaard
Expert
Expert
Jump to solution

With the VI client you can do it like this:

Shut down the VM. Right click and choose "Remove from inventory". Use the VI client and connect directly to ESXi host. From there, browse to the datastore where the VM resides. Right click the .vmx file and choose 'add to inventory'.

This presumes the ESXi server has access to the storage where the VM currently resides.

halr9000
Commander
Commander
Jump to solution

Yeah, if you are using shared storage, then it's pretty quick & easy.

As to why you can't do it in a straightforward fashion, the answer is that VMware makes money on the management tools, frankly. The vCenter service and database do a lot.

Let us know if you are using shared storage or not and we can try to come up with a script.

[vExpert|http://www.vmware.com/communities/vexpert/], PowerShell MVP, VI Toolkit forum moderator

Author of the book: Managing VMware Infrastructure with PowerShell

Co-Host, PowerScripting Podcast (http://powerscripting.net)

Need general, non-VMware-related PowerShell Help? Try the forums at PowerShellCommunity.org

My signature used to be pretty, but then the forum software broked it. vExpert. Microsoft MVP (Windows PowerShell). Author, Podcaster, Speaker. I'm @halr9000
Reply
0 Kudos
gregverhoff
Contributor
Contributor
Jump to solution

I love their paid products and use them in my production environment every chance i get. That being said, it's over priced for our test environment, even at it's lowest tier.

I thought ESXi would be a great fit so i can keep the platform the same. It just seems silly that i can't do some simple thing that doesn't replace any functionality of their paid products.

Long story short, no shared storage so the remove from inventory option isn't possible.

In the end, i just enabled the SSH service on the ESXi host and copied to the test environment through SCP. Gimpy but serviceable. I'd love to see SSH be standard on the ESXi version as well, it's omision seems just as shortsighted to me.

Thank you all for your time, it was very much appreciated.

Reply
0 Kudos