How do I 'batch' closing of a large number of virtual machines on a single order?

We have performance issues with some programs that a large number of machines virtual shutdown.  Steve Jin here mentions on his blog that there is a number of API and batch processing.  I can't find on the subject if and would just like to send a command to stop, a large number of virtual machines.  Multi-threading applications for judgment has not been effective or possible.

If someone could point me to the right direction, I would be grateful.   Thank you!

Sean Clark - vExpert 2009, VCPX3 - http://twitter.com/vseanclark - http://seanclark.us - http://vmunderground.com

Hey Sean,

I'm not familiar with batch API too many orders, but I'm guessing that you're referring to:

Turning the power on

Power off

As you probably know, there are a lot of API command to power on a set of virtual machines, but there is not one to turn off. It maybe an internal/private API to power off the coast, but I have not heard/seen it.

If your question is around Steve Jin VI Java API, maybe hit him up on top of this blog, you probably a more precise answer and if this isn't the case, I think he'll be able to help directly as well.

=========================================================================

William Lam

VMware vExpert 2009,2010

VMware VCP3, 4

VMware VCAP4-DCA

VMware scripts and resources at: http://www.virtuallyghetto.com/

Twitter: @lamw

repository scripts vGhetto

Introduction to the vMA (tips/tricks)

Getting started with vSphere SDK for Perl

VMware Code Central - Scripts/code samples for developers and administrators

VMware developer community

If you find this information useful, please give points to "correct" or "useful".

Tags: VMware

Similar Questions

  • Help with Script to add Hot CPU/Mem to large number of virtual machines

    So I found these two functions of http://ict-freak.nl/2009/10/05/powercli-enabledisable-the-vm-hot-add-features/comment-page-1/#comment-14664

    He

    seems to be only for a unique virtual machine, but I need to set up

    their making hundreds of multiple servers.  Is it possible to implement

    foreach ($vm to $devVMs)

    $devVMs = c:\listofvms.txt

    in

    the script to point to a list of virtual machines, such as a list of Windows 2008 64-bit

    VMs, vms 32 bit Windows 2003 as another list etc. instead of making a virtual machine

    at the same time.

    The two functions are for features to add memory to warm and the VM OS per CPU.

    Function Enable-MemHotAdd ($vm) {$vmview = Get - vm $vm |} Get-view$ vmConfigSpec = New-Object VMware.Vim.VirtualMachineConfigSpec$ extra = New-Object VMware.Vim.optionvalue$ extra. Key = "MEM.hotadd" $extra. Value = "true" $vmConfigSpec.extraconfig += $extra$ vmview. ReconfigVM ($vmConfigSpec)}

    Function Enable-vCpuHotAdd ($vm) {$vmview = Get - vm $vm |} Get-view$ vmConfigSpec = New-Object VMware.Vim.VirtualMachineConfigSpec$ extra = New-Object VMware.Vim.optionvalue$ extra. Key = "vCPU.hotadd" $extra. Value = "true" $vmConfigSpec.extraconfig += $extra$ vmview. ReconfigVM ($vmConfigSpec)

    }

    Any help is greatly appreciated.

    You can save this script in a .ps1 file.

    After have connected you to the vCenter (Connect-VIServer), you run the script from the prompt PowerCLI.

    .\myscript.ps1
    

    It will read all the guestnames that you stored in the .txt file and for each of these calls to the function.

    If you need to address another group of guests you modify the contents of the .txt file and run the script again.

    ____________

    Blog: LucD notes

    Twitter: lucd22

  • Migration of a large number of virtual machines between servers

    I have a single ESX server and VirtualCenter (vSphere 4).

    I need to migrate all my virtual machines (30) to a new server, I'm.  They are all turned off (I use them as test beds a small number at a time).

    For the transition, I added two servers in my data center vCenter. I can migrate each VM individually, but it will be extremely painful and long.

    If anyone can recommend a way for me to start moving all virtual machines and let it run for a few days or longer, however it takes, perhaps through orders in the Service Console or?

    Thank you!

    As long as the virtual machine have several virtual disks on different banks of data/files, you should be able to copy files by using for example Veeam FastSCP.

    If you have disks to different stores of data/files, you will need to reconfigure the virtual computer on the target (changing settings or edit the VMX file) because of UUID data warehouses.

    Before copying the files on the new host:

    -remove all attached CD/DVD or ISO virtual machine

    -Reset default CPU flags, see KB1011294 - a host processor is not compatible error message...

    André

  • How to count the number of virtual machines that are turned on.

    Try to learn this PowerShell stuff... oh what fun.

    Given that maintenance mode does not work unless you manually VMotion servers or stop them, I am trying to program a loop to make sure that all VM on the host is disabled.

    How can I get the value of "#PoweredOn" in this statement so that I can compare it? I want to leave the loop when the number of virtual machines under voltage = 0.

    function shutdownGuests()

    {

    Get-VMHost HOST1. Get - VM | Stop-VMGuest

    $num_powered_on = $null

    {}

    Write-Host $num_powered_on

    Write-Host $PoweredOn

    $num_powered_on = get-VMHost HOST1. Select-Object Name, @{Name = "#PoweredOn"; Expression = {($_ |)} Get - VM | Where-Object {$_.} PowerState - eq "Receptor"} | Measure-Object). {{Count}}

    Start-Sleep - seconds 10

    } While that ($num_powered_on & gt; 0)

    #Loop and check to see if all VMs are closed, and then return to main()

    }

    Try something like this:

    while (get-vmhost XXX | get-vm | where { $_.PowerState -ne "PoweredOff" }) {
        # Wait a while
    }
    
  • How to enable 3D Graphics and HD audio on a virtual machine?

    How to enable 3D Graphics and HD audio on a virtual machine?

    The 3D support is supposed to allow the possibility for the graphical interface of Windows Aero, in order to test with a Windows 7 if possible.

  • How to use an iso of media store in a virtual machine?

    I know this is a stupid question, but I can't understand how to use an iso of media store in a virtual machine in a laboratory Manager configuration. I copied on an ISO in my store of media NFS and its all synced to the top and available to use. But what I want to know is, is there a way we can map the iso in a virtual machine in the config of lab manager and make it look like cd?

    Pls advice.

    just a couple first checks:

    1. the ISO standard appear in the media section of the organization who needs to use it.

    2. the NFS store is accessible by all esx hosts used in this organization

    3. go to the page of the console for the virtual machine that needs to use it.

    4 right-click the VM name to get the full menu

    5. Insert the CD

    6. choose the ISO from the menu drop down.

    All this is in the user manual.

    Kind regards

    Jon Hemming, b.SC., RHCT, VMware vExpert 2009
    http://Twitter.com/vJonHemming

    If your question or problem has been resolved, please click the "right answer".  If someone helped him, please click "useful answer.

  • HELP - how to get the number of virtual machines on a data store?

    Looking at the inventory of the data store in the VI client, there are a "number of Virtual Machines:" according to the General information for the Summary tab... I'm looking for a script that retrieves this information for me...

    I started the script but I'm stuck... I am very new on this...

    Get-Datastore. WHERE-object {$_ .name - like "wlp" ' "} #this gives me all the data which are not local warehouses

    Could someone give an overview on how to script to retrieve the number of virtual machines on data warehouses...

    Thank you, Lee

    Sorry, something went wrong with the copy - paste

    Get-Datastore | where {$_.Name -like "vmfs*"} | Sort-Object -Property Name | %{$_ | select @{N="DSname"; E={$_.Name}},
                                                                          @{N="VMcount";E={($_ | Get-VM | Measure-Object).count}}}
    
  • How to make basic corrections to a large number of images

    I have to make basic corrections to a large number of images that will appear in separate

    batch and which must be kept by their separate lots. I can't mix.

    Create a new catalog for each lot? What should I do, if anything with the collections and

    What is the fastest way to make basic corrections to hundreds of images? Some of the images

    are similar but a lot are not.

    Oh, I was also wondering if Lightroom allows you to import via FTP or if I need to download the

    images and then import them.

    Thank you!

    I suggest you keep in a single catalog. You could import each lot in its own folder. All the images are going to require the same settings, could you highlight all the and activate the AutoSync to speed up the work. I do not know that collections would be advantageous if you need group different types of images. This is something for you to decide.

  • How to create an application for a large number of version Blackberry?

    I am doing a project for a large number of Blackberry version (9100, 9330, 9650, 9800, 9810, 9850). And it is difficult to define the position of button, label... for the other version. Can someone give me some tips to create quickly and easily.

    Thank you very much.

    --------------

    I don't think that there is a quick answer to this question.

    An option to help you is to determine the actual size of the font that you use and do you manage screen objects on this basis.

    In addition, you can use relative positions for page layout.  And you must factor into the question about whether you're on a touchscreen device (and thus make easier to hit fields).

    But really if you do not want to create a specific format for each form factor, you must compromise and try to design a screen that works well on all devices.  This will depend on the screen, so there is not one right answer.

    I'm sorry.

  • vCD API - how to call updateDisks to resize the disks of a virtual machine?

    Had to think about where to post this question; vCD forums or here. I chose here because it's the API specific vCO for vCD and not versions of Java/.NET working team of vCD.

    I'm going to build a workflow to allow my team to change the size of a disk. This disk is part of a virtual machine that vCloud Director 'property '. I heard several times to not only change the size of the disk in vCenter as then vCD runs a risk of being confused. I have reviewed the vCO API for the vCD and found that the VclVM object contains the set of disks (VclVM.disks) as a property. This returns an array of VclVirtualDisk. There is a method VclVM.updateDisks (VclVirtualDisk []), which seems to do exactly what I want. Update disk sizes (could be used to add new facilities). I have a bit of a problem to find how to call it from my point of departure.

    // selectedDisk: a string selected by the user
    // selectedDiskSize: a number input by the user
    
    var disks = virtualMachine.disks;
    
    for (var i = 0; i < disks.length; i++)
    {
    
         if (selectedDisk == disks[i].itemResource.elementName.value)
         {
              if (selectedDiskSize <= disks[i].hardDiskSize)
              {
                   throw "New disk size (" + selectedDiskSize + ") must be larger than original disk size (" +
                        disks[i].hardDiskSize + ")";
              }
     
              disks[i].hardDiskSize = selectedDiskSize;
         }
    }
     
    virtualMachine.updateDisks(disks);
    


    'HardDiskSize' the call throws an error. It is a property read-only and is not a method. The API documentation don't do a good job to define all the methods where I can build a new VclVirtualDisk object. or clone an existing one.

    My thought was to update the existing structures of the disc and then pass them to the updateDisks (...) method. Yes, change an internal structure of an object from the outside is not something I should be doing.

    Any suggestions on how to "clone" this VclVirtualDisk object to change?

    If someone of the vCD of the vCO API team is looking, even updateDisks (...) method will do what I want? Or I have to watch fall down to Java to achieve?


    Thank you!

    If I remember correctly the ability to change the size of an existing drive is not available in API vCD 1.01.

    Christophe.

  • How can I make a copy/clone of an existing virtual machine?

    I have VM Fusion 2.0.2 running on my MacBook.  I have several virtual machines running, and I would like to copy them and use it as a starting point for a new virtual machine.  I know how to take a control point, but what I want to do is to create a single independent computer separate from an existing machine.  is this possible?

    I have VM workstation 6 running on a PC and I know I can do it by cloning the virtual machine, I just want to make something similar.

    Licensing issues aside...

    With Virtual Machine to stop target, not suspended...

    CTRL-click on the entry of the Virtual Machine in the Virtual Library Target Machine and select Show in Finder and closing of the merger.

    CTRL-click on the target Virtual Machine in the Finder package and select duplicate and it will create a copy of the virtual computer target package in the naming convention of "copy" and you can rename the Package by selecting and pressing ENTER.

    Open Fusion and drag and drop the Virtual Machine copied/renamed on the Virtual Machine library package to how you can change the display name of the Virtual Machine library.

    The first time you start the virtual machine copied/renamed be sure to select "I copied it".

    Note: If you are using Windows then you will need to run NewSid to change the name of the computers and the security identifier.  Also if Windows and not a VLK version, you need to activate Windows again.

  • How to reset the administrator password in my Windows XP Virtual Machine

    I just created a Windows XP virtual machine and have been using it without any problem.  Today, I started the machine and he asked an administrator password.  I believe that I have not set up one that I've never been asked before.

    How can I reset my password or I have to rebuild a new machine?

    Can I use a password reset utility?

    Thanks in advance for any help.

    Kind regards

    Doug U - M

    If an empty password does not work then you probably have to rebuild the virtual machine. This time, I recommend adopt you the practice of setting up a second admin account immediately and make a note of the password. It's the same when you buy a new car: you get at least two sets of keys.

  • How im can extract the value of the persistence of virtual machine disk?

    Dear friends

    How im can extract the value of the value of the persistence of disks of virtual machines?

    IM using the bellows of the order, I have a if to check if the disks are independent or not

    but im only want values of the persistence of the column to use in my script

    Get-disk hard - vm machine01

    CapacityGB persistence Filename

    ----------      -----------                                                    --------

    10 000 persistent [LUN2] RJ7469SR039/RJ7469SR039.vmdk

    8 000 persistent [rate2] RJ7469SR039/RJ7469SR039_1.vmdk

    Thank you

    Almir

    In your example, you just use Select-Object

    Get-disk hard - vm machine01 | Select the Parent, persistence

    The parent is the name of the virtual machine

  • How to find the name of a VC that the virtual machine is on?

    have a script that allows me to search several VCs at the same time for a VM - I can go back to the host on the virtual machine is but I would rather the name of VC - how to adjust this line to achieve this?

    (get-vm-name VMname here). Home | Select name

    Thank you in advance!

    Hello

    try like this:

    (get-vm-name VMname). Host.ExtensionData.Client.ServiceUrl.Split('/') [2]

    Tim

  • How to set up the console for VROPS on a virtual machine?

    Hello

    In short, I have a configured 5.5 on a Windows 2008 Server vCenter. I installed vROPS 6.0 using the EGG file (connected to a host ESXi 5.5). However, when I try to open the vROPS console, I can't ping the IP address on the console (something like 192.168.0.10). How can I configure the console vROPS? I checked if I could install the file of EGG vROPS on a vCenter installed on a virtual machine, and it seems that it is possible. Is that correct, or am I missing something?

    Kind regards

    Timmy.

    Take a look at this post if you are missing some configurations: vRealize Operations Manager 6 & ndash; Installation & laquo; All virtual

Maybe you are looking for