Difference between revisions of "Virt-manager/en"

Updating to match new version of source page
(Updating to match new version of source page)
(Updating to match new version of source page)
Tags: Mobile web edit Mobile edit
Line 40: Line 40:
<br clear="all" />
<br clear="all" />
2. Check if the 'virtualization parameters' are enabled on BIOS using  
2. Check if the 'virtualization parameters' are enabled on BIOS using  
LC_ALL=C lscpu | grep Virtualization
{{UserCmd|command=LC_ALL=C lscpu | grep Virtualization}}
3. How much memory I have. Check the RAM and verify that is at least 4GB.
3. How much memory I have. Check the RAM and verify that is at least 4GB.
<br clear="all" />
<br clear="all" />
Line 51: Line 51:
<br clear="all" />
<br clear="all" />
From terminal:
From terminal:
sudo pacman -S --needed virt-manager qemu-desktop libvirt edk2-ovmf dnsmasq iptables-nft
{{UserCmd|command=sudo pacman -S --needed virt-manager qemu-desktop libvirt edk2-ovmf dnsmasq iptables-nft}}
For TPM support:
For TPM support:
sudo pacman -S --asdeps swtpm
{{UserCmd|command=sudo pacman -S --asdeps swtpm}}
Enable and start service
Enable and start service
sudo systemctl enable libvirtd.service
{{UserCmd|command=sudo systemctl enable libvirtd.service}}
sudo systemctl start libvirtd.service
Add user to ''libvirt,'' ''libvirt-qemu'' and ''kvm'' groups to use the '''system'''-level virtual machines (qemu:///system).
Add user to ''libvirt,'' ''libvirt-qemu'' and ''kvm'' groups to use the '''system'''-level virtual machines (qemu:///system)
{{UserCmd|command=sudo usermod -a -G libvirt,libvirt-qemu,kvm $USER}}
sudo usermod -a -G libvirt,libvirt-qemu,kvm $USER
Note that you will need to restart userspace for the groups to become active.  To restart userspace
{{UserCmd|command=systemctl soft-reboot}}
{{note|
{{note|
# You don't need this step to run system-level virtual machines. However, virt-manager will prompt for sudoer's password when launch if the user is not in the ''libvirt'' group   
# You don't need this step to run system-level virtual machines. However, virt-manager will prompt for sudoer's password when launch if the user is not in the ''libvirt'' group   
Line 74: Line 75:
3. You need directory pools to store the disk images of virtual machines or the ISO file of CD/DVD. Double click qemu/kvm, go on storage and add by clicking + the path to the folder where you have the iso and the folder where create the virtual machine.
3. You need directory pools to store the disk images of virtual machines or the ISO file of CD/DVD. Double click qemu/kvm, go on storage and add by clicking + the path to the folder where you have the iso and the folder where create the virtual machine.


{{BoxInfo|tip|My advice: use a different partition than the root. In case you need to reinstall your operating system you don't lose the VM that already ready-to-start.}}
{{BoxInfo|tip|Advice: use a different partition than the root. In case you need to reinstall your operating system you don't lose the VM that already ready-to-start.}}
4. Click on create a new virtual machine: select '''Local install media (ISO image or CDROM)''', and select the installation ISO image and OS type (if not detected).
4. Click on create a new virtual machine: select '''Local install media (ISO image or CDROM)''', and select the installation ISO image and OS type (if not detected).


Line 133: Line 134:
For example, my CPU has 1 socket, 8 cores, and 16 threads in total. The automatic topology assigns 4 sockets, 1 core, and 1 thread to my guest. After changing it to 1 socket, 4 cores, and 1 thread, the performance increases significantly.
For example, my CPU has 1 socket, 8 cores, and 16 threads in total. The automatic topology assigns 4 sockets, 1 core, and 1 thread to my guest. After changing it to 1 socket, 4 cores, and 1 thread, the performance increases significantly.
<br clear="all" />
<br clear="all" />
=Windows 11=
Windows Setup provides for setting up virtual Windows system for lab purpose. It can be for testing software or for pentesting.
For a continued use of Windows you will need a valid license key to run a virtualized Windows.
==Prepare==
* Create a new virtual machine
* Select a Windows 11 ISO file
* Accept the defaults clicking Next until you reach the final screen
* Tick the box Customize configuration before install and click Finish
* In the Overview pane - set vm firmware to BIOS and click Apply
* Click the button Begin Installation
==Installer==
Before starting the installer press ShiftF10 so launch the Windows Cmd utility and launch regedit.
* Expand HKEY_LOCAL_MACHINE\SYSTEM\Setup
* Add new key named LabConfig
* Add new DWORD value with name BypassTPMCheck and change the value to 1.
* Add new DWORD value with name BypassRAMCheck and change the value to 1.
* Add new DWORD value with name BypassSecureBootCheck and change the value to 1.
Close the registry editor and exit the shell, then continue the installer
==Final Setup==
During last stage the installer will insist in network access but you may want use a local account instead of the required Microsoft account.
This can be disabled using the Cmd utility ShiftF10
This can be disabled using the Cmd utility ShiftF10
* enter OOBE\BYPASSNRO and press Enter
* close the Cmd utility
* back in the setup window click I don't have internet


= References =
= References =
8,560

edits