How the VM of the order sought judgment.

I'm looking for a method to stop the virtual machine in the order requested. There is a cluster with 4 ESX 4.0 host and about 30 vm. I need to stop in good condition (with 60s gaps between each vm) during a power failure. APC and tools of the power of vmware implementation is not good enough. I can control only stopped on the basis of the host and what's worse, they start automatically after the power of the host under.

How to write a script or something? Help, please

First mentioned in $VMOrder VMs will be stopped in an order specified with a delay of 60 seconds. After that all running virtual machines will be off gently.

At the end of 300 seconds all other virtual machines will be stopped. 60 seconds and guests will also be stopped.

$VMOrder = @("VM1", "VM2", "VM3")
foreach ($VM in $VMOrder)
{
  Shutdown-VMGuest -VM $VM
  Start-Sleep -Seconds 60
}
Get-VM | Where-Object {$_.PowerState -eq "PoweredOn" -and $_.Guest.State -eq "Running"} | Shutdown-VMGuest
Start-Sleep -Seconds 300
Get-VM | Where-Object {$_.PowerState -eq "PoweredOn"} | Stop-VM -RunAsync
Start-Sleep -Seconds 60
Get-VMHost | ForEach-Object {
  Set-VMHost -vmhost $_ -state maintenance
  Stop-VMHost -vmhost $_ -RunAsync
}

---

MCITP: SA + WILL, VMware vExpert, VCP 3/4

http://blog.vadmin.ru

Tags: VMware

Similar Questions

  • How the order in the sort column

    kjvfvl; v

    Hello

    1004386 wrote:

    for example:

    aa_12_gef

    aa_1234_ab

    aaa_12345_cde

    o/p

    aa_12_ab

    aaa_12345_cde

    aa_12_gef

    Basically, I need to sort the letters ads = after the second "_".

    Please help me. I get no idea

    Is this really what you want, with

    "aa_12_ab" in the output, even if the input has

    "aa_1234_ab"?

    If you want just to sort the rows and not change them, then you can do something like this:

    SELECT str

    FROM table_x

    ORDER OF SUBSTR (str

    , INSTR (str, '_', 1, 2).

    )

    ;

    What happens if a line in the entry has no 2 ' _?

    I hope that answers your question.

    If this isn't the case, please post a small example of data (CREATE TABLE and only relevant columns, INSERT statements) for all of the tables involved and also publish outcomes from these data.

    Point where the above statement is erroneous results, and explain, using specific examples, how you get the right result of data provided in these places.   If you change the query at all, your postal code.

    Always say what version of Oracle you are using (for example, 11.2.0.2.0).

    See the FAQ forum: https://forums.oracle.com/message/9362002#9362002

  • How does the order by clause in oracle 10G?

    Hi This is my table called Master.I want to order by sno. so I run the below mentioned query.

    SNO DESC STIME, ETIME CCODE ADD SID

    11 11 11 1 10 s11

    1 1 s1 09:00 12:00 10

    2 2 s2 06:00 07:00 9

    3        3      S3        9:00       23:00                         0

    SELECT * FROM MASTER BY SNO

    SNO DESC STIME, ETIME CCODE ADD SID

    1 1 s1 09:00 12:00 10

    11      11         s11        11             1              10

    2         2         s2           6:00        7:00           9

    3         3         S3           09:00     23:00                        0

    but I had bad results. Help kindly me.i can't understand how the order by clause is fetching the record.

    Hello

    Most probably because that SNO is not digital, but a tank.

    If it contains a number onlly, try

    SELECT * FROM MASTER BY TO_NUMBER (SNO);

  • What controls the order of the types in the list of paette type

    TS2012

    I have a bunch of custom in my file of sequence types, and when I go to the range of types and look at the types associated with my file in sequence, they are in the 'disorder' which is not very useful for me - I would have preferred that they are in a specific order which groups them according to the category of tasks they do.   Basically, I want to be able to manaully specify the order of the types.  Worse still, as I modify some types, their order and after the editing changes they get inserted somewhere else in the middle of the list (not very useful).

    The sequence that the user interface of the editor does not provide a way to 'Capture' a type and drag around manually update the order, or be able to sort the headers of columns for the type palette.  (Heck - which would be too convenient here).

    So... try to reverse this engineer and get there myself.

    There seems to be 2 different pieces of possible orders of the information for the types that I can find.

    (1) order that they exist in the file in sequence if I save it in XML format and begin reading from the top down.

    (2) the specific type typelistordernum

    I have a case where, if I open the pallet type in the sequence editor, I see

    TypeA

    TypeB

    TypeC

    Typed

    TypeE

    If I open the file in the sequence in the text editor, I see

    Typed (typelistordernum 49)

    TypeE (typelistordernum 50)

    TypeC (typelistordernum 51)

    TypeB (typelistordernum 52)

    TypeA (typelistordernum 29)

    The order in the movie file, or the order number of type list seems to dictate the order that they appear in the range of types of the sequence editor.

    I checked that each type in the example are ONLY used in this file a sequence - not shared in any other type of sequence pallets or files of type.

    If I write code to load the sequence file, obtain a reference to it, it cast to a propertyObjectFile and retrieve the TypeUsageList for this file, I get an ordered list that corresponds to the order of typelistordernum.  I can call the MoveType against this TypeUsageList method to reorder the items in the list type and save the file in the sequence.  The next time I open the file in the sequence, the tool retrieves the TypeUsageList for the file of the sequence in question and the order and numbers are the same that I saved the last time, but the order types as seen from the range of types of Sequence Editor is no different (my sorting tool did not help to this point of view).

    All the suggestions here about what is happening, and how can I do feel how the order types is displayed in the palette of type sequence editor, and what I can do to get my types of "sort" I like.

    (1) Yes, you can reorganize the types according to the type via drag and drop. At least since the 2012 version of TS this works reliably.

    (2) the typelistordernum defines the order types are displayed in the view of types.

    (3) you can sort the columns in the view types.

    Maybe you accidentally sorted one of the columns in the view of types and the sequence editor is forgetting that for what you see is actually the order sorted, based on one of the columns.

    I'm sure that drag - move is disabled when you have a sort column so this explains very well what you see. Check your headers to sort for this point of view and make sure that you do not have up and down arrows.

    Hope this helps,

    -Doug

  • How to change the sort order of the items sought for the last element of this research first. I DON'T want to say the order search engines, but the existing research by arrow down

    I want to be able to change the sort order of the items, I already looked in the search box. I want to be able to hit the arrow key down and see my previous searches in order of last search showing the first. For the moment, I don't know how it is sorting and it is very annoying to have to re - enter a query that I typed 5 minutes earlier, but because I typed in another 10 since it's lost somewhere in the list. Is it possible, I Googled, but did not find the topic anywhere. Just to clarify, I DON'T mean of the order of the search engines (which is what appears in google), I mean that the text typed into which has been registered in the drop-down list.

    Thank you

    'Form filling' uses a "frecency" algorithm, frequency + recency, similar to the list of AutoComplete address bar.

    I found an extension that seems relevant, but critics are old, so I'm not sure it's still working: Searchbar Autocomplete Order.

    But... is the AutoComplete does not? I expect that typing a few characters of the previous query would be to filter the list so that you can easily select? Or is the problem that the list does not remember quite who looking for?

  • How to change the order of people

    Under El Capitan, I recently spent some time to reorganize manually about 260 faces in a seemingly random way in order of last name. Now under the Sierra Apple has decided to display them in the order first name without the possibility of manual reorganization which is useless and irritating. Any suggestions on how can I change the order?

    In Favorites, you can drag and drop them in the required location - those remaining you can not change the order

    LN

  • How can I change the order of songs in my list "to the top following" of Apple's music with the 10 iOS?

    Thanks for your help guys! :-)

    Hey Aktivoli,

    If I understand correctly, you use the Apple music app and want to change the order of the songs until the next.
    I recommend reading this article, it explains how to change the order in the Apple's music library and playlists.

    Swipe up on reading to display your queue up next, that lists all the songs that you have selected for the current playback.

    Drag the songs with to rearrange the order, or swipe to the left to remove a song you want to ignore.

    Use of music Apple in the music - Apple Support application

    Thank you for using communities of Apple Support. Have a good.

  • If I order a new watch how many days can I cancel the order?

    If I order a new watch how many days can I cancel the order?

    Hello

    It would be possible to modify and cancel an order prior to the point when it has reached "Preparation for shipping. After that, you will need to return it after reception.

    By placing an order, you will be informed of the maturity expected for shipping.

    You can also monitor the status of your order online (including any amendment to the end expected).

    More information and instructions:

    http://www.Apple.com/shop/help/viewing_changing_orders

  • How can I change the ORDER of my 5 email accounts to my default at the top

    How can I change the order of my 5 email accounts to my default at the top? Currently using any option to e-mail browser (Chrome Firfox IE) sends using one upstairs that is one that I never use. I specifically put by default in the settings option and figure that he took over the top NOT the default. This question never used to cultures upward, but since a recent update for Thunderbird, he chooses the top of the list only Preferred not on the list.
    Thank you I could delete the account then add it to the bottom (tedious), but there must be a way for a) restore order and b) to stop the email add on picking at the top

    Two things.

    You have defined the default value in the menu (alt + T) tools > account settings > outgoing (SMTP) Server?

    Second, try this add-on https://addons.mozilla.org/en-US/thunderbird/addon/manually-sort-folders/?src=ss

  • How can I change the order of photos in the shared album?

    Hello

    I have pictures from multiple sources in a single shared album. Photos are not in order (each device had date and different time). I can change something order these photos? I even tried to delete the shared album, rearrange photos in my album, I shared this album published, but the photos are still in the wrong order.

    Thank you

    Petr

    Shared albums the photo order depending on how they are added, you can not change the order later.

  • How do sort you the order account shown in the folders pane in Thunderbird?

    When dealing with multiple email accounts in Thunderbird, how can I arrange the order that they are listed in the pane of the files of the main window, the broad view, the version of Mac OS X? When I add new accounts, they placed in the order want to Thunderbird, is usually not the one I need.

    Shift, control, Option, or command key does not move them. With the help of v24.6.0 on OS X 10.7.5.

    https://addons.Mozilla.org/en-us/Thunderbird/addon/manually-sort-folders/

    http://chrisramsden.vfast.co.UK/3_How_to_install_Add-ons_in_Thunderbird.html

  • I have not yet found a solution to my problem of how to organize my emails in the order deceding in my Inbox and all the files that I save emails from various sources.

    Can someone tell me how I can arrange my incoming emails in my Inbox and folders should I save emails from various sources? I tried to click on the star, but it does not work. Help!

    Click on the heading of column titled DATE. This indicates that the primary sort column. Click on DATE again to reverse the order.

    It works on any column in any folder.

    Edit: You need to read my response to the first time that you asked this question? There is no need to ask the same question over and over again in a new thread.

    https://support.Mozilla.org/en-us/questions/1005910?ESAB=a & s = & r = 2 & s = ACE

    Here's another time that you asked this question and marked it resolved. What is happening with this?

    https://support.Mozilla.org/en-us/questions/992000?ESAB=a & s = & r = 4 & As = s

  • I have a Mac. How can I change the order of my favorites. It is not the same as a PC

    On my old PC, I could change the order of my favorites just by clink & do drag. On MAC, this does not happen. How can I change the order & how I can delete unwanted bookmarks?

    You can do it in the (library) bookmark manager.

    • Bookmarks > show all bookmarks
  • How do to add the first cell not empty in a row - with results in the order reverses

    A few months ago Wayne Contello solved my initial question about how to add the first non-empty cell (text) in a row where I am inputing several phone numbers and email address.

    The link is below-

    Re: How to add the first non-empty cell (text) in a row

    What I'm looking for now is for the results in the "I - K" columns (each title, "First", "Second", third"in the table) to be in reverse order.

    In other words, I want results in the column 'Third' (K) to appear in the first column (I), "Second" can stay second and the column 'First' (I) be listed as the last column (K).

    I don't want to change the order of the phone 1, 2, 3 and send columns (A, B, C and D respectively) if possible.

    Any help would be appreciated.

    Thank you!

    is to add more than three columns and see the original formulas that I posted in the other direction... like this:

    L2 = K2

    M2 = J2

    N2 = I2

    Select L2 thru N2, copy

    Select the L2 cells at the end of the N column, paste

    now to hide columns I thru K selecting the three column, then using the menu shortcut for columns:

  • How can I change the order in the drop-down list the address bar?

    I like Firefox, but one thing I want to change is the behavior of the address bar drop-down list - where it shows the previous sites I visited. I'm looking for a way to list of these in chronological order - so the most recently visited site is at the top. know how it is in IE!

    Is this possible? I'm happy to go in and change settings or install any addons that I need to do.

    Hello zeel, this article explains how the sorting mechanism in the firefox url bar: https://developer.mozilla.org/en-US/docs/The_Places_frecency_algorithm

    Although there are some settings to adjust the table available when you go to Subject: config I don't think it's possible to achieve your goal exactly using the built - in firefox. You can set the preferences (increase) of the value of the . places.frecency * BucketWeight while to increase the rank of the most recent visits and adjust the timespan in days for different buckets through the . places.frecency * BucketCutoff...

Maybe you are looking for

  • How can I prevent the icons appearing in Web pages search?

    Icons search constantly appear on the pictures on the websites I visit, I think it's Yahoo Search that is the cause.

  • Satellite L755 - conflict uTorrent with youtube and radio online

    I just bought Satellite L755 - 1 M 0 a few weeks ago and put Windows 7 on it. I have problem when you look at youtube and listen to the radio online of the browser, while that download torrents with uTorrent. There is NO problem with slow internet, t

  • Add the file to the library

    I got an error that a file was not part of a library he claims make part of. In fact, it is a .lvclass not a lib. The archives, I saw how to drag and drop a file in a library. This method worked for a single file. Then I tried to put another file in

  • problem with re-installing windows 7

    I had a hard disk crash.  Bought new hard drive retailer local (same HD that crashed) and installed.  Order the Lenovo recovery disks.  Tried to install via DVD-rom.  I got an error PXE.  I disabled the book of network from the bios.  I moved the DVD

  • Smartphones blackBerry with Outlook calendar synchronization problem only

    Please help, my BB has worked fine for almost a year now, the BB desktop and handset software sent me a prompt for an update I did properly. Now, for some strange reason, my calendar doesn't sync, everything except my calendar on the destop under "th