Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

How to remove/add VMs in mass via PowerCLI or Putty?

Posted on 2011-03-10
6
Medium Priority
?
1,004 Views
Last Modified: 2012-08-13
Just curious to see if anyone has actually been able to do this. VMware says they don't currently have a simple way to perform the task. When performing our DR refresh every quarter, we run into things like this issue that would vastly improve our lives, as well as many others I'm sure.

Thanks,
-Joshua
0
Comment
Question by:jwaszczak
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
6 Comments
 
LVL 42

Expert Comment

by:paulsolov
ID: 35099802
If doing many VMs use PowerCLI, for better yet download PowerGUI from powergui.org and install the vsphere powerpack.  Check it out, it will make your life much simpler
0
 

Author Comment

by:jwaszczak
ID: 35099834
Paul: I use PowerCLI (novice) and PowerGUI also (novice)....what I am looking for is the actual command/script to perform the aforementioned task. Thanks.
0
 
LVL 42

Expert Comment

by:paulsolov
ID: 35101087
depends on what you're trying to accomplish
0
Will your db performance match your db growth?

In Percona’s white paper “Performance at Scale: Keeping Your Database on Its Toes,” we take a high-level approach to what you need to think about when planning for database scalability.

 
LVL 16

Accepted Solution

by:
Danny McDaniel earned 1500 total points
ID: 35103016
there's been a couple of times I've wanted something that would do this, too.  I figured it would have to be a shell script though, because you would have to scan the datastore(s) to find all of the .vmx files.  I don't know if there's any way in the CLI or GUI to do this...since they interface with the host or VC and the VM's aren't in the inventory (otherwise, you wouldn't need to add them to inventory, right?).

I figured it would start with a 'find /vmfs/volumes -name *.vmx' and then pipe it into vmware-cmd to do the registering.  Whatever host the script was ran from would be the recipient of all of the VM's but at power-on, DRS would spread them out on different hosts.

0
 
LVL 42

Expert Comment

by:paulsolov
ID: 35103274
take a look at this link and see what you can do with powercli. Anything that you can do manually you can script.  What exactly is the goal?

http://www.simple-talk.com/sysadmin/virtualization/10-steps-to-kick-start-your-vmware-automation-with-powercli/
0
 

Author Closing Comment

by:jwaszczak
ID: 35142472
Dan: I've got the script for power off, remove from inventory, rescan all HBAs, register vm, move vms to/from hosts and power on working....Just need to adjust them some. Thank you for your help.
-Joshua
0

Featured Post

Fill in the form and get your FREE NFR key NOW!

Veeam® is happy to provide a FREE NFR server license to certified engineers, trainers, and bloggers.  It allows for the non‑production use of Veeam Agent for Microsoft Windows. This license is valid for five workstations and two servers.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you ever consider purchasing any Daossoft Software Products, DON'T expect any meaningful support - This article should convince you why!
Many businesses neglect disaster recovery and treat it as an after-thought. I can tell you first hand that data will be lost, hard drives die, servers will be hacked, and careless (or malicious) employees can ruin your data.
In this Micro Tutorial viewers will learn how they can get their files copied out from their unbootable system without need to use recovery services. As an example non-bootable Windows 2012R2 installation is used which has boot problems.
In this Micro Tutorial viewers will learn how to use Boot Corrector from Paragon Rescue Kit Free to identify and fix the boot problems of Windows 7/8/2012R2 etc. As an example is used Windows 2012R2 which lost its active partition flag (often happen…

704 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question