command to restart for virtual machines in a cluster

Hi all.

I have a vCenter Server 4.1 (HA, VMotion, DRS active) and a group of 8 ESX 4.1 works perfectly, with some virtual machines on it.

I was asked if it was possible with vCenter, to restart three virtual machines in a specific order, not matter what ESX, there is on. At first, I thought a rule on the cluster to group them, but then I realized that it was not possible to specify the boot order, but only that they could be (or not) on the same host.

Does anyone have an idea on how to fix this?

Thank you very much.

Hello.

This sounds like a possible use case of vApps.  You can put VMS in the vApp and then specify the order of start and stop them.

Good luck!

Tags: VMware

Similar Questions

  • Set the priority of restarting a virtual machine

    Hello

    I'm trying to set the priority of restarting a virtual machine in a cluster. I worked along THIS DISCUSSION to create this script:

    var myVcClusterDasConfigInfo = new VcClusterDasConfigInfo() ; 
    var myVcClusterDasVmConfigSpec = new VcClusterDasVmConfigSpec() ; 
    myVcClusterDasVmConfigSpec.operation = VcArrayUpdateOperation.add; 
    var myVcClusterDasVmConfigInfo = new VcClusterDasVmConfigInfo() ;
    myVcClusterDasVmConfigInfo.key = VM;
    myVcClusterDasVmConfigInfo.restartPriority =  VcDasVmPriority.high;
    myVcClusterDasVmConfigSpec.info = myVcClusterDasVmConfigInfo;
    var myVcClusterDasVmConfigSpecArray = new Array() ; 
    myVcClusterDasVmConfigSpecArray.push( myVcClusterDasVmConfigSpec ); 
    var myVcClusterConfigSpecEx = new VcClusterConfigSpecEx() ; 
    myVcClusterConfigSpecEx.dasConfig = myVcClusterDasConfigInfo; 
    myVcClusterConfigSpecEx.dasVmConfigSpec = myVcClusterDasVmConfigSpecArray; 
    Cluster.reconfigureComputeResource_Task( myVcClusterConfigSpecEx, true );
    

    Where Cluster and VM are objects of the WF input.

    Executions of thoughts scripts, however, in the CR, I get the error «the parameter of {entry.@enum.» InvalidDasConfigArgument.EntryForInvalidArgument} is not valid for the cluster.

    It's simple... but I just can't cope.

    Thank you guys

    Also I just realized... that the method I used is deprecated... grrr

    Here's the correct one:

    var myVcClusterDasVmSettings = new VcClusterDasVmSettings();
    myVcClusterDasVmSettings.restartPriority=VcClusterDasVmSettingsRestartPriority.fromString(priority);
    
    var myVcClusterDasVmConfigInfo = new VcClusterDasVmConfigInfo();
    myVcClusterDasVmConfigInfo.key=VM;
    myVcClusterDasVmConfigInfo.dasSettings=myVcClusterDasVmSettings;
    
    var myVcClusterDasVmConfigSpec = new VcClusterDasVmConfigSpec() ;
    myVcClusterDasVmConfigSpec.operation = VcArrayUpdateOperation.add;
    myVcClusterDasVmConfigSpec.info = myVcClusterDasVmConfigInfo;
    
    var myVcClusterDasVmConfigSpecArray = new Array() ;
    myVcClusterDasVmConfigSpecArray.push( myVcClusterDasVmConfigSpec );
    var myVcClusterConfigSpecEx = new VcClusterConfigSpecEx() ;
    var myVcClusterDasConfigInfo = new VcClusterDasConfigInfo() ;
    myVcClusterConfigSpecEx.dasConfig = myVcClusterDasConfigInfo;
    myVcClusterConfigSpecEx.dasVmConfigSpec = myVcClusterDasVmConfigSpecArray;
    task=ClusterName.reconfigureComputeResource_Task( myVcClusterConfigSpecEx, true );
    
  • Search for virtual machines with function "Shared Folders" (HGFS) running

    I'm looking for advice on creating a script to find all VM with HGFS running, or where the service is actually used.

    Apparently, VMware posted the notice of security VMSA-2016-0001 | United States yesterday and my security people are panicking.

    Any information you have would be useful.

    Thank you

    Ludi

    The only way I know is questioning the guest operating system itself and check the registry path:

    HKLM\System\CurrentControlSet\Control\NetworkProvider\Order

    and check if the value string ProviderOrder hgfs, vmhgs or vmhgfs.

    You should remove these values and restart the virtual machine for the change to take effect.

    Wise PowerShell:

    $VM = get - VM NameofVM

    $Reg = [Microsoft.Win32.RegistryKey]: OpenRemoteBaseKey ("LocalMachine', $vm.extensiondata.summary.guest.hostname")

    $RegKey = $Reg.OpenSubKey("System\CurrentControlSet\Control\NetworkProvider\Order")

    $RegKey.GetValue ("ProviderOrder")

    VMware KB: Guest Windows cannot update hgfs.dat or vmhgs.dat

  • Monitoring VM - how to restart the virtual machine

    Hi all

    Hit a problem in our environment that can not be solved, but wanted to tender hand to people and see if they have found a way to replace.

    Currently have followed vm enabled in our cluster. Thing is watching us to restart the virtual machine VMware tools demonstrated to a status of "not running" - now, the key is to most of the definitions, the system is available in this case, can be crazy, RDP'ed etc, but we here again them restarted as he finally solves the issue we see (for example unable to connect via citrix for the machines in question)

    Duncan in the post below highlights in order to avoid false positives any i/o to storage/network activity will be verified after that heatbeats failed to "double check" there is a problem with the virtual machine

    Favorite VM monitoring (aka VM HA) - yellow bricks

    What I asked is it possible to replace verification of network storage/IO activity and then restart the virtual machine VMware tools on them stops as soon as?

    Many tx for all thoughts

    «.. . is there a way to replace check network activity of storage/IO and then restart the virtual machine of VMware tools on them stops as soon as...? »

    You can always use a supervision-process inside the virtual machine for this tool (perhaps more followed VM). It acts independently and allows much finer control, i.e. it can try first (re) start vm-tools before restarting. Same BSOD /-kernel panic can be dealt with by VM itself. It can actually be even more robust, not dependent on VMware infrastructure.

  • command to restart a virtual computer

    I need to restart a virtual machine started in the recovering site.

    So in this VM I insetreted one POST POWER ON NO, type the COMMAND ON RECOVERED VM and the content is:

    Shutdown /r /t 5/f

    The syntax of the command is correct, I tested it! But when I run the test of the stimulus package I get:

    Error - command "shutdown /r /t 5/f" returned a nonzero value: 21.

    Any idea?

    Hello vmb01,

    This should work:

    5/f C:\Windows\System32\shutdown.exe/r/t | Exit 0

    Kind regards

    P.

  • HA restarts the virtual machine if the storage connectivity is lost? If how is HA needs to be configured?

    We plan to go forward with a single dual-port HBA in each of our ESX servers. My concern is that the HBA becomes a single point of failure. HA supports restarting the virtual machine which lose connectivity to back-end storage. We did some testing and it does not appear that HA does not handle this. Even when 'enable us VM monitoring' the machine virtual do not restart on other ESX servers in the cluster that they hang just basically. I've read a few articles which seem to indicate that it should work, but I'm not able to get there. Any thoughts there?

    HA checks the availability of default ESX host. There is an option to monitor the heartbeats reviews, as well. Maybe this will do, but sometimes a guest still works for awhile even if the disk is lost. And as for a long time VMware tools send heartbeats...

    AWo

    VCP 3 & 4

    Author @ vmwire.net

    \[:o]===\[o:]

    = You want to have this ad as a ringtone on your mobile phone? =

    = Send 'Assignment' to 911 for only $999999,99! =

  • Folder path as a VM property - for virtual machines in a paralytic

    Hello

    I used the new-viproperty of LucD script to create a folder for each virtual computer property in my inventory. It works perfectly well for virtual machines, but not for virtual machines in a paralytic as these do not have a 'record' in powercli property. they report a $null value.

    Would be much appreciated if someone can help me to modify this script so it creates a VM property for the VMS and VMs in a paralytic?

    http://www.lucd.info/2012/05/18/folder-by-path/

    01

    02

    03

    04

    05

    06

    07

    08

    09

    10

    11

    12

    13

    14

    15

    16

    17

    18

    19

    20

    21

    22

    23

    24

    25

    26

    27

    28

    New-VIProperty-Name'BlueFolderPath' -ObjectType 'VirtualMachine'-Value{

        param($vm)

        functionGet-ParentName{

            param($object)

            if($object.Folder){

                $blue= Get-ParentName$object.Folder

                $name= $object.Folder.Name

            }

            elseif($object.Parent -and$object.Parent.GetType().Name -like"Folder*"){

                $blue= Get-ParentName$object.Parent

                $name= $object.Parent.Name

            }

            elseif($object.ParentFolder){

                $blue= Get-ParentName$object.ParentFolder

                $name= $object.ParentFolder.Name

            }

            if("vm","Datacenters"-notcontains$name){

                $blue+ "/"+ $name

            }

            else{

                $blue

            }

        }

        (Get-ParentName$vm).Remove(0,1)

    }-Force| Out-Null

    Check if the new version works for you.

    New-VIProperty-name 'BlueFolderPath' - 'VirtualMachine' - value {ObjectType

    Param ($VM)

    Function Get-ParentName}

    Param ($Object)

    if($Object.) {Folder)

    $blue = get-ParentName $object. Folder

    $name = $object. Folder.Name

    }

    ElseIf($Object.) VApp) {}

    $blue = get-ParentName $object. VApp.ExtensionData.ParentFolder

    $name = $object. VApp.Name

    }

    ElseIf ($object - is [VMware.Vim.ManagedObjectReference]) {}

    $folder = get-VIObjectByVIView - MORef $object

    $blue = get-ParentName $folder. Parent

    $name = $folder. Name

    }

    ElseIf($Object.) Parent - and $object. Parent.GetType (). Name - as a ' file * ') {}

    $blue = get-ParentName $object. Parent

    $name = $object. Parent.Name

    }

    ElseIf($Object.) ParentFolder) {}

    $blue = get-ParentName $object. ParentFolder

    $name = $object. ParentFolder.Name

    }

    If ("vm", "Data centers" - notcontains $name) {}

    $blue + "/" + $name

    }

    else {}

    $blue

    }

    }

    (Get-ParentName $vm). Remove (0.1)

    } - Force | Out-Null

  • Wonder average CPU for virtual machines

    I have a supermetric that gives me the average demand of CPU for virtual machines.

    It works as set below:

    avgN($R40:A2055,3) / avg($R40:A2030)

    R40 is the data center - A2055 is the attribute of MHz CPU demand.

    A2030 is powered on virtual machines in the data center.

    Is it possible for me to write this formula without having to divide it by the total number of virtual machines in the data center?

    Is 'average' looks should do.

    vCenter.jpg

    Fix.

  • Change the host for a virtual machine on a cluster and the host is not in accordance with the attached profile

    Hi all

    I have 02 questions.

    1. we have a cluster which has 02 physical hosts (Host1 and Host2). We have 02 virtual machines on the Cluster. Active DRS on the cluster.

    But the problem is that my 02 VMS are always stays on a Host2. A few weeks ago, each virtual machine carried out on each host. How can I place each virtual machine on each host to perform better.

    How to do this?

    2. I connect to the cluster using vSphere client 5.1, under summer host, I get the following message

    "Configuration problems: host is not in accordance with the attached profile.

    I suspect that this is the case for my question 1?

    Thank you very much

    Hello

    I think I found the answer for the problem of home profile. I changed the following values to 1 for each host to > settings > under software > advanced settings >

    Under Data Mover

    HardwareAcceleratedInit

    HardwareAcceleratedMove


    Under VMFS3

    HardwareAcceleratedLocking

    Compliance status is returned to the green.

    Thanks for the advice guys!

    Thank you

  • Use the diskette of esxi for virtual machines

    Hello
    I would like to set up a lab and I have hp g6 server but just with a single 600 GB sas disk
    is it possible to install esxi on it and also use it as a storage device for virtual machines on?
    I know that I can install esxi on a cool drive but if what I've said, it's possible I prefer to use that
    Thank you very much

    It's true.

  • 1 or 2 processors? 32 or 64 bit? for virtual machines

    I had a discussion with the network administrator about using 2 processors and OS 64-bit for virtual machines.

    It uses 1 proc and 32-bit on Proliant G5 servers for virtual servers ordinary.

    When it will be beneficial to use 2 procs and 64 bit?

    THX.

    Hello.

    When it will be beneficial to use 2 procs and 64 bit?

    It will be useful to use 64-bit when you have an application that you want to run 64 - bit, and it will be useful to add a second processor when you discover that a vCPU is not enough.  If by 'regular' virtual servers, you're talking low-end Windows servers, then the 32-bit single vCPU approach will be generally better.  Without knowing more about your applications or operating systems, it is difficult to give a more precise answer.

    Why do you think that you might need for 64-bit or 2 vCPUs?  Can you elaborate on what you put on foot?

  • Get use of the resources of all virtual machines in a cluster

    Hello

    I have developed a measure of capacity management report that collects all the use of the resources of the virtual machines in a datacenter. The function that collects it looks like this:

    def hostMemoryConsumed =]

    def memoryConsumed = 0.0f

    def memoryGranted = 0.0f

    VMs. each() {}

    VM->

    try {}

    memoryConsumed += vm.host.memory.consumed.current.average / 1024.0f<----- how="" to="" do="" this="" to="" get="" from="">

    memoryGranted += vm.host.memory.capacity.current.average / 1024.0f

    }

    {} catch (NullPointerException e)

    }

    VMS is a function of type parameter VMS VMW

    The works above for virtual machines in the data center, but I need it to be after cluster. I can find a cluster of virtual machines, but I'm having trouble with referring to specific values for example consumed memory and capacity.

    If I change the type parameter: VMW Cluster how the metric reference would look like (see the try {})?

    I don't think that a query will help me.

    Thanks in advance

    Erik Alm

    If you want to do for a cluster, you can just get the list of virtual machines in a cluster of first and passing in your script.  If you have a function for a VMWCluster you can add a parameter for "vmwCluster" that is underneath and it should give you a table (topologyObjects) that has all the virtual machines in the cluster.

    QS = server.get ("QueryService") / / query Service

    tquery = qs.createStatement("!) (' VMWVirtualMachine where esxServer.parent.name = "+" ' "+ vmwCluster +" "" ") .setQueryTopologyObjects (true);

    topologyObjects = qs.executeStatement (tquery) .getTopologyObjects)

  • Creation of the virtual machine on a cluster using the vmcreate.pl script

    Hello

    I checked a few posts on this forum on how to create the virtual machine through vmcreate.pl, but responses was not so clear to me...

    These are the topics I've read:

    Create a VM on the Cluster instance

    How to configure the managed object HostSystem

    So, I would like to create a virtual machine on a Cluster, and not on a specific host. The vmcreate.pl script would have done the job? Or should I change it?

    In the topic = > VM create instance on Cluster I did not quite get, what I need to change...

    That's what I do:

    vmcreate.pl - server 'ESX NAME' - username "LOGIN" - password 'PASS' filename - vmcreate.xml - schema vmcreate.xsd


    Result:

    Creation of the 'myTestMachine ': VM error

    SOAP fault:

    -----------

    Error string: InvalidArgument

    The fault detail: InvalidArgument

    Here are the values of the XML file:

    < name > myTestMachine < / name >

    blah < Home > < / Host >

    blah < Center > < / Center >

    > Guest Id < Linioch < / comment-Id >

    blah < Datastore > < / Datastore >

    < > 2048 Disksize < / Disksize >

    > 256 MB memory < < / memory >

    < processor number > 1 < / number processor >

    < Nic-network > < / Nic-network >

    < Nic-Poweron > 1 < / Nic-Poweron >

    The values are correct the cause I checked the other perl scripts.

    Thanks in advance for your help

    Michal

    Thanks to xyz222 for the user and post Re: instance of VM to create the Cluster

    I was able at the end of the problem. So simple... The value of the in the xml file should be for example "rhel6_64Guest" and not a random word... that's all!

    sudo./vmcreate.pl--serveur SERVER - LOGIN - password PASS - filename... username/SampleData/vmcreate.xml - schema... /Schema/vmcreate.xsd

    Successfully created the virtual machine: 'teeest2' under host HOST_NAME

  • Virtual Center stops all the virtual machines in a cluster HA

    Hello.

    I have a question about vCenter machine. We have deployed

    VMware ESX 4.0 HA cluster on Server Blade IBM 3. VCenter machine resides

    on a virtual machine on the same cluster. When we tried to recharge a physical switch (in the)

    IBM Blade Center), all our virtual machines on the cluster have been turned off automatically.

    If the vCenter VM is turned off, then everything is fine - the reloading of the

    Switch is not turning off the virtual machines (and the net is ok - start machines

    work through another switch in IBM bladecenter). If the machine vCenter

    powers (manually), all the other machines, which have been put off, are powered

    on too (automatically, of course, with the help of the machine of vCenter). How

    is that what I can adjust the machine vCenter, so it could not power power machines by

    itself automatically?

    ESX 4.0 (162856)

    Hello

    Right-click in your cluster, change the settings. Select 'Virtual Machine Options' under 'Vmware HA' and choose the host response of insulation desired for the entire cluster or individual VM. If you do not have network connections redundant between your ESX machines, you probably want the virtual machine for when you need to do maintenance or your network switch died. You should probably also disable HA while doing maintenance. You should consider to build network redundancy in the case of a production environment.

    I hope that helps!

  • Script of PowerCLI to measure the number of host and its virtual machine in each cluster

    Hello

    I'm trying to create a script on regular which gives an output of the host and virtual machine into a cluster of vcenter as below counties.

    Cluster:                                                      VMHost                         VM's

    Cluster01                                                     04                                  15

    cluster02                                                      02                                  35

    Simply using a sample onliner

    Get-VMHost | Select @{N = "Cl"; {E = {Get-Cluster - VMHost $_}} name, @{N = "NumVM"; E={($_ | Get - VM). County}} | Cluster of kind, name

    any ideas? Thanks in advance

    Kind regards

    Subash.

    Try this:

    Get-Cluster | Select Name, @{N="Host Count"; E={($_ | Get-VMHost).Count}},  @{N="VM Count"; E={($_ | Get-VM).Count}}
    

Maybe you are looking for

  • I accidentally deleted my photo of my iphone6 stream file. How can I restore it?

    I accidentally deleted the folder 'My Photo Stream' on my iphone6. How it add or restore a new? Help, please... THX Al

  • Memory of the IPhone has declined rapidly

    Hello IPhone 6 64 GB Suddenly and without warning dropped 20 GB memory less than 50 mega As if the virus has infected iPhone Are there solutions Thank you

  • Good old LaserJet Pro P1100w cannot even find a wireless signal - flashing.

    Well, forgive me - I'm not a very savvy computer user, but I spent three hours with all the 'Assistant' and 'Doctors' and reading the forums and may not know what is happening with my trusty LaserJet P1100w. It appears nowhere on my laptop ASUS Windo

  • The router just for me

    I had a problem choose a router that will work for me. I have a few computers (with Mac in there), a Bravia TV and a PS3. I'm looking for a (cat 5) wired and wireless router that has QoS so that I can make sure my packages of games to get there first

  • B109n does not connect

    B109n cannot connect from pc hand but the printer works wirelessly from laptop. When I try to reinstall claims does not find the printer when it is connected by usb but doctor HP Print allows printing via USB test page. It worked perfectly until I ha