[#]: subject: "Install Windows 11 as Guest in Ubuntu using virt-manager" [#]: via: "https://www.debugpoint.com/install-windows-ubuntu-virt-manager/" [#]: author: "Arindam https://www.debugpoint.com/author/admin1/" [#]: collector: "lkxed" [#]: translator: " " [#]: reviewer: " " [#]: publisher: " " [#]: url: " " Install Windows 11 as Guest in Ubuntu using virt-manager ====== **A complete guide to install Windows as a guest operating system in Ubuntu, Linux Mint host using the open-source virt-manager (KVM/Qemu/libvirt).** If you are planning to get rid of Windows completely but want to access Windows-specific applications while being in Ubuntu, then it’s easier to try it out in a virtual machine. Although there are many virtualization applications, we will use the powerful virt-manager application for this guide. Virtualization is the process of creating and managing virtual machines, which are isolated environments that mimic the behaviour of physical computers. Virt-manager leverages KVM, a virtualization technology built into the Linux kernel, and Qemu, a hardware emulator that enables the execution of guest operating systems. Additionally, virt-manager utilizes libvirt, a library for managing virtualization technologies, to provide a seamless and feature-rich virtualization experience. Before starting the Windows 11 installation, you need to prepare your system and get the Windows 11 ISO file from the official download page. ### Download Windows ISO file Visit the official download page below. Choose Windows 11 64-bit and language. And download the ISO file. The ISO size of Windows 11 is around ~6GB. [Download Windows 11][1] ![Windows 11 Download location][2] ### Install and Set up virt-manager in Ubuntu, Linux Mint Open a terminal and run the following command to install virt-manager. ``` sudo apt install virt-manager ``` After installation is complete, add the current user to the libvirt group. For the below example, replace “debugpoint” with your user name of the Ubuntu/Linux Mint system. ``` sudo adduser debugpoint libvirt ``` Then, start the libvirt daemon using: ``` sudo systemctl start libvirtd ``` And finally, start the virtual network. ``` sudo virsh net-start default ``` This should complete the installation of the virt-manager. For a detailed installation guide, [visit this tutorial][3]. ### Set up TPM 2.0 in Ubuntu for virt-manager One of the requirements of Windows 11 is TPM 2.0 (Trusted Platform Module 2.0). TPM is a hardware-based security mechanism enabling Windows 11 to perform secure facial-based authentication, BitLocker, etc. However, if you install it in a virtual machine, you have to tweak certain settings in virt-manager and need specific packages. Open a terminal and install the following packages. ``` sudo apt install ovmf swtpm swtpm-tools ``` ### Install Windows 11 in virt-manager on Ubuntu, Linux Mint Before you proceed, make sure to reboot your Ubuntu or Linux Mint system after installing the above packages. #### Create virtual machine Open “Virtual machine manager” from the application menu. Click on New. ![New Virtual machine][4] In the “New VM” window, choose “Local install media..”. Click Forward. ![New VM window][5] Choose the downloaded Windows 11 ISO file by clicking **Browse > Browse****Local** button. Click forward. ![Select the Windows 11 ISO file][6] Enter memory as 8 GB or 8192 and CPU as 4. This is the minimum value. You can enter more if your hardware is capable of this setup. Click forward. ![Memory and CPU][7] Enter storage as 40 GB (minimum) on the next screen. Make sure to check the “Enable storage for this virtual machine”. And click forward. ![Enter storage size][8] In the final screen, give a name to your virtual machine. For example, I gave “win11”. Make sure to check the option “Customize configuration before install”. Click finish. ![Final screen for initial set up][9] #### Configure TPM and other parameters In the configuration window, go to the “Overview” page. Select the following values. Keep the rest unchanged. - Chipset=Q35 - Firmware=BIOS **Note**: You may choose UEFI modules, but the Windows 11 ISO will not boot and may get stuck in the TIANOCORE Plymouth screen. ![Set Chipset and Firmware][10] Go to the CPU page and make sure the vCPU allocation = 4. Click on the “Add Hardware” button at the bottom left. ![Add hardware][11] Select TPM from the left pane. Then select the following and hit Finish once done. - Type: Emulated - Model: TIS - Version: 2.0 ![TPM settings][12] You should see the TPM 2.0 on the left side of the window. Now all the configuration is complete. ![Begin installation][13] Hit the “Begin installation” button at the top. #### Installing Windows 11 If all goes well, you should see the Windows logo and followed by the below screen. Choose Language, Keyboard and hit Next. ![Windows 11 installer in virt-manager - first screen][14] Click Install Now on the next screen. Wait for a few moments. On the active Windows page, click on “I don’t have a product key”. ![Product key page][15] Select Windows 11 Home in the version selection screen. ![Select Windows version][16] **Note**: If you received the following error after clicking Next in the above screen – “This PC can’t run Windows 11”, then do the following to bypass all the checks. If you don’t find this error, skip this section. ![Compatibility error][17] Press `SHIFT+F10` to bring up the command prompt. Type `regedit` and hit enter. ![Open registry editor][18] Go to `HKEY_LOCAL_MACHINE\SYSTEM\Setup`. Right-click and select `New > Key`. Add the key name as `LabConfig`. While `LabConfig` is selected, add `New > DWORD (32 bit) Value`. Add the name as BypassTPMCheck. Then right-click on the name and select **Modify**. Give the **value as 1**. ![Adding key values][19] Repeat the above steps to add `BypassRAMCheck` and `BypassSecureBootCheck`. Set the value to 1 for both. Finally, the LabConfig key set up should look like the below: ![Final key setup][20] Close the registry editor and command prompt. Click on the back arrow to start the installation process. Select “Custom: Install Windows only (advanced)” in the Windows set up screen. Select the virt-manager driver and hit next. The installation will start. Wait for a few minutes for it to complete. ![Windows 11 install started in virt-manager][21] #### Setting up If all goes well, you should see the first set-up screen for Windows 11 inside virt-manager. It will be a series of screens where you need to provide various settings. ![Windows 11 boot up - first screen][22] Follow the on-screen instructions in the next few screens. Remember that Windows 11 requires an online Microsoft account to log in, such as Hotmail, Office 365 or Outlook. And you need to be connected to the internet. If all goes well, you should see Windows 11 running inside virt-manager in Ubuntu or Linux Mint. ![Windows 11 running as guest in virt-manager][23] ### Conclusion I hope by following the step-by-step process outlined in this article, you can set up a virtual machine using virt-manager and install Windows 11 as a guest in Ubuntu or Linux Mint host. If you run into errors, do let me know in the comment box. -------------------------------------------------------------------------------- via: https://www.debugpoint.com/install-windows-ubuntu-virt-manager/ 作者:[Arindam][a] 选题:[lkxed][b] 译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 [a]: https://www.debugpoint.com/author/admin1/ [b]: https://github.com/lkxed/ [1]: https://www.microsoft.com/software-download/windows11 [2]: https://www.debugpoint.com/wp-content/uploads/2023/06/Windows-11-Download-location.jpg [3]: https://www.debugpoint.com/virt-manager/ [4]: https://www.debugpoint.com/wp-content/uploads/2023/06/New-Virtual-machine.jpg [5]: https://www.debugpoint.com/wp-content/uploads/2023/06/New-VM-window.jpg [6]: https://www.debugpoint.com/wp-content/uploads/2023/06/Select-the-Windows-11-ISO-file.jpg [7]: https://www.debugpoint.com/wp-content/uploads/2023/06/Memory-and-CPU.jpg [8]: https://www.debugpoint.com/wp-content/uploads/2023/06/Enter-storage-size.jpg [9]: https://www.debugpoint.com/wp-content/uploads/2023/06/Final-screen-for-initial-set-up.jpg [10]: https://www.debugpoint.com/wp-content/uploads/2023/06/Set-Chipset-and-Firmware.jpg [11]: https://www.debugpoint.com/wp-content/uploads/2023/06/Add-hardware.jpg [12]: https://www.debugpoint.com/wp-content/uploads/2023/06/TPM-settings.jpg [13]: https://www.debugpoint.com/wp-content/uploads/2023/06/Begin-installation.jpg [14]: https://www.debugpoint.com/wp-content/uploads/2023/06/Windows-11-installer-first-screen.jpg [15]: https://www.debugpoint.com/wp-content/uploads/2023/06/Product-key-page.jpg [16]: https://www.debugpoint.com/wp-content/uploads/2023/06/Select-Windows-version.jpg [17]: https://www.debugpoint.com/wp-content/uploads/2023/06/Compatibility-error.jpg [18]: https://www.debugpoint.com/wp-content/uploads/2023/06/Open-registry-editor.jpg [19]: https://www.debugpoint.com/wp-content/uploads/2023/06/Adding-key-values.jpg [20]: https://www.debugpoint.com/wp-content/uploads/2023/06/Final-key-setup.jpg [21]: https://www.debugpoint.com/wp-content/uploads/2023/06/Windows-11-install-started-in-virt-manager.jpg [22]: https://www.debugpoint.com/wp-content/uploads/2023/06/Windows-11-boot-up-first-screen.jpg [23]: https://www.debugpoint.com/wp-content/uploads/2023/06/Windows-11-running-as-guest-in-virt-manager-2048x1280.jpg