Convert the PwK Kali VM for use with QEMU/KVM in virt-manager

2 minute read Published: 2019-09-11

If (like me) you're after your OSCP and thus enrolling in the PwK course, you're given a Kali Linux VM to use in VMware format (vmdk).

If (like me) you prefer to keep all your virt open source and already run other VMs with qemu/KVM/libvirt, then we'll need to do something about that.

Firstly, extract the .7z if you haven't already with 7z x pwk-kali-vm.7z. You will be presented with a giant mess of .vmdk files, split into a million pieces. Thankfully qemu-img is much more clever than it used to be, so all you need to do is run:

qemu-img convert -f vmdk -O qcow2 OffsecVM-2018.3-20180821-cl2.vmdk offsecvm.qcow2

and you're good, just import offsecvm.qcow2. The only other thing I needed to do now that I have my qcow2 formatted disk image is to change it from VirtIO to SATA inside virt-manager. I personally like virt-manager, but obviously you could just use raw qemu or libvirt to do the same.

If importing the vmdk into VMware, you'd get 2 CPUs and 2GB of RAM, I copied this except gave it 4GB for good measure.

Once the VM is created in virt-manager, as I mentioned before all you have to do is go to the disk and change it to SATA. If you want copy-paste support, make sure the display server is Spice and apt install spice-vdagent inside Kali. Restart the VM and you should now share a clipboard.

There's no real need to do this, I just prefer to use open source instead of proprietary freeware and I'd rather not have three separate hypervisors running on my system.