Managing the VM Lifecycle

This chapter contains the following sections:

Managing the VM Lifecycle

You can perform post-provisioning lifecycle management actions on virtual machines (VMs).

These actions are broadly classified into four categories:

  • VM power management—Power on, power off, pause, resume, shutdown guest, standby, reset, and reboot a VM.

  • VM resizing—Resize a VM and resize a VM disk.

  • VM snapshot management—Create a snapshot, revert a snapshot, mark a snapshot as golden, delete a snapshot, and delete all snapshots.

  • Other VM actions—Create a VM disk, delete a VM disk, repair a VM, add a vNIC, delete a vNIC, save the state of a VM, discard the saved state of a VM, view the VM details, stack view of a VM, assign a VM, assign VM credentials, launch a VM client, and request for inventory collection.


    Step 1   On the menu bar, choose Virtual > Compute.
    Step 2   Expand All Clouds and choose an SCVMM cloud.
    Step 3   Click the VMs tab.
    Step 4   To perform an action on a VM, choose a VM and do one of the following:
    • Click an action such as assign VM, launch VM client, that appears on top of the VMs table.

    • Click the drop-down icon at the top right corner of the VMs table and choose an action.

    • Right-click the VM and choose an action from the drop-down menu.


    Managing VM Power

    You can manage the power functions on VM that includes actions such as power on, power off, suspend power, reset, or reboot the VM.


      Step 1   On the menu bar, choose Virtual > Compute.
      Step 2   Expand All Clouds and choose an SCVMM cloud.
      Step 3   Click the VMs tab.
      Step 4   From the drop-down icon at the top right corner of the VMs table, choose an action.

      The following actions appear according to the power state of the VM.

      Action Description

      Power On

      Powers on the VM.

      Power Off

      Power off the VM.

      Suspend

      Places the VM in a suspended state.

      Shutdown Guest

      Shuts down the Guest OS on the VM.

      Reset

      Performs a hard reset of the VM.

      Step 5   In the VM Task dialog box that appears when you choose an action, complete the following fields:
      Name Description

      VM Name field

      The name of the VM.

      Task field

      Displays the selected power management task.

      Comments field

      Enter comments if necessary.

      Schedule Action radio button

      Click one of the following options:

      • Execute Now—Applies the action on the VM immediately.

      • Execute Later—Applies the action on the VM at the specified date and time.

      Step 6   Click Proceed.

      Resizing a VM

      You can modify the CPU count and memory for a VM, and optionally choose to enable dynamic memory.


        Step 1   On the menu bar, choose Virtual > Compute.
        Step 2   Expand All Clouds and choose an SCVMM cloud.
        Step 3   Click the VMs tab.
        Step 4   Choose the VM that you want to resize.
        Note   

        The VM must be powered off. If the VM is in the on state, turn off the power of the VM using the Power Off action.

        Step 5   Click Resize VM.
        Step 6   In the Resize VM dialog box, complete the following fields:
        Name Description

        VM Name field

        The name of the VM.

        Current Allocated CPU field

        The current CPU on the VM.

        Dynamic Memory field

        Displays the enable status of the dynamic memory on the VM.

        Current Allocated Memory (GB) field

        Displays the current memory on the VM.

        New CPU Count drop-down list

        Choose the new CPU count.

        Enable Dynamic Memorycheck box

        Check the check box if you want to enable dynamic memory.

        New Memory drop-down list

        This field appears when the Enable Dynamic Memory check box is unchecked. Choose the new memory allocation.

        New Startup Memory field

        This field appears when the Enable Dynamic Memory check box is checked. The new startup memory allocation.

        New Maximum Memory (MB) field

        This field appears when the Enable Dynamic Memory check box is checked. The new maximum memory allocation.

        New Memory Buffer(%) field

        This field appears when the Enable Dynamic Memory check box is checked. The new memory buffer allocation, specified as a percentage.

        This is the memory Hyper-V attempts to assign to the VM, compared to the amount of memory needed by the applications and services running inside it.

        Step 7   Click Resize.

        Resizing a VM Disk


          Step 1   On the menu bar, choose Virtual > Compute.
          Step 2   Expand All Clouds and choose an SCVMM cloud.
          Step 3   Click the VMs tab.
          Step 4   Choose the VM that you want to resize.
          Note   

          The VM must be in the power off status. If the VM is in the on status, turn off the power of the VM using the Power Off action.

          Step 5   From the drop-down icon at the top right corner of the VM's table, choose VM Disk Resize.
          Step 6   In the Resize VM Disk dialog box, complete the following fields:
          Name Description

          VM Name field

          The name of the VM.

          Select Disk drop-down list

          Choose the disk to resize.

          Total Provisioned (GB) field

          The total provisioned disk size in gigabytes.

          New Size(GB) field

          The new disk size in gigabytes.

          Step 7   Click Resize.

          Managing VM Snapshots

          You can do the following VM snapshot actions:
          • Create a snapshot

          • Revert a snapshot

          • Delete a snapshot

          • Delete all snapshots

          • Mark a snapshot as golden


          Note


          You can manage the snapshot of the VM that is in the power on state.


          For a selected VM on the VMs tab, choose the following actions from the drop-down icon that appears at the top right corner of the VMs table (or right-click the VM and choose the action from the drop-down menu):
          Name Description

          Create Snapshot

          Creates a snapshot with a name and description.

          Revert Snapshot

          Reverts back to the most recent snapshot of a VM, thereby bringing the VM back on line.

          If the VM crashes or malfunctions, you can revert back to the most recent snapshot. You can also select a specific snapshot to revert back to, if there is more than one snapshot.

          Mark Golden

          Marks a snapshot as golden.

          Marking a snapshot as golden prevents it from being accidentally deleted. The only way to delete a golden snapshot is to unmark the golden snapshot (returning it to a standard snapshot).

          Delete Snapshot

          Deletes a snapshot.

          Delete all Snapshots

          Deletes all snapshots for this VM.

          You can delete all of your snapshots unless a golden snapshot is present. You have to unmark the golden snapshot first before being able to delete all of your snapshots.

          Creating a VM Snapshot

          You can create a snapshot of a VM at any point in time. You can later choose to revert to this snapshot or delete it.


            Step 1   On the menu bar, choose Virtual > Compute.
            Step 2   Expand All Clouds and choose an SCVMM cloud.
            Step 3   Click the VMs tab.
            Step 4   From the drop-down icon that appears at the top right corner of the VMs table, choose Create Snapshot. Alternately, right-click the VM and choose Create Snapshot from the drop-down menu.
            Step 5   In the Create Virtual Machine Snapshot dialog box, complete the following fields:
            Name Description

            Snapshot Name field

            Name for the VM snapshot.

            Snapshot Description field

            Description of the VM snapshot.

            Step 6   Click Proceed.

            Marking a Snapshot as Golden

            You can mark a snapshot as golden to prevent it from being accidentally deleted. The only way to delete a golden snapshot is to unmark the golden snapshot (returning it to a standard snapshot).


              Step 1   On the menu bar, choose Virtual > Compute.
              Step 2   Expand All Clouds and choose an SCVMM cloud.
              Step 3   Click the VMs tab.
              Step 4   From the drop-down icon that appears at the top right corner of the VMs table, choose Mark Golden Snapshot.
              Step 5   In the Mark Golden Snapshot dialog box, complete the following fields:
              Name Description

              Snapshot table

              Choose a snapshot from the list of snapshots created for the VM.

              Mark As Golden Snapshot check box

              Check this check box to designate the snapshot as a golden snapshot.

              Step 6   Click Proceed.

              Managing Other VM Actions

              You can perform the following actions on VMs and VM disks:
              • Manage VM disks—Create, resize, delete

              • Assign a VM

              • Resize a VM

              • Access VM credentials

              • Manage VM state—Save state, discard a saved state

              • Manage vNICs—Add, replace, edit, delete

              • Request an inventory collection

              • Repair a VM after failure

              • View—Details or stack view

              For a selected VM on the VMs tab, choose an action from the drop-down list at the top right corner of the VMs table, or right-click the VM button):
              Name Description

              View Details

              Displays the VM details.

              Assign VM

              Assigns a VM to a group or vDC.

              You can set the provisioning time, termination time, and label for a VM, and modify the VM category, if needed.

              Stack View

              Displays a bird's eye view of the VM information categorized by OS, VM, Hypervisor, and Infrastructure.

              Access VM Credentials

              Accesses the VM web or remote desktop login credentials (Windows VMs only).
              Note   

              This option is only available if the administrator provides the privilege in the catalog for this VM.

              Resize VM

              Resizes a VM.

              You can modify the CPU count, memory, and enable dynamic memory.

              Inventory Collection Request

              Requests an on-demand inventory collection for a selected VM. You can set the maximum time to wait for the inventory collection.

              Save State

              Saves the state of the VM.

              Discard saved state

              Discards a saved state of the VM.

              Add vNIC

              Adds (or replaces) vNICs to the VM.

              Delete vNIC

              Deletes a vNIC that you have added to the VM.

              VM Disk Resize

              Resizes a VM disk.

              You can specify a new size for a VM disk.

              Delete VM Disk

              Deletes a selected VM disk.

              Create VM Disk

              Creates a new VM disk.

              Repair VM Disk

              Repairs a selected VM disk. This button is available for a failed VM.

              Assigning a VM

              You can assign a VM to a group or vDC, and modify the VM category if needed. The provisioning time, termination time, and VM label can also be assigned.


                Step 1   On the menu bar, choose Virtual > Compute.
                Step 2   Expand All Clouds and choose an SCVMM cloud.
                Step 3   Click the VMs tab.
                Step 4   Click Assign VM.
                Step 5   In the Assign VM dialog box, complete the following fields:
                Name Description

                VM Name field

                The name of the VM (non-editable).

                User Group field

                Choose the user group.

                Note   

                Only the groups with valid vDC can be selected.

                Assign to Users check box

                Check this check box to assign the VM to a user.

                User drop-down list

                This field appears when you check the Assign to Users check box. Choose a user from the list of users in selected group.

                Note   

                The user list appears only when the group allows resource assignment for users.

                vDC drop-down list

                Choose a virtual data center (vDC).

                Category drop-down list

                Choose a category of the VM.

                VM User Label field

                VM user label, if necessary.

                Set Provision Time check box

                Check this check box if you want to set the provisioning time.

                If checked, continue to Step 6.

                Provision Date/Time field

                Set the date and time to provision the VM.

                Comments field

                Enter the comments.

                Step 6   Click Assign.

                Creating a VM Disk

                You can create a new VM disk for a selected VM. The disk can be either new, or created from an existing hard disk in the library.


                  Step 1   On the menu bar, choose Virtual > Compute.
                  Step 2   Expand All Clouds and choose an SCVMM cloud.
                  Step 3   Click the VMs tab.
                  Step 4   Click the drop-down icon at the top right corner of the VMs table and choose Create VM Disk.
                  Step 5   In the Create VM Disk dialog box, complete the following fields:
                  Name Description

                  VM Name field

                  The name of the VM (non-editable).

                  Enter Disk Name field

                  The name of the disk.

                  Disk drop-down list

                  Choose to create a new virtual hard disk or create from an existing one.

                  Select SCSI Controller drop-down list

                  Choose a channel and logical unit number (LUN) to which you want to add the disk.

                  Choose Hard Disk field

                  This field appears when you choose to use an existing virtual hard disk. Choose a hard disk from which you want to create a VM disk.

                  Select disk typedrop-down list

                  This field appears when you choose to create a new virtual hard disk. Choose Dynamic or Fixed as the disk type.

                  Disk Size (GB) field

                  The size of disk in gigabytes.

                  Step 6   Click Create.

                  Cloning a VM

                  Cloning a VM makes a copy of an existing VM in order to make a new VM with similar qualities. Cloning can save you time by keeping the parameters that you want from the VM you are cloning from while making adjustments needed for the new VM. The new name given to the clone is defined in the system policy.


                    Step 1   On the menu bar, choose Virtual > Compute.
                    Step 2   Expand All Clouds and choose an SCVMM cloud.
                    Step 3   Click the VMs tab.
                    Step 4   Click the drop-down icon at the top right corner of the VMs table and choose Clone.
                    Step 5   In the Clone VM dialog box, select the group on which you want the VM deployed from the Select Groups field.
                    Step 6   Click Next.
                    Step 7   In the Customization Options pane, complete the following fields:
                    Name Description

                    Category field

                    Click Select to view a list of VDC categories.

                    Select a category and click Select.

                    Post Provisioning Customs Actions check box

                    Click Enable to attach a workflow. The Workflow drop-down list appears with a list of work flows to choose from. The chosen workflow initiates when the provisioning starts.

                    VM App Charge Frequency drop-down list

                    Choose Hourly or Monthly.

                    Active VM Application Cost field

                    The cost for the application that is included in the template.

                    Inactive VM Application Cost field

                    The cost to this catalog of a VM in inactive state per hour or month.

                    Step 8   Click Next.
                    Step 9   In the Deployment Configuration pane, complete the following fields:
                    Name Description

                    Select VDC drop-down list

                    Choose a VDC containing the policies you want for the VM.

                    VM Name or VM Prefix field

                    The VM name or prefix.

                    Comment field

                    Optionally, enter a description of the VDC.

                    Provision drop-down list

                    Choose Now to provision the VDC now or choose Later to provision the VDC later.

                    If you choose Later, then fields to specify the date and time appear.

                    Lease Time check box

                    Check the check box to configure a lease expiration time.

                    Step 10   Click Next.
                    Step 11   In the Custom Specification pane, complete the following fields:
                    Name Description

                    CPU Cores drop-down list

                    Choose the CPU cores for the VM being provisioned.

                    Enable Dynamic Memory check box

                    Check to provision the VM with dynamically allocated memory. You can specify custom memory parameters in the Startup Memory, Maximum Memory, and Memory Buffer drop-down lists.

                    Memory drop-down list

                    Choose the amount of memory for the VM being provisioned.

                    Step 12   Click Next.
                    Step 13   In the Custom Workflow pane, if applicable, complete the required fields.
                    Note   

                    Custom workflow inputs apply if the catalog chosen for VM provisioning has Post Provisioning Custom Actions enabled.

                    Step 14   Click Next.
                    Step 15   In the Select VM Networks pane, if applicable, click the VM Networks pencil icon to edit a VM network.
                    Note   

                    The Select VM Networks pane is empty unless the Allow end user to select optional NICs check box is chosen in the network policy.

                    Step 16   In the Select dialog box, choose one or more clouds that you want associated with the VM.
                    Step 17   Click Submit.
                    Step 18   If you checked the Perform deployment assessment check box, then review the report of the assessment displayed in the Deployment Assessment pane.

                    If this assessment report identifies errors, then you must return to the previous panes and rectify the errors before submitting the request. If the assessment report shows no errors, then click Next.

                    Step 19   In the Select Datastores pane, if applicable, click Select in the Select Datastore field to select one or more datastores to associate with the VM.
                    Note   

                    This option is only available if Allow user to select datastore from scope is checked in the storage policy. The datastore choices that are available depend upon the storage policy that is associated to the VM's VDC.

                    Step 20   Click Next.
                    Step 21   Review the cloned VM information in the Summary panel.
                    Step 22   Click Submit.

                    Managing vNICs

                    You can add a vNIC to a VM, as well as edit, replace, and delete a vNIC. The available options for a vNIC are determined by the network policy mapped to the vDC that is associated with the VM.


                    Note


                    The VM must be powered off to perform vNIC actions. If the VM is in the on state, turn off the power of the VM using the Power Off action.


                    Before You Begin

                    Ensure that a network policy is assigned to the VM network. Turn off the power on the VM.


                      Step 1   On the menu bar, choose Virtual > Compute.
                      Step 2   Expand All Clouds and choose an SCVMM cloud.
                      Step 3   Click the VMs tab.
                      Step 4   Choose a VM that need to be configured with vNICs.
                      Step 5   Click the drop-down icon at the top right corner of the VMs table and choose Add vNICs from the drop-down list.
                      Step 6   In the Add VM vNICs dialog box, complete the following fields:
                      Name Description

                      Operation drop-down list

                      Choose Add or Replace.

                      Note   

                      You cannot add a vNIC if you exceed the vNIC limit configured in the network policy for VMs in the vDC.

                      VM Networks table

                      Click the icon to add, edit, or delete a vNIC.

                      Note   

                      You can only edit or delete a vNIC in the list. You cannot edit or delete pre-existing vNICs in the VM.

                      Step 7   In the Add Entry to VM Networks dialog box, check or uncheck the Use DHCP checkbox.
                      Note   

                      An error message appears if there is no network policy assigned to the VM network.

                      Step 8   Click Close.
                      Step 9   Click Submit.

                      Adding a VM NIC

                      Before You Begin

                      Ensure that the VM is powered off to perform VM NICs actions. If the VM is in the on state, turn off the power of the VM using the Power Off action.


                        Step 1   On the menu bar, choose Virtual > Compute.
                        Step 2   Expand All Clouds and choose an SCVMM cloud.
                        Step 3   Click the VMs tab.
                        Step 4   Choose the VM to which you want to add a VM NIC.
                        Step 5   Click the drop-down icon at the top right corner of the VMs table and choose Add NIC from the drop-down list.
                        Step 6   In the Add VM NIC dialog box, complete the following fields:
                        Name Description

                        Adapter Type drop-down list

                        Choose Synthetic or Emulated. The network adapters are used to connect the virtual machines to internal networks, or to external networks after the virtual machines are deployed on a host. Synthetic network adapters provide better performance than emulated network adapters. Emulated network adapters are available on all virtualization software platforms and allow virtual machines to be connected to virtual networks.

                        VM Network table

                        Network to which you are adding the VM NIC.

                        Subnet field

                        Subnet to which you are adding the VM NIC.

                        Use DHCP check box

                        By default, DHCP is enabled. Uncheck to disable DHCP.

                        Port Classification field

                        Provides global names used to identify different types of virtual network adapter port profiles. The port classification settings remain specific to each logical switch, even if they can be used across multiple logical switches.

                        Step 7   Click Submit.
                        Step 8   Click OK.

                        Editing a VM NIC

                        Before You BeginEnsure that the VM is powered off to perform VM NICs actions. If the VM is in the on state, turn off the power of the VM using the Power Off action.

                          Step 1   On the menu bar, choose Virtual > Compute.
                          Step 2   Expand All Clouds and choose an SCVMM cloud.
                          Step 3   Click the VMs tab.
                          Step 4   Choose the VM you want to configure.
                          Step 5   Click the drop-down icon at the top right corner of the VMs table and choose Edit NIC from the drop-down list.
                          Step 6   In the Edit VM NIC dialog box, make the necessary changes.
                          Step 7   Click Submit.
                          Step 8   Click OK.