QEMU/KVM on ThinkPad X230T Laptop with Dual-boot: Difference between revisions
Line 13: | Line 13: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
== Setup the virtual machine == | == Setup the virtual machine == | ||
The setup of the virtual machine is done via the <code>virt-manager</code> 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.<syntaxhighlight lang="xml" line="1"> | The setup of the virtual machine is done via the <code>virt-manager</code> 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. | ||
<syntaxhighlight lang="xml" line="1" highlight="5"> | |||
<disk type="block" device="disk"> | <disk type="block" device="disk"> | ||
<driver name="qemu" type="raw" cache="none" discard="unmap"/> | <driver name="qemu" type="raw" cache="none" discard="unmap"/> | ||
Line 20: | Line 21: | ||
<address type="drive" controller="0" bus="0" target="0" unit="0"/> | <address type="drive" controller="0" bus="0" target="0" unit="0"/> | ||
</disk> | </disk> | ||
</syntaxhighlight>In most how-to manuals they suggest to use <code><target dev="vdX" bus="virtio"/></code> , | </syntaxhighlight> | ||
In most how-to manuals they suggest to use <code><target dev="vdX" bus="virtio"/></code>, | |||
== References == | == References == |
Revision as of 09:08, 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>
In most how-to manuals they suggest to use <target dev="vdX" bus="virtio"/>
,
References
- Ask Ubuntu: Add physical disk to KVM virtual machine