• Buy Now
    • Rackspace Cloud
    • Email & Apps
    • Fanatical Support for AWS
    • Managed Google Cloud Platform
    • Office 365
  • Log In
    • MyRackspace Portal
    • Cloud Control Panel
    • Rackspace Webmail Login
    • Cloud Office Control Panel
  • Rackspace Logo
  • Developer Home
  • Developer Documentation
  • Blogs ▼
    • Technical Blog
    • Rackspace Blog
    • Solve: Thought Leadership
  • Support Documentation

Developer Docs


Let’s Build Something Powerful Together!

End-to-End Multicloud Solutions.   Solving Together.™   Learn more at Rackspace.com

Submit an issue
  • Microsoft Private Cloud Hyper-V Customer Handbook
  • About Microsoft Hyper-V
    • Roles and responsibilities
      • Managed virtual machines
      • Unmanaged virtual machines
    • Licensing
      • Virtual machine licensing
  • Getting started with Microsoft Hyper-V
    • Microsoft Hyper-V architecture
    • Microsoft Hyper-V features
      • Rackspace Hyper-V managed services
    • Microsoft Server 2016
    • Add-on services
      • Hyper-V Replica
        • Hyper-V Extended Replication
        • Requesting a failover
      • Cloud Replication for Hyper-V
        • Requesting a failover
  • Microsoft Hyper-V user manual
    • Manage permissions
      • Assigning permissions by user
      • Assigning permissions by product
      • Managing groups
      • Changing global permissions
    • Credentials management
      • Windows Server 2016 (v2)
        • Rackspace
        • Customer
      • Windows Server 2012 (v1)
        • Rackspace
        • Customer
    • Datastore overhead
      • Why does Rackspace require this?
      • What else can consume space on my datastores?
    • Ordering virtual machines
      • Virtual machine OS images
      • Create a new managed virtual machine
      • Create a new unmanaged virtual machine
      • Converting unmanaged VM to managed
    • Managing virtual machines
      • Start or resume a virtual machine
      • Shut down a virtual machine
      • Checkpoint a virtual machine
        • Reverting a checkpoint
        • Delete a checkpoint
      • Export virtual machines
      • Resize virtual hard disks
      • Making a virtual machine highly available
      • Remove and delete virtual machines
    • Decommissioning virtual machines and hypervisors
    • Virtual Fibre Channel SAN
      • Deploying virtual SAN
    • Migrating from Server 2012 to 2016
  • Frequently asked questions
  • Additional resources
    • SLA information
    • Additional links
  • Disclaimer

Managing virtual machines#

With Microsoft Hyper-V, you can use the PowerShell command-line interface or the Management Virtual Machine UI, which contains all your remote server administration tools to administer your hosted environment and resources.

The following instructions are for self-service. If you want the Rackspace Microsoft Hyper-V Support team to perform any of the following tasks, create a support ticket.

Start or resume a virtual machine#

  • Use the following command to start or resume a virtual machine by using

PowerShell:

  1. To start a particular virtual machine, run the following command with name of the virtual machine:

    Start-VM -Name <virtualMachineName>
    
  2. To resume a particular virtual machine that has been left in a paused state, run the following command with name of the virtual machine:

    Resume-VM -Name <virtualMachineName>
    
  • Use the following instructions to start or resume a virtual machine by using the Management VM:
    1. To start up the virtual machine, select Start from the right-hand action list.
    2. To resume the virtual machine from a paused state, click Resume from the right-hand action list.

Shut down a virtual machine#

  • To shut down a virtual machine by using PowerShell through the guest operating system, use the following command for a graceful shut down:

    Stop-VM -Name <virtualMachineName>
    

    If the graceful shut down doesn’t work, you can force the VM to shut down by using the following command:

    Stop-VM -Name <virtualMachineName> -TurnOff
    

    Note

    For more information on stopping VMs, see the Stop-VM Microsoft documentation.

  • To shut down a virtual machine by using the Management VM, select the virtual machine that you want to shut down from the centered list.

    1. To gracefully power down the virtual machine, select Shut down from the right-hand action list.
    2. If the graceful shut down doesn’t work, you can force the VM to shut down by selecting Turn off from the right-hand action list.

Checkpoint a virtual machine#

Note

The Hyper-V PowerShell module has several aliases. The terms checkpoint and snapshot can be used interchangeably.

This document uses checkpoint.

Microsoft Hyper-V utilizes a standard checkpoint. A standard checkpoint takes a snapshot of the virtual machine and virtual machine memory state at the time the checkpoint is initiated. A checkpoint is not a full backup and can cause data consistency issues with systems that replicate data between different nodes, such as Active Directory.

Warning

As checkpoint files grow, it can affect all virtual machines on the hypervisor. For this reason, Rackspace recommends keeping no longer than a two-day checkpoint. After this time, you can delete the checkpoint, or Rackspace can revert to the checkpoint and original disks.

  • Use the following command to snapshot a virtual machine by using PowerShell:

    Checkpoint-VM -Name <virtualMachineName>
    
  • Use the following instructions to create a checkpoint by using the Management VM:

    1. In the Management VM, select the virtual machine that you want to checkpoint.
    2. Right-click the name of the virtual machine, and then click Checkpoint.
    3. When the process is complete, the checkpoint appears under Checkpoints in the Management VM.

Reverting a checkpoint#

If you want to revert your virtual machine to a previous point in time, you can apply an existing checkpoint.

  • Use the following commands to apply a checkpoint by using PowerShell:

    1. Get a list of checkpoints for a virtual machine by using the following command:

      Get-VMCheckpoint -VMName <virtualMachineName>
      
    2. Apply the checkpoint by using the following command:

      Restore-VMCheckpoint -Name <checkpointName> -VMName <virtualMachineName> -Confirm:$false
      
  • Use the following instructions to revert a checkpoint by using the Management VM:

    1. In the Management VM, under Virtual Machines, select the virtual machine to which you want to apply a checkpoint.

    2. In the Checkpoints section, right-click the checkpoint that you want to use and click Apply.

    3. A dialog box appears with the following options:

      • Create Checkpoint and Apply: Creates a new checkpoint of the virtual machine before it applies the earlier checkpoint.
      • Apply: Applies only the checkpoint that you have chosen. You cannot undo this action.
      • Cancel: Closes the dialog box without doing anything.
    4. Select either Apply option to create and apply the checkpoint.

Delete a checkpoint#

Deleting checkpoints can help create space on your Hyper-V host. Checkpoints are stored as .avhdx files in the same location as the .vhdx files for the virtual machine. When you delete a checkpoint, Hyper-V merges the .avhdx and .vhdx files for you. After the merge completes, the checkpoint's .avhdx file is deleted from the file system.

Note

You should not delete the .avhdx files directly.

  • Use the following commands to delete a checkpoint by using PowerShell:

    Remove-VMCheckpoint -VMName <virtualMachineName> -Name <checkpointName>
    
  • Use the following instructions to delete a checkpoint using the Management VM:

    1. In Management VM, in the Checkpoints section, right-click the checkpoint that you want to delete, and the click Delete.
    2. Confirm that it is the correct checkpoint, and then click Delete.

For more information on managing Hyper-V checkpoints, see the Microsoft Work with Checkpoints.

Export virtual machines#

Note

The Hyper-V PowerShell module has several aliases. The terms export and clone can be used interchangeably.

This document uses export.

An export gathers all required files into one unit: virtual hard disk files, virtual machine configuration files, and any checkpoint files. This function can be performed when the machine is running or stopped.

  • To export a virtual machine by using PowerShell, open a session as Administrator and run the following command:

    Export-VM -Name <virtualMachineName> -Path <path>
    
  • Use the following instructions to export a virtual machine by using the Management VM:

    1. In the Management VM, right-click the virtual machine that you want to export and select Export.
    2. Choose where to store the exported files, and then click Export.

Resize virtual hard disks#

Resizing a virtual hard disk shrinks or expands the size of the disk. Resizing the virtual hard disk is an offline operation. The virtual hard disk must not be attached when the operation is initiated.

Important

When considering resizing virtual hard disks, keep in mind that .vhd files cannot be shrunk, only expanded, whereas .vhdx files can perform both functions.

Rackspace recommends using .vhdx files.

  • Use the following command to resize a virtual hard disk by using PowerShell:

    Resize-VHD -Path <path> -SizeBytes <size>
    

    Note

    -Path and -SizeBytes are required parameters when running this command. For more information, see the PowerShell documentation for resize-vhd.

  • Use the following instructions to resize a virtual hard disk by using the Management VM:

    1. In the Actions pane, click Edit Disk.

    2. On the introductory page, click Next.

    3. Browse for the location of the disk that you want to edit.

    4. Choose to Expand or Shrink (.vhdx only) the virtual hard disk. If the VM is off, you will see additional options. Click Next.

    5. Choose the new size of the disk in GB, and then click Next.

      A progress dialog box appears. Shrinking a virtual hard disk happens instantly, but expanding takes some time.

Reimage a virtual machine ~~~~~~~~~~~~~~~~~~~~~~~~Z

Reimaging your virtual machine involves removing the primary operating system drive from the virtual machine and attaching a new one.

You might reimage your VM if you want to upgrade to a new version or to a completely new operating system.

If you have a managed or unmanaged virtual machine from Rackspace and you want to reimage, submit a ticket to your Rackspace Microsoft Hyper-V Support team

Making a virtual machine highly available#

Use the following commands to make a virtual machine highly available (HA) by using PowerShell:

  1. Create a virtual machine specifically for HA. Ensure that the VM has a memorable name:

    New-VHD -Path <PathToVHDXFile> -Dynamic -SizeBytes <size> –SwitchName <switchName> –BootDevice <deviceType> -VHDPath <PathToVHDXFile>
    
  2. Assign the location and the memory size:

    New-VHD -Name <name> -Path <PathToVMFolder> -Memory <memory>
    
  3. Specify that this VM will be installed from an .iso file:

    Add-VMDvdDrive -VMName <virtualMachineName> –Path <PathtoISOFile>
    
  4. Configure the virtual machine for high availability:

    Set-VM –Name <virtualMachineName> –AutomaticStartAction Nothing
    
    Add-ClusterVirtualMachineRole -VirtualMachine FailoverTest
    
  • Use the following instructions to make a virtual machine highly available by using the Management VM:

    1. Ensure that the VM is built and is running on your local hypervisor.

    2. In the left-hand panel, click on Failover Cluster Manager.

    3. Right click on Roles in the cluster manager and then click Configure Role.

    4. The High Availability Wizard displays. Click Next to continue.

    5. Scroll through the dialog box and select the Virtual Machine role.

    6. Select the virtual machine(s) that you want to configure for high availability, and then click Next.

      The wizard configures your chosen VM as a highly available role.

      Close the dialog once the wizard is complete.

Remove and delete virtual machines#

The Remove-VM cmdlet deletes a virtual machine. Running this cmdlet deletes the virtual machine's configuration file but does not delete any virtual hard drives. If the virtual machine has any checkpoints, these are deleted and merged into the virtual hard disk files after the virtual machine is deleted.

If you want to remove or delete a virtual machine from your environment, submit a ticket with your Rackspace Microsoft Hyper-V Support team.

Previous Ordering virtual machines
Next Decommissioning virtual machines and hypervisors
Developer Network
  • Developer Center
  • API Documentation and User Guides
  • SDKs
  • Rackspace How-To
Blogs
  • Technical Blog
  • Rackspace Blog
  • Solve: Thought Leadership
Other Information
  • Customer Stories
  • Events
  • Programs
  • Careers
  • Style Guide for Technical Content
©2020 Rackspace US, Inc.
  • ©2020 Rackspace US, Inc.
  • About Rackspace
  • Privacy Statement
  • Website Terms
  • Trademarks