Skip to content

Instantly share code, notes, and snippets.

@ppetraki
Last active March 7, 2021 16:39
Show Gist options
  • Save ppetraki/83571ce992b06e0fe816e1a794048859 to your computer and use it in GitHub Desktop.
Save ppetraki/83571ce992b06e0fe816e1a794048859 to your computer and use it in GitHub Desktop.
virt-manager raw disk access
virt-manager raw disk access
https://forum.level1techs.com/t/cant-setup-physical-disk-storage-pool-through-virt-manager/124073
You may also need to be a member of the "disk" group too
The goal is to be able to run windows off a native NVMe drive so one can run it as a VM and
as a dual boot configuration
To install windows on a raw device, you'll require the virtio scsi driver. Why? because the raw
device is "attached" by the virtual host bus adapter. Even if you add the device like I show
below, windows won't see it until you add that virtio driver during the install.
https://launchpad.net/kvm-guest-drivers-windows/+download
https://launchpad.net/kvm-guest-drivers-windows/20120712/20120712/+download/virtio-win-drivers-20120712-1.iso
/media/ppetraki/Virtio Drivers/storage/server_2008_r2
Simply create another CDROM device to mount this iso so you can access it from the installer
Finally, the virsh xml snippet:
# virsh edit win10
<disk type='block' device='disk'>
<driver name='qemu' type='raw' cache='unsafe'/>
<source dev='/dev/nvme1n1p1'/>
<target dev='sda' bus='virtio'/>
<boot order='2'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/>
</disk>
Just pick a slot on the pci bus that's available, it doesn't matter
It probably would be a good idea to create a custom image that mixed in the virtio
and spice drivers.
Useful links:
- https://www.spice-space.org/download.html
- https://www.spice-space.org/download/windows/spice-guest-tools/spice-guest-tools-latest.exe
- https://www.spice-space.org/download/windows/qxl-wddm-dod/qxl-wddm-dod-0.21/spice-qxl-wddm-dod-8.1-compatible.zip
- https://www.spice-space.org/download/windows/qxl/qxl-0.1-24/Red_Hat_QXL_0.1.24.2_x64.msi
- https://www.spice-space.org/download/windows/spice-webdavd/spice-webdavd-x64-2.2.msi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment