Stop and restart the virtual machines in the remote server

I need to close virtual machines running guests 4 1 ESX from a remote server (IBM System i).

The remote server in fact control the storage used by ESX and VM OS, so I'll have to scripts running on the remote server that:

Stop the virtual machine

Performs maintenance

Reboot the virtual machine

I tried to understand the big picture of the reading discussions here, but I'm still confused.

VMA is to provide the best way for the virtual machines of withdrawal from a script running on a remote server?

Scripts can I use SSH to connect to the vSphere environment to run scripts or issue the command?

Thank you.

vCLI (really its vSphere SDK for Perl), PowerCLI, VI Java, etc are all vSphere SDK to correct and they are a of the client-side bindings different scripts and programming languages which bind to the vSphere API. When I say 'API', I mean using one of these SDK is you use the vSphere API to perform the work.

The SDK is initiated on the remote server, this can be windows, linux, etc as long as it supports one of these boxes to tools. In general, for admins, you will use either vCLI (vSphere SDK for Perl) that supports Linux and Windows, or if you are more windows-oriented, you can use PowerCLI.

Documentation has been referenced in my first post, please take some time the documents because they provide much more detail on the use cases for each + a lot of examples with orders. Yet once, there no involved SSH if you use the vSphere API. As I told, vMA is a virtual appliance, you can download and start using if you do not want to install vCLI or PowerCLI on a remote system, this is assuming that you are comfortable in a Linux environment. If you're not, then I highly recommend using PowerCLI, who will need a remote server for Windows.

Here are a few started getting additional resources:

vSphere SDK for Perl + vMA:

Getting started with vSphere SDK for Perl

Introduction to the vMA (tips/tricks)

PowerCLI:

http://www.VMware.com/support/developer/windowstoolkit/

http://www.virtu-al.NET/2009/11/10/PowerCLI-where-do-i-start/

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

William Lam

VMware vExpert 2009

Scripts for VMware ESX/ESXi and resources at: http://engineering.ucsb.edu/~duonglt/vmware/

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

  • When I try to delete anything out of my windows mail Inbox stops and restarts the imedietly.

    Restart mail Windowas

    When I try to delete anything out of my windows mail Inbox stops and restarts the imedietly.

    Try to compact and repair the database (see www.oehelp.com/WMUtil/).  There is likely an inconsistency between what is really there and what think the database is where and who must reconcile the two.  So beware of interference from antivirus software which can cause these issues (see www.oehelp.com/OETips.aspx#3).

    Steve

  • Stop and restart the cssd on all cluster nodes

    Hello

    Release our system to operate under linux Red Hat Enterprise Linux Server 5.3 (Tikanga) 2.6.18 - 128.1.1.el5
    Our ASM is 11.1.0.7.0 block of POWER 2
    Only ASM is clustered. Databases are not.
    2 cluster nodes (Clusterware 11.1.0.7.0)

    I have two questions:
    1. we need to stop and start the cssd (crsctl stop crs, crsctl start crs) on both our 2 nodes of clusters.
    In our test group, I stopped first the ASM and dbs all running on 2 nodes
    Then I got arrested and restarded the cssd on the first node, and then on the second node. What is the good order or procedure?
    I noticed after the cssd (crsctl stop crs) stopped the process "/ bin/sh /etc/init.d/init.cssd fatal" was always present. I waited for 30 seconds, but he was always there. Then I restarted the cssd (crsctl start crs) in any case. Why was the fatal process always there? It happened on both nodes. After you restart the cssd, I killed the "/ bin/sh /etc/init.d/init.cssd fatal" on both nodes. He was evidently reappear.

    in the event that we want to restart both nodes of the cluster, should 2 - I start by disabling the crs before restart the cluster of 2 knots (crsctl disable crs), and then turn it back on after that 2 linux servers are back (crsctl enable crs)?

    Thank you, man

    Hello

    So, for the closure of this thread, which is the appropriate procedure - for them stopping and restarting the cssd on the two cluster 2 node - among the two below:

    1 - do a "crsctl stop Sir' and then 'crsct start crs' on the first node. Then do the same thing on the second node
    2. make a "Sir crsctl stop" on both nodes. Then do 'crsct start crs' on both nodes

    I want to avoid is the two nodes start to restart because of the cssd.

    You can run 'crsctl stop/start' at the same time on both nodes or so as you want (1 or 2), no problem.

    If you start the clusterware on a first node and later the second node, just make sure that all services who were on the first node the second node have been properly resettled on the second node.

    Kind regards
    Levi Pereira

  • Problem stopping and restarting the computer

    Hello

    I searched for so long for a solution, until I decided to post a question here.

    Whenever I have shut down my computer (via Start menu / alt + f4) the computer off first and perform a restart immediately afterwarrds.

    Well, this is what happens ALL the time. My computer stops and restarts, until I am led the newspaper to the page. On the page (after ctrl + alt + del) to connect, I keep having the same problem after pressing the off button.

    It's extremely frustrating because I have two options:

    Leave my computer running in locked mode (allowing my computer to heat and drain its battery)

    or

    Force a stop down by holding the power button down (damage my computer system - directed to a page (for running normal windows not start))

    Here is my contact information for the computer and all the...

    Lenovo G400

    (Standard plug)
    500 GB WD hard drive

    Windows 7 ENTERPRISE

    If you need more details let me know, so I can help you.

    Hope to hear something soon!

    MBT

    In order to diagnose your problem, we need run Windows performance toolkit, the instructions that are in this wiki

    If you have any questions do not hesitate to ask

    Please use the restart configuration.  This will reboot your computer 3 times then save your work

  • How to start, stop and restart the task

    Hi all
    Need advice on what is the right way to start, stop, and restart a Java task?

    I tried with Executors.newCachedThreadPool () or fixedThreadPool(), however I could not present the task once. My program crashed when I tried again the task again after a shutdownnow command()

    Tasks are designed to be run once. If you want to restart features, use a service:
    http://docs.Oracle.com/JavaFX/2/API/JavaFX/concurrent/service.html

    Service I posted in the following thread shows how to proceed:
    Multithreading

    Use of executors is unnecessary because a Service encapsulates the management of execution threads (although you can set your own liquidator on the service if you really need). Everything you need to do is use the start of the service, cancel, restart, and reset if necessary. If you do not use the cancel method, then you must ensure that your service is properly interrupt the current to cancel it for function, as you expect.

  • stop and restart the BIOS G470 2.19 problem 40cn33ww_64

    Hi there, please kindly help me.

    I have laptop of G470, Lenovo. Core I3, 8 GB RAM, 500 GB HDD, Bios Version 2.19 (updated)

    in fact, after I have updated to version 2.19 bios I got these problem.

    When I click on stop. the disc but stops the power still running.

    When I click on restart (on battery) my laptop goes off completely

    When I click on stop (on the adapter) my laptop will reboot.

    first of all, I think that it is BONE, I have try all the BONES, but it is still the same problem.

    Please give me a solution. Thank you.


  • What is the difference between the stop and restart?

    What is the difference between the stop and restart?  I feel that stopping closed all processes, completely erases RAM memory and clears the cache of the processor.  I need to know if 1) this is a correct assumption and 2) which is better for daily maintenance of the system.  Thank you in advance.

    Hello Jeremy_1976,

    Your support when the judgment is correct. Basically, it stops the process and completely turns off your computer. Reboot, however, temporarily your PC stops, then turn it on again. This happens usually when Windows updates are installed. After installation, the system is restarted (rebooted) so that any update has been successfully installed and works as it should. You can be a little mixed upward the reboot and the hibernation. Reboot is, as I have indicated previously, basically a reboot of your machine. Ultimately, your PC is on again after a reboot. However, hibernation, stores all data currently in memory in a special file, then the PC turns off. When you then turn on your PC, that is, coming out of hibernation, hibernation files is used to restore the status of the PC than when you initially put into hibernation. In other words all the programs you had open before will automatically open and be ready to use hibernation.

    Hibernation or sleep for that matter is for short-term use. It is normal in Hibernate, or sleep if you want to be away from your PC for half an hour or so. If you leave more than I suggest you stop completely.

    A point to remember about hibernation is that, if you use put into hibernation, you can't, once you get out after hibernation, install programs or updates. You have to stop and restart normally to do.

    This forum post is my own opinion and does not necessarily reflect the opinion or the opinion of Microsoft, its employees or other MVPS.

    John Barnett MVP: Windows XP Expert associated with: Windows Expert - consumer: www.winuser.co.uk |  vistasupport.mvps.org | xphelpandsupport.mvps.org | www.silversurfer-Guide.com

  • 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 );
    
  • Frequently, my computer stops and restarts all am surfing the net? What should I do?

    Frequently, my computer stops and restarts all am surfing the net.  What can I do?

    Hello

    1. what type of internet connection do you use? What is a wired or wireless?

    2. you receive messages or error codes?

    2. did you of recent changes on the system?

    Step 1:

    You can check the following items and check if the problem occurs in safe mode with network.

    Start your computer in safe mode

    Startup options (including safe mode)

    Step 2:

    If you do not experience the problem in safe mode with networking, you can perform a clean boot and check.

    A clean boot to check if startup item or services to third-party application is causing this issue.

    You can read the following article to put the computer in a clean boot:

    How to troubleshoot a problem by performing a clean boot in Windows Vista or in Windows 7

    After the troubleshooting steps, please refer to clean the boot link to put the computer to normal startup mode.

  • Recently installed Windows 7 now cannot open any games Big Fish when I try to open the game get error message computer stops and restarts

    Cannot open the computer game stops and restarts

    Check that the Big Fish Games support the site http://bigfishgames.custhelp.com/app/home to see if it's a known issue.  I hope they don't send you here :-)

  • Hi, I have a toshiba tecra 5000 I downloaded updates when they try the third phase of the update download the computer stops and restarts.

    I'm a newbie with this stuff so bear with me.  I updated charges, when they get to the third stage of the download the computer stops and restarts. I tried all types of restart, the system is unable to connect. now the hard drive light on the face of the computer won't lite, the laptop won't even consider itself restart any ideas

    Hello

    1. the updates you downloaded?
    2 a successful installation of updates?
     
    Follow these methods and check
     
    Method 1:  If you are still not able to start the desktop computer, you can rename pending.xml and check.
    Renaming or removing the pending.xml file booting from the Windows Vista disc.
    a. Insert the installation disc.
    b. restart your computer.
    c.Press any key to load the disc.
    Note: If your computer is not configured to start from a CD or a DVD, see the documentation provided with your computer. You may need to change your computer's BIOS settings.
    d. choose your language settings, and then click Next.
    e. in the System Recovery Options menu, click command prompt
    f. at a command prompt, type the following command below and press ENTER
    CD C:\windows\winsxs
    g. now, type ren pending.xml pending.old , and then press ENTER.
    Restart the computer and check.
     
     
    Method 2:  Once you are able to boot to the desktop, follow this method.
    An update is not installed successfully when you try to install the update in Windows Vista and Windows 7:
    http://support.Microsoft.com/kb/949358
     
     
     
    Thank you
  • Get the message when running Norton - OS file system error (C :), advised stopping and restarting,)

    Original title: what is system problem Partition OS operating system error (C :) file)

    get the message when Norton - OS file system error (C :), recommended stop and restart running, did not help)

    Hi catherinegood,

    1. When did you start to question?

    2. you remember to make changes to the computer before this problem? Hope this information is useful.

    This is error occurs when Norton scan, then you can check with Norton and check:

    Check the link for the support of Norton:

    http://securityresponse.Symantec.com/Norton/support/contact/contact.jsp

    http://www.Symantec.com/support/index.jsp

    If you try to run a scan, you can check out the following link and try to download the Microsoft Safety Scanner and analysis complete on your computer and check.

    Note: When you perform the analysis, there are risks of data loss you can take a backup of important data before performing analysis.

    Check out the link:

    http://www.Microsoft.com/security/scanner/en-us/default.aspx

    Hope this information is useful.

  • window will stop in less than a minute, stops and restarts everytime I use the computer

    message-windows will be stop in less than a minute. appears, and then the computer stops and restarts. It's windows vista and it's this evertime I use the computer

    Hello

    ·        This happens randomly, or when you open any application on the system?

    ·        Since when are you facing this problem?

    ·        Remember to make changes to the system?

    Check the event viewer for the newspapers and let us know. Follow the steps mentioned in the link below.

    Open event viewer

    http://Windows.Microsoft.com/en-us/Windows7/open-Event-Viewer

    What are the information contained in the logs of the event (Event Viewer)?

    http://Windows.Microsoft.com/en-us/Windows7/what-information-appears-in-event-logs-Event-Viewer

    Method 1:

    Step 1:

    I suggest you to check in safemode, if the problem persists. Follow the steps mentioned below.

    a. restart the computer and keep tapping F8 until you reach the start menu.

    b. Select safe mode and press ENTER.

    Step 2:

    I suggest you do a clean boot and see if the problem still occurs.

    To perform a clean boot follow the steps mentioned in the link given below.

    How to troubleshoot a problem by performing a clean boot in Windows Vista or in Windows 7

    http://support.Microsoft.com/kb/929135

    Note: Follow step 7 to start the computer in normal startup.

    Method 2:

    It may be there is a scheduled task on your system. Check in Task Scheduler and if there is no scheduled tasks then, remove and check if the problem persists.

    Automate tasks with Task Scheduler

    http://Windows.Microsoft.com/en-us/Windows-Vista/automate-tasks-with-Task-Scheduler-from-Windows-Vista-inside-out

    Schedule a task

    http://Windows.Microsoft.com/en-us/Windows-Vista/schedule-a-task

    Thanks and regards.

    Thahaseena M
    Microsoft Answers Support Engineer.
    Visit ourMicrosoft answers feedback Forum and let us know what you think.

  • burner Windows media player just stopped working - connect a burner and restart the player

    Original title: windows media player

    My burner windows 7 everything simply stopped working saying that I need to connect a burner and restart the player. Why is it a saying suddenly this and what can I do?

    Hi Noralie,

    Welcome to the Microsoft community.

    It seems that you are facing problems while burning the disc using Windows Media Player. It would be great if you can answer the following questions:

    1 have had any changes made on the computer before the show?

    2. What is the full and exact error message?

    3. what type of disc you are trying to burn?

    To resolve this issue, follow these methods:

    Method 1:

    I suggest to see the link and try to run the Troubleshooter:

    Open the troubleshooting Windows Media Player settings Troubleshooter

    http://Windows.Microsoft.com/en-us/Windows7/open-the-Windows-Media-Player-settings-Troubleshooter

    Method 2:

    See the article and check if that helps:

    Burn a CD or DVD in Windows Media Player

    http://Windows.Microsoft.com/en-us/Windows7/burn-a-CD-or-DVD-in-Windows-Media-Player

    I hope this helps. If you have additional questions on the computer, please ask your question about Windows and we will be happy to help you.

  • While the suite war Thunder game stops and restarts my laptop

    Original title: war Thunder crashing

    Hello

    I have a Dell Inspiron 7420. Recently, when I play War Thunder, the game just stops and restarts my laptop. There is no warning, all of a sudden shows a black screen and the auto restart my laptop. What happens to the login screen.

    Hi Pinaki displayed,

    Really sorry for the relply ULTRA end. BTW, it's always the same Amos. I tried reinstalliing the windows 8 and all that kind of stuff and I think it's a hardware problem. I'll be sending my laptop to a PC repair shop soon. Thx for your help! Really of sry for long wait.

Maybe you are looking for

  • After upgrade to El Capitan, Python segmentation fault 11 after two commands are entered.

    2011 Macbook pro with Snow Leopard (8 MB RAM).  I upgraded to 10.11.4 and now interactive Python (2.7.2) is broken.   After you enter the two commands any (?), it crashes: Pauls-MacBook-Pro: ~ python $ paul Python 2.7.2 (v2.7.2:8527427914 has 2, June

  • Before bright lights Panle flashing all when I run the Satellite 1955

    I got a laptop Toshiba Satellite Mode. 1955 s803. When I plug the power to it, I get the power light on the front panel. As soon as I press the power on button the computer starts upward and in a second or two it stops and all the lights to stutas ar

  • Internet Explorer toolbars are black

    When my windows xp pro service pack 3 restart my order bars upstairs came back black, tried to restart, blocking downwards, does not, some watch thru stuff but a lot is blacked out... Help

  • IDM access problem

    I have problem with access via the protocol https and IPS 4215 5.0 (1) IAM from connection when you are prompted for the user name and password when I login - java applet starts to load but that IE window is suddenly closed... I tried to install, uni

  • Where can I buy a Windows 7 Home Premium product key?

    All the links that I received and I found myself links all went to Windows 8 pages and he's really starting to annoy me now, I have 3 days to activate it and I can't find a page to buy a new product key from anywhere. Please help me.