Skip to content

Latest commit

 

History

History
142 lines (86 loc) · 3.78 KB

virtual-machine.md

File metadata and controls

142 lines (86 loc) · 3.78 KB

Virtual Machine (VM)

Description

This is a brief description of the topic.

Directory


VM Software Setup

Description

This details how to setup Virt-manager, a software that allows creating and managing VMs.

References

Steps

  1. Install the virt-manager package and its dependencies using yay:

    • qemu-desktop
    • libvirt
    • edk2-ovmf
    • dnsmasq
    • iptables-nft
  2. Start and Enable the libvirtd.service service.

  3. To not need sudo to run the software, add our user to the libvirt group:

    sudo usermod -aG libvirt ${USER}
  4. Edit our qemu.conf config:

    sudo nano /etc/libvirt/qemu.conf

    Uncomment these lines and replace the values with your username:

    # user = "libvirt-qemu"
    # group = "libvirt-qemu"
    

    Sample value assuming our username is myuser:

    user = "myuser"
    group = "myuser"
    

Troubleshooting

  • If Virt-Manager QEMU/KVM is stuck at connecting, restart the libvirtd.service service.

  • To find the cause of the issue, check the status of the libvirtd.service service.

    More often than not, it's likely a configuration issue with a VM. Fixing the configuration should fix the issue.


Optimising Windows VM

Description

This details some steps that can be done on a Windows VM through VirtManager in order to make the experience a little better.

References

Steps

  1. Install Windows VM on an actual disk would make it a lot faster:

    • While creating a new VM on VirtManager, In Step 4 of 5, choose Select or create custom storage.

    • In that field, put in the location of the destination disk (check using sudo blkid).

    • Proceed with installation.

  2. Once Windows has been installed, install VirtIO drivers from Proxmox:

  3. Add a channel for "better" communication between your Host machine to the VM:

    • In the info tab of the VM, click Add Hardware.

    • Click Channel, and pick qemu.guest_agent from the Name dropdown.

    • Click Finish.

  4. (Optional) Set Video model to VirtIO (in some cases, the default QXL model might be better):

    • In the info tab of the VM, locate Video QXL.

    • In the Video QXL section, change the Model to Virtio.

    • Click Apply.

  5. Set CPU cores to a minimum of 4, and ensure that the Windows VM sees all 4 cores:

    • In the Details tab of the VM, get to the CPUs section.

    • Under Topology, select the Manually set CPU topology option.

    • Fill in the following values:

      • Sockets: 1
      • Cores: 4
      • Threads: 1
    • Click Apply.