# Configuring Windows Workloads (Windows 2022 or later) for Migration

## Prerequisites

- Configured to boot as EFI or BIOS
- Virtualization Based Security (VBS) is enabled
- Secure Boot is enabled
- Trusted Platform Module (TPM) is disabled
- The virtual machine (VM) has access to the recovery partition. If not, a Windows Recovery Environment (Windows RE) disc or the installation media to access the menus referenced in this section is required.
- Ensure that an active migration plan includes the configured VM.

## About this task

Migrating Windows workloads from VMware vCenter Clouds to HVM Clusters using the bulk Migrations feature requires some initial configurations checks. This section goes through an example preparation process for a Windows VM running on vCenter.

## Procedure

Boot into the Windows Recovery Environment

1. Restart the Windows guest in the [Windows Recovery Environment (Windows RE)](https://support.microsoft.com/en-us/windows/windows-recovery-environment-0eb14733-6301-41cb-8d26-06a12b42770b).
2. If prompted, choose a keyboard layout.
3. Select the Troubleshoot > Command Prompt option.
4. In the Command Prompt, check the disk availability: `diskpart`.
5. Verify that disks that are available: `list disk`. 

   NOTE

   If you receive the message There are no fixed disks to show, or the disk with Windows OS is not listed, follow the steps to mount the drives.

   1. Mount the VMware Tools Installer to the VM using the Actions > Guest OS > Install VMware Tools
   2. Open diskpart and find the CD/DVD-ROM drive letter: `list volume`
   3. Note the CD-ROM drive letter (for example `D:`, as shown:![Enter diskpart command line tool and list disks](https://support.hpe.com/hpesc/public/api/document/sd00008014en_us/GUID-6D43B362-18E8-4E21-8CE1-733555398E59-high.png)
   4. In the Command Prompt session, check the disk visibility: `diskpart`
   5. Verify the disks are available: `list disk`
   6. **Optional:**  Assign drive letter: 

      ```
      ```
      list volume
      ```
      ```

      ```
      ```
      select volume 1  
      assign letter=c
      ```
      ```

      ```
      ```
      list volume
      ```
      ```

      ![Assigning a drive letter to a volume](https://support.hpe.com/hpesc/public/api/document/sd00008014en_us/GUID-8506AA86-13D4-4086-B361-5C5AB0CFC5E9-high.png)
   7. Exit diskpart: `exit`
   8. Unmount the VMware Tools Installer from the VM back in the vCenter console Actions > Guest OS > Unmount VMware Tools Installer.
6. Download the <https://fedorapeople.org/groups/virt/virtio-win/direct-downloads/latest-virtio/> latest or <https://fedorapeople.org/groups/virt/virtio-win/direct-downloads/stable-virtio/> VirtIO drivers ISO to your local workstation.
7. Add the ISO to vCenter by uploading it to either a datastore or to the Content Library.
8. Mount the ISO using a CD-ROM device on the VM and ensure it is connected.
9. Inject the VirtIO storage drivers in to the Windows boot-start drivers from the mounted ISO where the drive letter is system dependant and 2k22 is dependent on the file structure: `dism /image:C:\ /add-driver:D:\viostor\2k22\amd64\viostor.inf`![installing viostor.inf driver](https://support.hpe.com/hpesc/public/api/document/sd00008014en_us/GUID-A481A334-59CE-42D9-857D-0B5FDEE31BAB-high.png) `dism /image:C:\ /add-driver:D:\vioscsi\2k22\amd64\vioscsi.inf` ![installing vioscsi.inf driver](https://support.hpe.com/hpesc/public/api/document/sd00008014en_us/GUID-10CEA2F9-9885-464E-A57B-303AC913FBBD-high.png)

   NOTE

   If successful, the Command Prompt displays a message confirming successful driver package installation.
10. Close the diskpart window: `exit`
11. Click Continue to boot Windows.
12. After logging in, navigate to the mounted VirtIO ISO.
13. Install `virtio-win-gt-x64.msi` and `virtio-win-guest-tools.exe` from the ISO root, using default selections during the installation process.
14. After the installation is complete, unmount all the ISOs attached to the VM (if any). You can unmount the ISOs either by ejecting them in Windows or by setting the CD-ROM drive to Client Device in vCenter.
15. Shutdown the VM.

    NOTE

    The VMware Cloud integration could be configured to automatically maintain the power state of the associated VMs using AUTOMATICALLY POWER ON VMS option. To ensure that this option is temporarily disabled, navigate to InfCloInfrastructure > Clouds > Cloud and then clear AUTOMATICALLY POWER ON VMS. Save the changes to the Cloud, and then power off the VM from vCenter or from the guest OS. Changing this configuration might affect all the VMs associated with the Cloud in the product.
16. Reboot the system.
17. Run the migration plan that includes the configured VM. For more information on creating and running migration plans, see [Migration Plans](https://support.hpe.com/hpesc/public/api/document/sd00008014en_us/render?page=GUID-3A627DBF-D797-42A2-A9AC-AAC321376068.html).

Post-conversion

18. In the Wondows guest, navigate to Settings > Apps > Startup and turn off VMware Tools Core Service, to prevent VMware Tools from executing at startup. See the following sample screenshot of a Windows 2022 guest.  
    ![Turning off VMware Tools Core Service at Windows guest startup](https://support.hpe.com/hpesc/public/api/document/sd00008014en_us/GUID-EEC38EAD-A903-41BD-8C98-BACAC114BA0E-high.png)  

    Alternatively, you can uninstall VMware Tools using Microsoft recommended processes and tooling for addressing blockers that prevent uninstalling programs. For more information, see <https://support.microsoft.com/en-us/topic/fix-problems-that-block-programs-from-being-installed-or-removed-cca7d1b6-65a9-3d98-426b-e9f927e1eb4d>. Fix problems that block programs from being installed or removed.

## Results

The bulk migration from VMware vCenter Clouds to HVM Clusters is complete.
