<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.manjaro.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Regis</id>
	<title>Manjaro - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.manjaro.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Regis"/>
	<link rel="alternate" type="text/html" href="https://wiki.manjaro.org/index.php?title=Special:Contributions/Regis"/>
	<updated>2026-05-23T16:43:03Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.36.1</generator>
	<entry>
		<id>https://wiki.manjaro.org/index.php?title=Virt-manager&amp;diff=29197</id>
		<title>Virt-manager</title>
		<link rel="alternate" type="text/html" href="https://wiki.manjaro.org/index.php?title=Virt-manager&amp;diff=29197"/>
		<updated>2021-10-25T18:40:19Z</updated>

		<summary type="html">&lt;p&gt;Regis: Missing hyphen before &amp;#039;G&amp;#039; option&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;languages/&amp;gt;&lt;br /&gt;
__TOC__&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
= Overview = &amp;lt;!--T:1--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:2--&amp;gt;&lt;br /&gt;
[[file:topbar_logo.png|left]]&lt;br /&gt;
&amp;lt;br clear=&amp;quot;all&amp;quot; /&amp;gt;&lt;br /&gt;
{{tip|Have you heard about Virtualbox to virtualize operating systems like Linux and Windows or Mac? It &amp;#039;a good software, but not the only one! Don&amp;#039;t forget VMware, Gnome Boxes and ...virt-manager. }}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:3--&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:4--&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;[https://virt-manager.org/ Virt-manager]&amp;#039;&amp;#039;&amp;#039; uses &amp;#039;&amp;#039;&amp;#039;[http://libvirt.org/ libvirt]&amp;#039;&amp;#039;&amp;#039; and it&amp;#039;s a manager of many &amp;#039;&amp;#039;&amp;#039;[https://libvirt.org/drivers.html hypervisors]&amp;#039;&amp;#039;&amp;#039;, including the one that we want to use here: QEMU/KVM. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:5--&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:6--&amp;gt;&lt;br /&gt;
&amp;lt;br clear=&amp;quot;all&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:7--&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Why do I need to virtualize?&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:8--&amp;gt;&lt;br /&gt;
* To learn about a new O.S.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:9--&amp;gt;&lt;br /&gt;
* To configure a hardware that has a setup only for that operating system&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:10--&amp;gt;&lt;br /&gt;
* To use a software that only works on another&lt;br /&gt;
&lt;br /&gt;
= I want to know more = &amp;lt;!--T:11--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:12--&amp;gt;&lt;br /&gt;
[[file:Hypervisor_1.png|left]]&lt;br /&gt;
&amp;lt;br clear=&amp;quot;all&amp;quot; /&amp;gt;&lt;br /&gt;
1. &amp;#039;&amp;#039;&amp;#039;[https://en.wikipedia.org/wiki/Virtualization Virtualization]&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;br clear=&amp;quot;all&amp;quot; /&amp;gt;&lt;br /&gt;
2. &amp;#039;&amp;#039;&amp;#039;[https://en.wikipedia.org/wiki/Hypervisor Hypervisor]&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;br clear=&amp;quot;all&amp;quot; /&amp;gt;&lt;br /&gt;
3. &amp;#039;&amp;#039;&amp;#039;[https://en.wikipedia.org/wiki/Virtual_machine Virtual machine]&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;br clear=&amp;quot;all&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= What we absolutely must know = &amp;lt;!--T:13--&amp;gt;&lt;br /&gt;
&amp;lt;br clear=&amp;quot;all&amp;quot; /&amp;gt;&lt;br /&gt;
1. What is my CPU. Identify it and make sure it&amp;#039;s at least a quad core. &amp;#039;&amp;#039;&amp;#039;TAKE A LOOK AT&amp;#039;&amp;#039;&amp;#039; &amp;#039;&amp;#039;&amp;#039;[http://www.cpu-world.com/CPUs/CPU.html CPU-World]&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;br clear=&amp;quot;all&amp;quot; /&amp;gt;&lt;br /&gt;
2. Check if the &amp;#039;virtualization parameters&amp;#039; are enabled on BIOS using &lt;br /&gt;
 LC_ALL=C lscpu | grep Virtualization&lt;br /&gt;
3. How much memory I have. Check the RAM and verify that is at least 4GB.&lt;br /&gt;
&amp;lt;br clear=&amp;quot;all&amp;quot; /&amp;gt;&lt;br /&gt;
4. The amount of free space on my hard drive. The virtual machine can use a disk image file so extra partitions are not necessary. &lt;br /&gt;
{{note|You can also use raw partition specific for virtual machines. See [https://wiki.archlinux.org/title/Partitioning partitioning] for more information}}&lt;br /&gt;
5. The minimum hardware requirements of the operating system you want to install as a virtual machine.&lt;br /&gt;
&amp;lt;br clear=&amp;quot;all&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Install virt-manager, qemu and all dependencies= &amp;lt;!--T:16--&amp;gt;&lt;br /&gt;
&amp;lt;br clear=&amp;quot;all&amp;quot; /&amp;gt;&lt;br /&gt;
From terminal:&lt;br /&gt;
 sudo pacman -S virt-manager qemu vde2 iptables-nft dnsmasq bridge-utils openbsd-netcat edk2-ovmf swtpm&lt;br /&gt;
Enable and start service&lt;br /&gt;
 sudo systemctl enable libvirtd.service&lt;br /&gt;
 sudo systemctl start libvirtd.service&lt;br /&gt;
Add user to &amp;#039;&amp;#039;libvirt&amp;#039;&amp;#039; group to use the &amp;#039;&amp;#039;&amp;#039;system&amp;#039;&amp;#039;&amp;#039;-level virtual machines (qemu:///system)&lt;br /&gt;
 sudo usermod -a -G libvirt $USER&lt;br /&gt;
{{note|&lt;br /&gt;
# You don&amp;#039;t need this step to run system-level virtual machines. However, virt-manager will prompt for sudoer&amp;#039;s password when launch if the user is not in the &amp;#039;&amp;#039;libvirt&amp;#039;&amp;#039; group  &lt;br /&gt;
# You can also create &amp;#039;&amp;#039;&amp;#039;user&amp;#039;&amp;#039;&amp;#039;-level virtual machines (qemu:///session) and use without sudoer&amp;#039;s privelige. However, some features such as [https://libvirt.org/kbase/virtiofs.html VirtioFS file sharing] may be unavailable in qemu:///session}}&lt;br /&gt;
&lt;br /&gt;
= Using Virt-Manager for guest creation= &amp;lt;!--T:17--&amp;gt;&lt;br /&gt;
&amp;lt;br clear=&amp;quot;all&amp;quot; /&amp;gt;&lt;br /&gt;
0. Prepare installation image. If you&amp;#039;re going to install Windows, prepare the [https://www.linux-kvm.org/page/WindowsGuestDrivers/Download_Drivers Virtio driver] image too.&lt;br /&gt;
{{tip|You can also find the [https://aur.archlinux.org/packages/virtio-win virtio-win] package in AUR. The image is located in &amp;#039;&amp;#039;&amp;#039;/var/lib/libvirt/images&amp;#039;&amp;#039;&amp;#039;, which is the default [https://libvirt.org/storage.html#StorageBackendDir directory pool] of qemu:///system}}&lt;br /&gt;
&amp;lt;br clear=&amp;quot;all&amp;quot; /&amp;gt;&lt;br /&gt;
1. Launch menu Virtual Machine Manager. It should already have a [https://libvirt.org/drvlxc.html LXC] connection. You can disconnect and remove it if you don&amp;#039;t use LXC.&lt;br /&gt;
&amp;lt;br clear=&amp;quot;all&amp;quot; /&amp;gt;&lt;br /&gt;
2. Go to File, choose Add Connection and choose hypervisor QEMU/KVM, or QEMU/KVM user session if you don&amp;#039;t want &amp;#039;&amp;#039;&amp;#039;system&amp;#039;&amp;#039;&amp;#039;-level virtual machines. Click on connect.&lt;br /&gt;
&amp;lt;br clear=&amp;quot;all&amp;quot; /&amp;gt;&lt;br /&gt;
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.&lt;br /&gt;
&amp;lt;br clear=&amp;quot;all&amp;quot; /&amp;gt;&lt;br /&gt;
{{tip|My advice: use a different partition than the root. In case you need to reinstall your operating system you don&amp;#039;t lose the VM that already ready-to-start.}}&lt;br /&gt;
4. Click on create a new virtual machine: select &amp;#039;&amp;#039;&amp;#039;Local install media (ISO image or CDROM)&amp;#039;&amp;#039;&amp;#039;, and select the installation ISO image and OS type (if not detected).&lt;br /&gt;
&amp;lt;br clear=&amp;quot;all&amp;quot; /&amp;gt;&lt;br /&gt;
5. How many CPU assign and how much memory? (check the recommended requirements of O.S. that you are installing)&lt;br /&gt;
&amp;lt;br clear=&amp;quot;all&amp;quot; /&amp;gt;&lt;br /&gt;
6. Create the file system of the virtual machine by selecting &amp;#039;&amp;#039;&amp;#039;Select or create custom storage&amp;#039;&amp;#039;&amp;#039; and click &amp;#039;&amp;#039;&amp;#039;Manage...&amp;#039;&amp;#039;&amp;#039;. Under your desired directory pool, create the volume of the virtual machine (default in qcow2 format).  How many GB? Check the recommended requirements O.S. you install.&lt;br /&gt;
&amp;lt;br clear=&amp;quot;all&amp;quot; /&amp;gt;&lt;br /&gt;
7.Assign a name to the machine and flag &amp;#039;&amp;#039;&amp;#039;customize configuration before install&amp;#039;&amp;#039;&amp;#039;. You have access to the screen with all the hardware that will be virtualized, do a check if there is all that is needed to initialize and launch the installer.&lt;br /&gt;
&amp;lt;br clear=&amp;quot;all&amp;quot; /&amp;gt;&lt;br /&gt;
8. In &amp;#039;&amp;#039;Overview&amp;#039;&amp;#039;, change the firmware to UEFI for future-proof capacity.&lt;br /&gt;
&amp;lt;br clear=&amp;quot;all&amp;quot; /&amp;gt;&lt;br /&gt;
9. Change the type of SATA Disk 1 (the disk image of the creating virtual machine) to &amp;#039;&amp;#039;virtio&amp;#039;&amp;#039; for better performance. Change discard mode to &amp;#039;&amp;#039;unmap&amp;#039;&amp;#039;, and then apply the change. You should notice the device name would change from SATA Disk 1 to VirtIO Disk 1.&lt;br /&gt;
{{warning| If you&amp;#039;re installing Windows, make sure to create a new SATA CDROM device and select the &amp;#039;&amp;#039;&amp;#039;virtio-win&amp;#039;&amp;#039;&amp;#039; image as the media, so that the Windows Installer can load the driver to recognize the disk. The virtio storage driver should be located at somewhere like &amp;#039;&amp;#039;E:\viostor\w10\amd64&amp;#039;&amp;#039;}}&lt;br /&gt;
10. Set the NIC type to virtio too for better network performance.&lt;br /&gt;
{{note| If you&amp;#039;re installing Windows, once the system if ready, make sure to install all the virtio drivers so that your virtIO network can work normally}}&lt;br /&gt;
11. Add TPM chip, select &amp;#039;&amp;#039;&amp;#039;TIS&amp;#039;&amp;#039;&amp;#039; model through &amp;#039;&amp;#039;&amp;#039;Emulated device&amp;#039;&amp;#039;&amp;#039; backend.&lt;br /&gt;
&amp;lt;br clear=&amp;quot;all&amp;quot; /&amp;gt;&lt;br /&gt;
12. Add a watchdog to reboot the guest when it hangs. Leave the settings as default.&lt;br /&gt;
&amp;lt;br clear=&amp;quot;all&amp;quot; /&amp;gt;&lt;br /&gt;
13. And a hardware RNG, to get entropy from the host.&lt;br /&gt;
&amp;lt;br clear=&amp;quot;all&amp;quot; /&amp;gt;&lt;br /&gt;
14. Click on the top to start installation.&lt;br /&gt;
&amp;lt;br clear=&amp;quot;all&amp;quot; /&amp;gt;&lt;br /&gt;
{{warning|&amp;#039;&amp;#039;&amp;#039;All these steps are visible on youtube.&amp;#039;&amp;#039;&amp;#039; &amp;#039;&amp;#039;&amp;#039;[https://youtu.be/DiUG_hlLk3c &amp;gt;&amp;gt;&amp;gt; PLAY THIS] [[File:YouTube_1.png|thumb|center|300px]]&amp;#039;&amp;#039;&amp;#039;}}&lt;br /&gt;
&lt;br /&gt;
==Install guest additions==&lt;br /&gt;
Once the VM is started and running you have to install the [https://www.spice-space.org/download.html spice guest tools].&lt;br /&gt;
&amp;lt;br clear=&amp;quot;all&amp;quot; /&amp;gt;&lt;br /&gt;
For Windows is a single package: spice-guest-tools-xxxx.exe&lt;br /&gt;
&amp;lt;br clear=&amp;quot;all&amp;quot; /&amp;gt;&lt;br /&gt;
For linux are: spice-vdagent and xf86-video-qxl. If you visrtualize a linux distro you can install them with their package manager&lt;br /&gt;
&amp;lt;br clear=&amp;quot;all&amp;quot; /&amp;gt;&lt;br /&gt;
Visit: &amp;#039;&amp;#039;&amp;#039;[http://www.spice-space.org/download.html Spice download]&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
==Tune the display settings==&lt;br /&gt;
The default model of display card is QXL. If your virtual machine is Linux system, you can change it to virtio and enable 3D acceleration for better graphic performance. &lt;br /&gt;
&amp;lt;br clear=&amp;quot;all&amp;quot; /&amp;gt;&lt;br /&gt;
Windows virtual machine, however doesn&amp;#039;t support virtio display yet. Nevertheless, we can increase its VGA memory from the default 16 MB to 64 MB to allow higher display resolution and slightly better 2D graphical performance.&lt;br /&gt;
&amp;lt;br clear=&amp;quot;all&amp;quot; /&amp;gt;&lt;br /&gt;
To do so, we need to edit the XML file of the virtual machine.&lt;br /&gt;
# In virt-manager, go to edit &amp;gt; preference, and check &amp;#039;&amp;#039;&amp;#039;Enable XML edit&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
# In virtual machine details, go to display card. Under the XML tab, change the value of &amp;#039;&amp;#039;&amp;#039;vgamem&amp;#039;&amp;#039;&amp;#039; to 65536, then apply the change.&lt;br /&gt;
&amp;lt;br clear=&amp;quot;all&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==File sharing between host and guest==&lt;br /&gt;
For Linux guests, Virtio-FS and 9p are available for file sharing. See [https://wiki.archlinux.org/title/Libvirt#Sharing_data_between_host_and_guest ArchWiki] for more information.&lt;br /&gt;
&amp;lt;br clear=&amp;quot;all&amp;quot; /&amp;gt;&lt;br /&gt;
For Windows guest, the easiest way to share file between host and guest is through [https://wiki.manjaro.org/index.php/Using_Samba_in_your_File_Manager SAMBA].&lt;br /&gt;
# Create a SAMBA usershare&lt;br /&gt;
# In Windows guest, enter &amp;#039;&amp;#039;&amp;#039;\\192.168.122.1&amp;#039;&amp;#039;&amp;#039; in the file explorer, and you should be able to see the usershare on your host.&lt;br /&gt;
# Map that SAMBA usershare to a new drive, and connect to it with the appropriate credential. That&amp;#039;s it.&lt;br /&gt;
Check [https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html/configuring_and_managing_virtualization/sharing-files-between-the-host-and-its-virtual-machines_configuring-and-managing-virtualization#sharing-files-between-the-host-and-windows-virtual-machines_sharing-files-between-the-host-and-its-virtual-machines this article] for more information.&lt;br /&gt;
&amp;lt;br clear=&amp;quot;all&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Optimize vCPU==&lt;br /&gt;
Check [https://docs.fedoraproject.org/en-US/Fedora/13/html/Virtualization_Guide/ch25s06.html this article] to customize vCPU topology for better performance.&lt;br /&gt;
&amp;lt;br clear=&amp;quot;all&amp;quot; /&amp;gt;&lt;br /&gt;
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.&lt;br /&gt;
&amp;lt;br clear=&amp;quot;all&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= References = &amp;lt;!--T:18--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--T:19--&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;[https://virt-manager.org/ Virt-manager]&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;br clear=&amp;quot;all&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;[http://libvirt.org/ Libvirt]&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;br clear=&amp;quot;all&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;[http://wiki.qemu.org/Main_Page Qemu]&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;br clear=&amp;quot;all&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;[https://en.wikipedia.org/wiki/X86_virtualization x86 virtualization]&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;br clear=&amp;quot;all&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;[http://ark.intel.com/Products/VirtualizationTechnology Intel-vt]&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;br clear=&amp;quot;all&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;[http://www.amd.com/en-gb/innovations/software-technologies/processors-for-business/virtualization Amd-v]&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;br clear=&amp;quot;all&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
[[Category:Contents Page{{#translation:}}]]&lt;/div&gt;</summary>
		<author><name>Regis</name></author>
	</entry>
</feed>