Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Unable to create physical vDisk (Can use other drives though)

Featured Replies

Hi,

 

I am unable to passthrough one of my drives to a VM as it cannot be found?  I use copy and paste and have been able to do this successfully with 2 other unassigned devices but not the one I want due to the following error.

 

image.png.8bdc32378c68104860f613361485afbe.png

 

I have tried editing a VM and creating a new one with the same results.  It is not a typo as I copy and paste and can do it with other disks, any help would be really appreciated!

 

image.png.377aca4e88dd77af9ad2c998e57a5be5.png

 

 

 

unraidserver-diagnostics-20190301-0106.zip

It is possible, I use the following section in mine to do that very thing:

    <disk type='file' device='disk'>
      <driver name='qemu' type='raw'/>
      <source file='/dev/disk/by-id/ata-Hitachi_HDS5C3030ALA630_MJ1321YNG06KNA'/>
       <target dev='sdc' bus='scsi'/>
    </disk>

Would need the XML file for your VM to troubleshoot further...

 

Edit: 

Quote

2019-02-28 23:59:31.521+0000: 30801: error : qemuOpenFileAs:3143 : Failed to open file '/dev/disk/by-id/ata-HUS156030VLS600_JXV0KHVJ/cache/VMS/Windows 10/vdisk2.img': No such file or directory

Your libvirt log file shows this error several times, it indicates that you are trying to get to files on the drive through an invalid file path...  There is nothing in a block device driver after the device id, so the ".../cache/VMS/Windows 10/vdisk2.img" portion of that line just breaks things...

Edited by Warrentheo

  • Author

Hi,

 

Many thanks for your reply,

 

I am not able to share the xml as I cannot create the VM at all (see first screenshot) I am able to add the other device shown on screenshot 2 (Toshiba) and I tried another disk as well which worked fine it is just the SAS Drive I cannot add (HUS156030VLS600_JXV0KHVJ)

 

This is how I am trying to add it and this is exactly how I am able to add other drives

 

As soon as I click create I get the error, I tried adding the disk on it's own as well with no success

 

image.png.efda501bbcd0e21a15ff0e6195ed6335.png

  • Author

Hi,

 

Many thanks for your reply,

 

I am not able to share the xml as I cannot create the VM at all (see first screenshot) I am able to add the other device shown on screenshot 2 (Toshiba) and I tried another disk as well which worked fine it is just the SAS Drive I cannot add (HUS156030VLS600_JXV0KHVJ)

 

This is how I am trying to add it and this is exactly how I am able to add other drives

 

As soon as I click create I get the error, I tried adding the disk on it's own as well with no success

 

image.png.efda501bbcd0e21a15ff0e6195ed6335.png

  • Author

I am however able to add the device using sdk which I know can change... this is really strange!

 

/dev/disk/by-id/ata-HUS156030VLS600_JXV0KHVJ - Does not work (Errors above)

/dev/sdk - Works fine!

You probably want to figure out the Virt-Manager docker container using the community applications plugin, or just create the VM without it, then manually edit the VM's XML file to include a section similar to the one I posted above...  The WebUI is expecting a vDisk image, not a real block device...

  • Author
14 hours ago, Warrentheo said:

It is possible, I use the following section in mine to do that very thing:


    <disk type='file' device='disk'>
      <driver name='qemu' type='raw'/>
      <source file='/dev/disk/by-id/ata-Hitachi_HDS5C3030ALA630_MJ1321YNG06KNA'/>
       <target dev='sdc' bus='scsi'/>
    </disk>

Would need the XML file for your VM to troubleshoot further...

 

Edit: 

Your libvirt log file shows this error several times, it indicates that you are trying to get to files on the drive through an invalid file path...  There is nothing in a block device driver after the device id, so the ".../cache/VMS/Windows 10/vdisk2.img" portion of that line just breaks things...

Hi, your XML above shows disk type='file' I thought it had to be disk type='block' ?

  • Author

When using the /dev/sdk (Which Works) it looks like this (block not file)

 

    <disk type='block' device='disk'>
      <driver name='qemu' type='raw' cache='writeback'/>
      <source dev='/dev/sdk'/>
      <target dev='hdc' bus='sata'/>
      <boot order='1'/>
      <address type='drive' controller='0' bus='0' target='0' unit='2'/>
    </disk>

2 minutes ago, mbc0 said:

Hi, your XML above shows disk type='file' I thought it had to be disk type='block' ?

 

Possibly (probably)... But being a Windows VM I don't think it matters, since UnRaid just hands it to QEMU, and QEMU just hands the whole device to Windows...  Linux VM's probably can optimize things in the passthrough, but I don't think Windows does...  Bottom line I have been running it with those lines for over a year, no issue...

  • Author

Ok,

 

So I manually edited the XML but I still get the Invalid Block Location Error 😞

 

<?xml version='1.0' encoding='UTF-8'?>
<domain type='kvm'>
  <name>Windows 10</name>
  <uuid>f8a5970d-d77b-daa6-7ad2-ff712c8e3677</uuid>
  <metadata>
    <vmtemplate xmlns="unraid" name="Windows 10" icon="windows.png" os="windows10"/>
  </metadata>
  <memory unit='KiB'>2097152</memory>
  <currentMemory unit='KiB'>2097152</currentMemory>
  <memoryBacking>
    <nosharepages/>
  </memoryBacking>
  <vcpu placement='static'>1</vcpu>
  <cputune>
    <vcpupin vcpu='0' cpuset='0'/>
  </cputune>
  <os>
    <type arch='x86_64' machine='pc-i440fx-3.0'>hvm</type>
    <loader readonly='yes' type='pflash'>/usr/share/qemu/ovmf-x64/OVMF_CODE-pure-efi.fd</loader>
    <nvram>/etc/libvirt/qemu/nvram/f8a5970d-d77b-daa6-7ad2-ff712c8e3677_VARS-pure-efi.fd</nvram>
  </os>
  <features>
    <acpi/>
    <apic/>
    <hyperv>
      <relaxed state='on'/>
      <vapic state='on'/>
      <spinlocks state='on' retries='8191'/>
      <vendor_id state='on' value='none'/>
    </hyperv>
  </features>
  <cpu mode='host-passthrough' check='none'>
    <topology sockets='1' cores='1' threads='1'/>
  </cpu>
  <clock offset='localtime'>
    <timer name='hypervclock' present='yes'/>
    <timer name='hpet' present='no'/>
  </clock>
  <on_poweroff>destroy</on_poweroff>
  <on_reboot>restart</on_reboot>
  <on_crash>restart</on_crash>
  <devices>
    <emulator>/usr/local/sbin/qemu</emulator>
    <disk type='block' device='disk'>
      <driver name='qemu' type='raw' cache='writeback'/>
      <source dev='/dev/disk/by-id/ata-HUS156030VLS600_JXV0KHVJ'/>
      <target dev='hdc' bus='sata'/>
      <boot order='1'/>
      <address type='drive' controller='0' bus='0' target='0' unit='2'/>
    </disk>
    <disk type='file' device='disk'>
      <driver name='qemu' type='raw' cache='writeback'/>
      <source file='/mnt/cache/VMS/Windows 10/vdisk2.img'/>
      <target dev='hdd' bus='virtio'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x08' function='0x0'/>
    </disk>
    <disk type='file' device='cdrom'>
      <driver name='qemu' type='raw'/>
      <source file='/mnt/user/isos/Windows(FromMS).iso'/>
      <target dev='hda' bus='ide'/>
      <readonly/>
      <boot order='2'/>
      <address type='drive' controller='0' bus='0' target='0' unit='0'/>
    </disk>
    <disk type='file' device='cdrom'>
      <driver name='qemu' type='raw'/>
      <source file='/mnt/user/isos/virtio-win-0.1.141-1.iso'/>
      <target dev='hdb' bus='ide'/>
      <readonly/>
      <address type='drive' controller='0' bus='0' target='0' unit='1'/>
    </disk>
    <controller type='usb' index='0' model='ich9-ehci1'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x7'/>
    </controller>
    <controller type='usb' index='0' model='ich9-uhci1'>
      <master startport='0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0' multifunction='on'/>
    </controller>
    <controller type='usb' index='0' model='ich9-uhci2'>
      <master startport='2'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x1'/>
    </controller>
    <controller type='usb' index='0' model='ich9-uhci3'>
      <master startport='4'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x2'/>
    </controller>
    <controller type='pci' index='0' model='pci-root'/>
    <controller type='ide' index='0'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/>
    </controller>
    <controller type='sata' index='0'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
    </controller>
    <controller type='virtio-serial' index='0'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
    </controller>
    <interface type='bridge'>
      <mac address='52:54:00:86:83:38'/>
      <source bridge='virbr0'/>
      <model type='virtio'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
    </interface>
    <serial type='pty'>
      <target type='isa-serial' port='0'>
        <model name='isa-serial'/>
      </target>
    </serial>
    <console type='pty'>
      <target type='serial' port='0'/>
    </console>
    <channel type='unix'>
      <target type='virtio' name='org.qemu.guest_agent.0'/>
      <address type='virtio-serial' controller='0' bus='0' port='1'/>
    </channel>
    <input type='tablet' bus='usb'>
      <address type='usb' bus='0' port='1'/>
    </input>
    <input type='mouse' bus='ps2'/>
    <input type='keyboard' bus='ps2'/>
    <graphics type='vnc' port='-1' autoport='yes' websocket='-1' listen='0.0.0.0' keymap='en-us'>
      <listen type='address' address='0.0.0.0'/>
    </graphics>
    <video>
      <model type='qxl' ram='65536' vram='65536' vgamem='16384' heads='1' primary='yes'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
    </video>
    <memballoon model='virtio'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/>
    </memballoon>
  </devices>
</domain>

 

P.S. the "Code" button is your friend here...

Edited by Warrentheo

  • Author

Just tried changing block to file and get this error now 

 

Remember it is ONLY this 1 disk I have a problem with, other drives pass through fine using the disk type 'block' and I can only get this disk to pass properly using /dev/sdk

 

image.thumb.png.d81e01ed0fd1914e85491a550f0571ec.png

Archived

This topic is now archived and is closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.