Jump to content

Aa617

Members
  • Posts

    33
  • Joined

  • Last visited

Posts posted by Aa617

  1. Since upgrading I cand no longer pass through devices to VMs, All worked fine before upgrade. The error I get is below, anyone else run into this or know a fix? Thanks

    internal error: process exited while connecting to monitor: 2017-04-06T15:47:37.246554Z qemu-system-x86_64: -device vfio-pci,host=04:00.0,id=hostdev0,bus=pci.2,addr=0x4: vfio: failed to set iommu for container: Operation not permitted
    2017-04-06T15:47:37.246596Z qemu-system-x86_64: -device vfio-pci,host=04:00.0,id=hostdev0,bus=pci.2,addr=0x4: vfio: failed to setup container for group 19
    2017-04-06T15:47:37.246603Z qemu-system-x86_64: -device vfio-pci,host=04:00.0,id=hostdev0,bus=pci.2,addr=0x4: vfio: failed to get group 19
    2017-04-06T15:47:37.246620Z qemu-system-x86_64: -device vfio-pci,host=04:00.0,id=hostdev0,bus=pci.2,addr=0x4: Device initialization failed

  2. gridrunner,

     

    Watched the video (great work on these vids btw, i check them out every friday) and had a couple questions for you. From the video I take it the 6450 is your primary graphics adapter for unraid and you also pass this card to vms? Have you seen any stability issues with this? I did the same with a RX380X however after several hours it would become unstable and text would become garbled. Aslo if I shut down the VM I could not passthrough the card again. Have you seen these issues with the 6450? Also have you tried using the Nvidia card for an extended period of time as the main graphics adapter as well as passing it to the VM? Any issues shutting down and restarting the VM. Thanks again...

  3. On the smbios tab there is a wand icon on the right hand side. Click it and you will see icons for different types of Macs. Click the iMac image and scroll down the list to 14,2 and select. Go to file and save, then quit clover, unmount your EFI partition with the tool and reboot your computer. If you have any kexts installed you may need to reinstall them.

  4. So I have changed my OSX VM to Clover and OVMF (Thank you so much gridrunner for the vids and associated files) and upgraded to 10.12 (again thank you gridrunner and peter_sm). There are couple things I still havent been able to acomplish and I wonder if someone can give me a little more info on how to do so. The first is how to install HDMIAudio.kext. I have moved it to S/L/E and run the commands via an article I found ("sudo chmod -R 755 HDMIAudio.kext" "sudo chown -R root:wheel HDMIAudio.kext") but it did not work. Second is how to use Clover to change how your system appears in about this mac. Right now it shows as a late 2009 iMac with 4 x 2.2GHz Intel Core Solo... Thanks in advance for any help.

  5. I am running into the same issue and have been trying to figure out why for a couple weeks. I am using a xeon e5-2670 and using (watch grep \"cpu MHz\" /proc/cpuinfo) I can confirm the CPU is booting to 3200MHz however my windows VM shows it at 2200 MHz.

     

    Windows doesn't have access to CPU information running as a VM. It will always just show the base clock as the speed

     

    Thanks for the response, the base clock should be 2600 MHz. CPU benchmarks seem to be low for what it is. Anything I can check or do?

  6. So I haven't had time to switch off Hyper-V for my second VM to see if will make a difference, but I did want to ask a question before I do that.

     

    I have tried changing the order of the cards on the mobo because I have seen that can make a difference.

     

    Why is that?

     

    Is there an article that someone can point me to as to why it makes a difference?

     

    The order and speed is as follows:

     

    Slot 1: PCI-E x16

    Slot 2: PCI-E x8

    Slot 3: PCI-E x4

     

    Thanks!

     

    A couple reasons I can think of off the top of my head would be,

    1. Some motherboards (generally lower cost boards) do not have an option for choosing which graphics adapter is the primary in this case your may need to move the card to a different slot so the host OS does not use it.

    2. Another reason may be that 2 or more slots are in the same IOMMU group. In this case you may move the card to another slot to try to get it into a IOMMU group that is not being used by another VM.

     

    I am sure there are other reasons this may work and someone may chime in with a couple more. My experience has always been to try one thing at a time and work the problem not the solution... In your case you have already confirmed that you primary graphics is set to integrated so unraid should not be using the card. With ACS on the cards are in separate groups (while somewhat artificial this should be fine). I would next try to turn off Hyper V since it is just a mater of clicking a button and trying to start the VM. You could also try moving the second card to see if you can get it into another IOMMU group with ACS off. Let us know what you try and the results..... 

  7. No Hyper V is windows virtualization... It a hypervisor like KVM on Linux. If you do not plan to run virtual machines on this virtual machine it won't matter if you turn it off...

    You should Google what hyper-v in kvm does. In short it' could lead to better performance in windows guests.

     

    Do not take this as me doubting or disputing what you said here because I am not. It sounds like you may know much more on the subject than I do. I did google it and most of what I found was discussing nested virtualization. I did find one article on better windows VM performance but it did not give much info.

     

    As to my experience I have 2 windows 10 VMs one with Hyper V on and one with it off. The one with it off is because with it on I had trouble passing through my MSI GTX 960. With it off no problem. The other VM has a R9 380X and has had no trouble. I will also note I do not notice any major difference between them in terms of performance. Again this is simply my experience and me trying to help the OP.

     

    I still consider myself fairly new to some of the concepts but I am enjoying learning as I go and If I can help someone that finds them self in a position I once was in I am happy to try. I am not embarrassed to say I have leaned on some of the more experienced forum members such as yourself a few times and appreciate the help all of you offer.

     

     

  8. So I have been experimenting with these and wanted to start a thread to discuss. My interest in them is I use a Xeon on a consumer board(e5 2670 on x79) which means I need one gpu just for unraid. I hate giving up a x16 slot for unraid when I almost never hook it up to a monitor. My use case works great. I am able to set the gpu in the adapter as the primary GPU which I have in the basement of my case completely out of site. This frees up a x16 slot for another GPU to be passed through to a VM.

     

    A few additional points

     

    The small X1 and usb3 connector while a snug fit and depends on the GPU can fit in a x1 slot under a 2 slot GPU

     

    Depending on where you want to place the GPU there are a few variants of this set up... Different length of usb cables and size of the pcb that the x 16 slot is on. For my use I got one with a longer usb cable and a wider pcb that also had suction cup mounts for the four corners. If you were wanting to place it in a free pcie bracket (maybe one below your motherboard I would go with one with a smaller pcb.

     

    These are inexpensive to purchase and many are available on both amazon and ebay. I paid less than $10 for mine on amazon.

     

  9. I have an idea to try and a question... First the question do you have the integrated graphics set as the primary in the uefi? If not unraid may be grabbing the 550... If you do in fact have the IG set as primary try turning hyper v off. I have had some issues with passthrough of certain devices to Windows vms with hyperv turned on... If you arent planning on doing any virtualizing with the vm this will not hurt anything.

  10. Thanks for the help archedraft!

     

    The only qemu file I'm finding is in /flash/config/plugins/dynamix.kvm.manager

     

    I'm a bit of a novice, am I looking in the right place? Is the file even supposed to be on the UNRAID flash?

     

    The current contents of the qemu file don't look anything like the bit that's in jwegman's example:

     

    #!/usr/bin/env php

     

    <?php

    if (!isset($argv[2]) || $argv[2] != 'start') {

    exit(0);

    }

     

    $strXML = file_get_contents('php://stdin');

     

    $doc = new DOMDocument();

    $doc->loadXML($strXML);

     

    $xpath = new DOMXpath($doc);

     

    $args = $xpath->evaluate("//domain/*[name()=qemu:commandline]/*[name()=qemu:arg]/@value");

     

    for ($i = 0; $i < $args->length; $i++){

    $arg_list = explode(',', $args->item($i)->nodeValue);

     

    if ($arg_list[0] !== 'vfio-pci') {

    continue;

    }

     

    foreach ($arg_list as $arg) {

    $keypair = explode('=', $arg);

     

    if ($keypair[0] == 'host' && !empty($keypair[1])) {

    vfio_bind($keypair[1]);

    break;

    }

    }

    }

     

    exit(0); // end of script

     

     

     

    function vfio_bind($strPassthruDevice) {

    // Ensure we have leading 0000:

    $strPassthruDeviceShort = str_replace('0000:', '', $strPassthruDevice);

    $strPassthruDeviceLong = '0000:' . $strPassthruDeviceShort;

     

    // Determine the driver currently assigned to the device

    $strDriverSymlink = @readlink('/sys/bus/pci/devices/' . $strPassthruDeviceLong . '/driver');

     

    if ($strDriverSymlink !== false) {

    // Device is bound to a Driver already

     

    if (strpos($strDriverSymlink, 'vfio-pci') !== false) {

    // Driver bound to vfio-pci already - nothing left to do for this device now regarding vfio

    return true;

    }

     

    // Driver bound to some other driver - attempt to unbind driver

    if (file_put_contents('/sys/bus/pci/devices/' . $strPassthruDeviceLong . '/driver/unbind', $strPassthruDeviceLong) === false) {

    file_put_contents('php://stderr', 'Failed to unbind device ' . $strPassthruDeviceShort . ' from current driver');

    exit(1);

    return false;

    }

    }

     

    // Get Vendor and Device IDs for the passthru device

    $strVendor = file_get_contents('/sys/bus/pci/devices/' . $strPassthruDeviceLong . '/vendor');

    $strDevice = file_get_contents('/sys/bus/pci/devices/' . $strPassthruDeviceLong . '/device');

     

    // Attempt to bind driver to vfio-pci

    if (file_put_contents('/sys/bus/pci/drivers/vfio-pci/new_id', $strVendor . ' ' . $strDevice) === false) {

    file_put_contents('php://stderr', 'Failed to bind device ' . $strPassthruDeviceShort . ' to vfio-pci driver');

    exit(1);

    return false;

    }

     

    return true;

    }

     

    You have to modify the file using nano either with a monitor and key board connected to the server or through putty on windows or ssh on mac or linux. Type nano /etc/libvirt/qemu.conf in the command line then scroll down to the area arch quoted and make the changes needed. Other have gotten this to work for them hower after making the changes I still get the same error. It is worth a try though. Good luck, let us know if you get it working, or need anymore help.

  11. Ok so what I think is going on is as follows... The file does not exist until I start the array, once I start the array I can view it through the console with nano /etc/libvirt/qemu.conf. I tried stopping the array with the file open in nano making the changes and saving before restarting the array but once the array is started i view the file again with nano and my changes are not there. If I again shut down the array and open with nano I get the file with the changes made... Any ideas what is going on?

  12.  

     

    @tsouza11

     

    On 6.2 rc2 & 3, I had to modify my /etc/libvirt/qemu.conf and update the cgroup_device_acl to include the dev nodes of the vfio/##'s, in the below example, 17 and 13 (that entire property array may have been commented out).  Per your post, you need to use /dev/vfio/26:

     

    cgroup_device_acl = [
        "/dev/null", "/dev/full", "/dev/zero",
        "/dev/random", "/dev/urandom",
        "/dev/ptmx", "/dev/kvm", "/dev/kqemu",
        "/dev/rtc","/dev/hpet", "/dev/vfio/vfio",
        "/dev/vfio/17",
        "/dev/vfio/13"
    ]
    

     

    ...so stop the array, modify /etc/libvirt/qemu.conf, then start the array and your VM.

     

    Maybe this is a noob question but can you be more specific on how to modify /etc/libvirt/qemu.conf? I am having the same problem as above and can't figure it out. Thanks...

     

    In the unraid console, do

    nano /etc/libvirt/qemu.conf

    scroll down to the cgroup device acl line and the lines needed

     

    I tried that however the file is empty.

  13. @tsouza11

     

    On 6.2 rc2 & 3, I had to modify my /etc/libvirt/qemu.conf and update the cgroup_device_acl to include the dev nodes of the vfio/##'s, in the below example, 17 and 13 (that entire property array may have been commented out).  Per your post, you need to use /dev/vfio/26:

     

    cgroup_device_acl = [
        "/dev/null", "/dev/full", "/dev/zero",
        "/dev/random", "/dev/urandom",
        "/dev/ptmx", "/dev/kvm", "/dev/kqemu",
        "/dev/rtc","/dev/hpet", "/dev/vfio/vfio",
        "/dev/vfio/17",
        "/dev/vfio/13"
    ]
    

     

    ...so stop the array, modify /etc/libvirt/qemu.conf, then start the array and your VM.

     

    Maybe this is a noob question but can you be more specific on how to modify /etc/libvirt/qemu.conf? I am having the same problem as above and can't figure it out. Thanks...

  14. I have run into a bit of an issue with my setup. I have passed through a usb pci card to my windows 10 vm and all is well as long as I do not shut down or restart the vm. Not always but often when I shut down the VM the card is no longer available to the host or the VM. Using lspci cmd the card still shows however at the end it changes from (rev 1) to (rev ff). Once this happens the only way I have found to fix it is to restart the host machine. I have fast start in Windows disabled as well as hibernate and am on high performance power profile.

     

    So my first question is if anyone has any ideas on how to correct the issue so that upon restart/shut down, restart the card is always available?

     

    Second question is assuming I can not correct the problem is there any way to reset the card from the cmd line without having to restart the whole server? Thus far everything I have tried comes back with permission denied.

     

    Thanks in advance.

×
×
  • Create New...