Automatically shutting down individual VMs in an environment

Though this isn’t a capability supported by Skytap, you can use guest OS tools and settings to shut down individual VMs to help keep usage with your account limits. When Skytap detects that an individual VM is shut down or suspended, that VM stops counting against your account usage.

Guest OS-initiated shutdown can be difficult to configure, particularly for Windows VMs. A simpler, more reliable solution is to put an x86 VM in its own environment (with unique auto-shutdown settings) and connect it to VMs in other environments (see Networking between environments).

Automatically shutting down an inactive Windows VM

To automatically shut down individual VMs after a period of inactivity, use the Windows Task Scheduler in each Windows VM. This method allows you set different policies for VMs in the same environment.

To shut down a Windows VM after a period of inactivity
  1. Right-click Start > Run, and then type taskschd.msc to start the Windows Task Scheduler.
  2. In the Actions pane, click Create Task. The General tab of the Create Task window displays.
    1. Type a Name for the task.
    2. Click Change User or Group. The Select User or Group window displays.
    3. Under Enter the object name to select, type Users, and then click OK. general
    4. Check the box next to Run with the highest privileges.
  3. Click the Triggers tab, and then click New. The New Trigger window displays.
    1. From the Begin the task menu, choose On idle, and then click OK. trigger
  4. Click the Actions tab, and then click New. The New Action window displays.
    1. In the Program/script field, type C:\Windows\System32\shutdown.exe.
    2. In the Add arguments field, type /s, and then click OK. action
  5. Click the Conditions tab.
    1. Check the box next to Start the task only if the computer is idle for and choose how long the computer can be idle before the task timer starts.

      The minimum idle time should be at least 15 minutes to allow all Windows services to start.

    2. Check the boxes next to Stop of the computer ceases to be idle and Restart if the idle state resumes. conditions

  6. Click OK to save the scheduled task.

For more information about using Windows Task Scheduler, see Task Scheduler.

Automatically shutting down an inactive Linux VM

There are several open-source tools that will shut down an idle Linux VM. The example below uses GShutdown.

To shut down a Linux VM after a period of inactivity
  1. Download and install GShutdown.
  2. Launch GShutdown.
  3. From the Select a time menu, choose After a delay.
  4. In the fields below, choose how many hours and minutes the guest OS should remain idle before shutting down. gshutdown