QEMU/KVM on ThinkPad X230T Laptop with Dual-boot: Difference between revisions
Line 22: | Line 22: | ||
</disk> | </disk> | ||
</syntaxhighlight> | </syntaxhighlight> | ||
In most how-to manuals they | Note you don't need to type the 5th line if your using <code>virt-manager</code> to edit the XML entry for the drive - it will be generated automatically on save. | ||
In most how-to manuals they propose to use <code><target dev="vdX" bus="virtio"/></code>, but it is not possible to use <code>virtio</code> while there is not driver installed within the Windows 10 OS. So you need to install the driver first... or during the installation of Windows if it is new installation. | |||
== Install the guest tools == | |||
The final step of the setup is installing the [[QEMU/KVM Guest tools#Windows Guest tools|QEMU/KVM Guest tools for Windows]], thus the screen will be automatically resized within the SPICE client of <code>virt-manager</code>. | |||
== References == | == References == | ||
* Ask Ubuntu: [https://askubuntu.com/questions/144894/add-physical-disk-to-kvm-virtual-machine Add physical disk to KVM virtual machine] | * Ask Ubuntu: [https://askubuntu.com/questions/144894/add-physical-disk-to-kvm-virtual-machine Add physical disk to KVM virtual machine] | ||
* Ronaldevers.nl: [https://ronaldevers.nl/2012/10/14/adding-a-physical-disk-kvm-libvirt.html Adding a Physical Disk to a Guest with Libvirt / KVM] | |||
* Charleslabri.com: [https://www.charleslabri.com/adding-passthrough-physical-disk-in-kvm-guests/ Adding Passthrough Physical Disk in KVM Guests] | |||
* Ask Fedora: [https://ask.fedoraproject.org/t/why-does-virt-manager-ask-for-authentication-password/11100/2 Why does virt-manager ask for authentication password?] | |||
<noinclude> | <noinclude> | ||
<div id="devStage"> | <div id="devStage"> |
Revision as of 09:28, 13 August 2022
I was in need to access Windows 10 from Kali Linux on my dual booted Lenovo ThinkPad X230T device. So here are the things I've done to achieve that.
Test the Virtualization Capabilities of the System
Check weather the system supports virtualization and it is enabled via the BIOS. The following command must return at least 1
:
egrep -c '(vmx|svm)' /proc/cpuinfo
Install QEMU, KVM, LIBVIRT
sudo apt install qemu-system-x86 libvirt-daemon libvirt-clients bridge-utils virt-manager virtinst libosinfo-bin ovmf remmina
To get rid of the password dialogue – "System policy prevents management of local virtualization systems" – I've added my Linux user to the libvirt
group.
sudo usermod -aG libvirt $USER
Setup the virtual machine
The setup of the virtual machine is done via the virt-manager
GUI. The first "special" thing according to my setup is that both operating systems are installed in UEFI mode, so the virtual machine should be UEFI too. In order to pass-through the physical SSD/HDD you need to do setup ad follow.
<disk type="block" device="disk">
<driver name="qemu" type="raw" cache="none" discard="unmap"/>
<source dev="/dev/sda"/>
<target dev="sda" bus="sata"/>
<address type="drive" controller="0" bus="0" target="0" unit="0"/>
</disk>
Note you don't need to type the 5th line if your using virt-manager
to edit the XML entry for the drive – it will be generated automatically on save.
In most how-to manuals they propose to use <target dev="vdX" bus="virtio"/>
, but it is not possible to use virtio
while there is not driver installed within the Windows 10 OS. So you need to install the driver first… or during the installation of Windows if it is new installation.
Install the guest tools
The final step of the setup is installing the QEMU/KVM Guest tools for Windows, thus the screen will be automatically resized within the SPICE client of virt-manager
.
References
- Ask Ubuntu: Add physical disk to KVM virtual machine
- Ronaldevers.nl: Adding a Physical Disk to a Guest with Libvirt / KVM
- Charleslabri.com: Adding Passthrough Physical Disk in KVM Guests
- Ask Fedora: Why does virt-manager ask for authentication password?