win81kvm1.xml - up and working


Recommended Posts

Hi,

 

I managed to start my windows 8.1 VM (win81kvm1). I need some help ...

 

I connect to it using VNC, and can login in my VM. But I notice after a couple of minutes my mouse is frozen. Everything else keeps working also my keyboard. Any ideas?

 

I am running 6b6, a cache disk formatted as btrfs that stores my VM folder:

root@Tower2:/mnt/cache/VM# ls
Win_8_1_64BIT.iso  virtio-win-0.1-81.iso  w81kvm1.qcow2  w81kvm1.xml*

 

My win81kvm1.xml file looks like this:

<domain type="kvm">
<name>w81kvm1</name>
	<uuid>d9fce53d-a056-4096-a05a-a79c2f852df9</uuid><!-- uuidgen -->
<memory unit="GB">2</memory>
<currentMemory unit="GB">2</currentMemory>
<vcpu>2</vcpu>
<os>
	<type arch="x86_64" machine="q35">hvm</type>
	<loader>/usr/share/qemu/bios-256k.bin</loader>
	<boot dev="cdrom" />
</os>
<features>
	<acpi />
</features>
<on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot>
<on_crash>destroy</on_crash>
<devices>
	<disk type="file" device="disk">
		<driver name="qemu" type="qcow2" />
		<source file="/mnt/cache/VM/w81kvm1.qcow2" />
		<target dev="vda" bus="virtio" />
	</disk>
	<disk type="file" device="cdrom">
		<source file="/mnt/cache/VM/Win_8_1_64BIT.iso" />
		<target dev="hdc" bus="usb" />
		<readonly />
	</disk>
	<disk type="file" device="cdrom">
		<source file="/mnt/cache/VM/virtio-win-0.1-81.iso" />
		<target dev="hdd" bus="usb" />
		<readonly />
	</disk>
	<graphics type="vnc" port="5902">
		<listen type="address" address="0.0.0.0" />
	</graphics>
	<interface type="bridge">
		<source bridge="br0" />
		<mac address='52:54:00:00:00:00'/>
	</interface>
	<emulator>/usr/bin/qemu-system-x86_64</emulator>
	<!-- <input type='mouse' bus='ps2' /> -->
	<controller type='usb' index='0' model='ich9-ehci1'>
		<address type='pci' domain='0' bus='0' slot='4' function='7'/>
	</controller>
	<controller type='usb' index='0' model='ich9-uhci1'>
		<master startport='0'/>
		<address type='pci' domain='0' bus='0' slot='4' function='0' multifunction='on'/>
	</controller>
	<hub type='usb'>
		<address type='usb' bus='0' port='1'/>
	</hub>
	<input type='tablet' bus='usb'/>
	<memballoon model="virtio" />
</devices>
</domain>

 

I also attach the devices window:http://i236.photobucket.com/albums/ff75/razzta01/unraid%20as%20host%20-KVM/administradordedispositivos1_zps3b763173.png.

 

I have an nvidia gt9800 card. Any suggestion which version of the nvidia drivers I should install?

 

Rgds.

 

P.s.: Is there any GUI to create VM in KVM like virt-manager in Opensuse?

 

 

Link to comment
  • 3 weeks later...

Hi Peter, I tried your file and still could not make it work.

 

When I start the VM, I cannot access it with tightvncviewer.

 

I attach my .xml:

<domain type='kvm' xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0'>
  <name>w81kvm1</name>
  <uuid>cc411d70-4463-4db7-bf36-d364c0cdaa9d</uuid>
  <memory unit='GB'>2</memory>
  <currentMemory unit='GB'>2</currentMemory>
  <vcpu placement='static'>2</vcpu>
  <resource>
    <partition>/machine</partition>
  </resource>
  <os>
    <type arch='x86_64' machine='q35'>hvm</type>
    <boot dev='cdrom'/>
  </os>
<features>
    <acpi/>
    <apic/>
  </features>
  <cpu mode='host-passthrough'>
  </cpu>
  <clock offset='localtime'/>
  <on_poweroff>destroy</on_poweroff>
  <on_reboot>restart</on_reboot>
  <on_crash>destroy</on_crash>
  <devices>
    <emulator>/usr/bin/qemu-system-x86_64</emulator>
    <disk type='file' device='disk'>
      <driver name='qemu' type='qcow2'/>
      <source file='/mnt/btrfs/VM/w81kvm1.qcow2'/>
      <target dev='vda' bus='virtio'/>
    </disk>
    <disk type='file' device='cdrom'>
      <driver name='qemu' type='raw'/>
      <source file='/mnt/btrfs/VM/Win_8_1_64BIT.iso'/>
      <target dev='sdc' bus='sata'/>
      <readonly/>
    </disk>
    <disk type='file' device='cdrom'>
      <driver name='qemu' type='raw'/>
      <source file='/mnt/btrfs/VM/virtio-win-0.1-81.iso'/>
      <target dev='sdd' bus='sata'/>
      <readonly/>
    </disk>
    <controller type='sata' index='0'>
    </controller>
    <controller type='pci' index='0' model='pcie-root'/>
    <controller type='pci' index='1' model='dmi-to-pci-bridge'>
    </controller>
    <controller type='pci' index='2' model='pci-bridge'>
    </controller>
    <controller type='usb' index='0' model='none'>
    </controller>
    <interface type='bridge'>
    <source bridge='br0'/>
    <mac address='52:54:00:00:00:00'/>  
    <model type='virtio'/>
    </interface>
    <input type='mouse' bus='ps2'/>
    <memballoon model='virtio'/>
  </devices>

</domain>

 

Executing "virsh w81kvm1.xml" does start the VM. To be able to access it I added this lines to the .xml:

	<graphics type='vnc' port='5902'>
	<listen type='address' address='0.0.0.0' />
	</graphics>

 

And this is what I get when I try to start the VM:

root@Tower2:~# cd /mnt/btrfs/VM
root@Tower2:/mnt/btrfs/VM# ls
Win_8_1_64BIT.iso      w81kvm1.qcow2  
virtio-win-0.1-81.iso  w81kvm1.xml*   w81kvm1old.xml*
root@Tower2:/mnt/btrfs/VM# nano w81kvm1.xml
root@Tower2:/mnt/btrfs/VM# virsh create w81kvm1.xml
error: Failed to create domain from w81kvm1.xml
error: (domain_definition):52: expected '>'
</graphics type="vnc" port="5902">

Link to comment
  • 1 month later...

Hi again,

 

After some "hard" time trying to make my windows 8 VM come alive (using Peter´s vfio-bind guide for passthrough), I finally managed to start it. I did configure to allow passthrough for: gpu, audio, 2Xusb and sata port.

 

Still have not been able to test it. Once my windows 8 installation starts, I follow all the steps until I have to choose where (which hdd) to install it. I can see my parity hdd (sdb), my other hdd (sdc) and one hdd (SSD that I mounted manually outside of the array to save my VM and qcow2 files).

 

Doubts I still have:

 

- where should this VM data be saved for better performance (w8.qcow2, w8.cfg, virtio.iso, windows8.iso)? I guess in my ssd outside of the array, right?

 

- how should I format the ssd outside of the array for better performance? I followed both jumperalex´s post (http://lime-technology.com/forum/index.php?topic=30496.0) and jonp´s post (http://lime-technology.com/forum/index.php?topic=33806.0). Finally I did create 1 partition and I formatted it as btrfs.

 

- also, while installing windows 8, once I need to select the partition where it should be installed, I just cannot. I don´t know if the reason is that I created only 1 partition and maybe I should have created 2 partitions: one for the VM data and the other for installind windows 8? I thought that after creating a vdisk (using qcow2 format) this vdisk would be used as my hdd to install my VM...

 

Hope someone can help.

Rgds.

Link to comment
  • 2 weeks later...

Hi,

I managed to set up webvirtmgr and connect to my VM to start the windows 8 installation.

Pls, I need someone to let me know how to solve this just 1 issue I still have:

My array has 3 disks:

-disk1/parity(unidad 0)

-disk2 (unidad 1)

-disk3 SSD (cache only).

http://i236.photobucket.com/albums/ff75/razzta01/mtb/vnc_zpsf5925ccd.png

As you can see when I try to install windows I have no space to do it. How can I install windows to a partition outside of my array?

I am going crazy with this.

This is what I have (disk1/parity is not showing up since I did not add it yet to the array):

NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
md1      9:1    0 698.7G  0 md   /mnt/disk1
sda      8:0    0   7.5G  0 disk
??sda1   8:1    0   7.5G  0 part /boot
sdd      8:48   0 111.8G  0 disk
??sdd1   8:49   0  46.6G  0 part
loop0    7:0    0     3M  0 loop /etc/libvirt

Can I create a new partition in my SSD (sdd) formatted as ntfs to install windows? If yes...how?

Rgds.

EDIT: my .xml:

<domain type='kvm' xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0'>
  <name>w8</name>
  <uuid>cc411d70-4463-4db7-bf36-d364c0cdaa9d</uuid>
  <memory unit='GB'>6</memory>
  <currentMemory unit='GB'>6</currentMemory>
  <vcpu placement='static'>2</vcpu>
  <resource>
    <partition>/machine</partition>
  </resource>
  <os>
    <type arch='x86_64' machine='q35'>hvm</type>
    <boot dev='cdrom'/>
  </os>
  <features>
    <acpi/>
    <apic/>
  </features>
  <cpu mode='host-passthrough'>
  </cpu>
  <clock offset='localtime'/>
  <on_poweroff>destroy</on_poweroff>
  <on_reboot>restart</on_reboot>
  <on_crash>destroy</on_crash>

<devices>
    <emulator>/usr/bin/qemu-system-x86_64</emulator>
<disk type='file' device='cdrom'>
      <driver name='qemu' type='raw'/>
      <source file='/mnt/cache/images/Win_8_1_64BIT.iso'/>
      <target dev='sdc' bus='sata'/>
      <readonly/>
    </disk>
    <disk type='file' device='cdrom'>
      <driver name='qemu' type='raw'/>
      <source file='/mnt/cache/images/virtio-win-0.1-81.iso'/>
      <target dev='sdd' bus='sata'/>
      <readonly/>
    </disk>
    <disk type='file' device='disk'>
      <driver name='qemu' type='qcow2' />
      <source file='/mnt/cache/images/w8.qcow2' />
      <target dev='vda' bus='virtio' />
    </disk>
<controller type='sata' index='0'>
    </controller>
    <controller type='pci' index='0' model='pcie-root'/>
    <controller type='pci' index='1' model='dmi-to-pci-bridge'>
    </controller>
    <controller type='pci' index='2' model='pci-bridge'>
    </controller>
    <controller type='usb' index='0' model='none'>
    </controller>
<interface type='bridge'>
      <source bridge='br0'/>
  <mac address='02:16:3e:1a:b3:4a'/>
      <model type='virtio'/>
    </interface>
    
    <!--<graphics type='vnc' port='-1' autoport='yes' websocket='-1' listen='0.0.0.0'>
    <listen type='address' address='0.0.0.0'/>
    </graphics>-->
    <graphics type='vnc' port='5900' >
      <listen type='address' address='192.168.0.103'/>
     <!-- <mac address='00:1D:D8:B7:1C:00' />-->
     </graphics>
    
    <input type='mouse' bus='ps2'/>
    <memballoon model='virtio'/>
</devices>

<qemu:commandline>
     <qemu:arg value='-device'/>
    <qemu:arg value='ioh3420,bus=pcie.0,addr=1c.0,multifunction=on,port=1,chassis=1,id=root.1'/>
    
<!--AMD Radeon R290 GPU--> 
    <qemu:arg value='-device'/>
    <qemu:arg value='vfio-pci,host=03:00.0,bus=root.1,addr=00.0,multifunction=on,x-vga=on'/>
        
<!--Radeon HDMI AUDIO-->  
    <qemu:arg value='-device'/>
    <qemu:arg value='vfio-pci,host=00:14.2,bus=pcie.0'/>
    
<!--USB Controller-->   
    <qemu:arg value='-device'/>
    <qemu:arg value='vfio-pci,host=07:00.0,bus=pcie.0'/>
    <qemu:arg value='-device'/>
    <qemu:arg value='vfio-pci,host=08:00.0,bus=pcie.0'/>
  
<!--ASROCK SATA Controller-->  
    <qemu:arg value='-device'/>
    <qemu:arg value='vfio-pci,host=00:11.0,bus=pcie.0'/>
</qemu:commandline>

</domain>

Link to comment

Hi,

I managed to set up webvirtmgr and connect to my VM to start the windows 8 installation.

Pls, I need someone to let me know how to solve this just 1 issue I still have:

My array has 3 disks:

-disk1/parity(unidad 0)

-disk2 (unidad 1)

-disk3 SSD (cache only).

http://i236.photobucket.com/albums/ff75/razzta01/mtb/vnc_zpsf5925ccd.png

As you can see when I try to install windows I have no space to do it. How can I install windows to a partition outside of my array?

I am going crazy with this.

This is what I have (disk1/parity is not showing up since I did not add it yet to the array):

NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
md1      9:1    0 698.7G  0 md   /mnt/disk1
sda      8:0    0   7.5G  0 disk
??sda1   8:1    0   7.5G  0 part /boot
sdd      8:48   0 111.8G  0 disk
??sdd1   8:49   0  46.6G  0 part
loop0    7:0    0     3M  0 loop /etc/libvirt

Can I create a new partition in my SSD (sdd) formatted as ntfs to install windows? If yes...how?

Rgds.

EDIT: my .xml:

<domain type='kvm' xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0'>
  <name>w8</name>
  <uuid>cc411d70-4463-4db7-bf36-d364c0cdaa9d</uuid>
  <memory unit='GB'>6</memory>
  <currentMemory unit='GB'>6</currentMemory>
  <vcpu placement='static'>2</vcpu>
  <resource>
    <partition>/machine</partition>
  </resource>
  <os>
    <type arch='x86_64' machine='q35'>hvm</type>
    <boot dev='cdrom'/>
  </os>
  <features>
    <acpi/>
    <apic/>
  </features>
  <cpu mode='host-passthrough'>
  </cpu>
  <clock offset='localtime'/>
  <on_poweroff>destroy</on_poweroff>
  <on_reboot>restart</on_reboot>
  <on_crash>destroy</on_crash>

<devices>
    <emulator>/usr/bin/qemu-system-x86_64</emulator>
<disk type='file' device='cdrom'>
      <driver name='qemu' type='raw'/>
      <source file='/mnt/cache/images/Win_8_1_64BIT.iso'/>
      <target dev='sdc' bus='sata'/>
      <readonly/>
    </disk>
    <disk type='file' device='cdrom'>
      <driver name='qemu' type='raw'/>
      <source file='/mnt/cache/images/virtio-win-0.1-81.iso'/>
      <target dev='sdd' bus='sata'/>
      <readonly/>
    </disk>
    <disk type='file' device='disk'>
      <driver name='qemu' type='qcow2' />
[size=14pt][b]     <source file='/mnt/cache/images/w8.qcow2' />[/b][/size]
      <target dev='vda' bus='virtio' />
    </disk>
<controller type='sata' index='0'>
    </controller>
    <controller type='pci' index='0' model='pcie-root'/>
    <controller type='pci' index='1' model='dmi-to-pci-bridge'>
    </controller>
    <controller type='pci' index='2' model='pci-bridge'>
    </controller>
    <controller type='usb' index='0' model='none'>
    </controller>
<interface type='bridge'>
      <source bridge='br0'/>
  <mac address='02:16:3e:1a:b3:4a'/>
      <model type='virtio'/>
    </interface>
    
    <!--<graphics type='vnc' port='-1' autoport='yes' websocket='-1' listen='0.0.0.0'>
    <listen type='address' address='0.0.0.0'/>
    </graphics>-->
    <graphics type='vnc' port='5900' >
      <listen type='address' address='192.168.0.103'/>
     <!-- <mac address='00:1D:D8:B7:1C:00' />-->
     </graphics>
    
    <input type='mouse' bus='ps2'/>
    <memballoon model='virtio'/>
</devices>

<qemu:commandline>
     <qemu:arg value='-device'/>
    <qemu:arg value='ioh3420,bus=pcie.0,addr=1c.0,multifunction=on,port=1,chassis=1,id=root.1'/>
    
<!--AMD Radeon R290 GPU--> 
    <qemu:arg value='-device'/>
    <qemu:arg value='vfio-pci,host=03:00.0,bus=root.1,addr=00.0,multifunction=on,x-vga=on'/>
        
<!--Radeon HDMI AUDIO-->  
    <qemu:arg value='-device'/>
    <qemu:arg value='vfio-pci,host=00:14.2,bus=pcie.0'/>
    
<!--USB Controller-->   
    <qemu:arg value='-device'/>
    <qemu:arg value='vfio-pci,host=07:00.0,bus=pcie.0'/>
    <qemu:arg value='-device'/>
    <qemu:arg value='vfio-pci,host=08:00.0,bus=pcie.0'/>
  
<!--ASROCK SATA Controller-->  
    <qemu:arg value='-device'/>
    <qemu:arg value='vfio-pci,host=00:11.0,bus=pcie.0'/>
</qemu:commandline>

</domain>

 

Does that file exist that I have highlighted from your XML?

Link to comment

Hi Jon,

 

First thing to do is to thank you for having a look at it. I managed to solve why no disks where showing up while the windows install. I had to choose to install manually the VirtIO isci drivers while installing windows. I know...noob stuff.

 

Also, I realized that editing qemu.conf was not needed, since it did produce errors (not allowing the vm to start):

cgroup_device_acl = [
    /dev/null, /dev/full, /dev/zero,
    /dev/random, /dev/urandom,
    /dev/ptmx, /dev/kvm, /dev/kqemu,
    /dev/rtc,/dev/vfio/5,/dev/vfio/9,/dev/vfio/16,/dev/vfio/13,/dev/hpet, /dev/vfio/vfio
]

I really don´t know why this is not needed any more.

 

I am using dmacias webvirtmgr and finally created a vm. I succesfully tried the network (did install VirtIO driver for ethernet within windows 8) and set up my homegroup. I love how you can "clone" the vm...and so many things still to try.

 

I still have to install the specific drivers for my GPU (that was passthroughed..or at least I tried) and the other pci devices I tried to passthrough too. I will work on it next days.

 

Rgds.

Link to comment

Hi,

I can confirm I manged to passthrough two usb ports, one gpu (nvidia 9800gt) and 1 sata port.

I checked the two usb ports and they worked fine for mouse, keyboard and also recognized a usb-stick.

pssthroughsuccess_zpsb8548ab4.png

Only issue I have is gpu passthrough is still not fine tuned. After installing the nvidia drivers for the 1st time my vm did recognize my 9800gt and it automatically sent the gpu signal to the external monitor I had connected to it (although I lost the signal in the Tightvnc session I used to access this vm). The problem is when I restarted the vm again it went back to the windows generic gpu drivers (and I could not be able to install again the nvidia drivers and make it work again; they did install but it was not working at all).

Any thoughts?

Link to comment
  • 2 weeks later...

Hi again,

 

I want to resume where I ended playing with kvm-unraid, although I posted in another thread:

http://lime-technology.com/forum/index.php?topic=35136.msg334750#msg334750

Since then i have been testing my windows 7 and 8 vm´s. I will focus now on Windows 8 since I am more interested in it as my main OS for desktop.

 

Two-display setup

As I wrote in my post when I access my vm I basically have a dual-screen setup (although I only passthrough my nvidia card to 1 monitor). What happens is that my vm recognizes the tightvnc session a another screen(*). I can solve this by selecting within windows the single display option (so I can select my external monitor). It works flawlessly. I am planning to add my R9290 to properly test video reproduction and gaming.

(*)win8vm1_1_zps4ec7d034.png

 

hard disk performance

My vm´s .qcow2 is located in a brtfs partition in a SSD (which is mounted outside of the array). Unraid is running unprotected since I do not have a parity disk. Note:

  -My vm (win8vm1) is running in my unraid test-setup (Tower2)

  -My vm is connected to my network:

      -standalone PC (PC)

      -main unraid setup (Tower1): parity+8 hdd (all reiserfs).

transferspeeds_zps5d7c5745.png

I plan to passthrough to my vm a physical ethernet adapter. I guess performance can be improved. What do you think?

 

More info from HDTune (tests done wihtin the vm):

http://i236.photobucket.com/albums/ff75/razzta01/unraid%20as%20host%20-KVM/hdd2_4_zps00ac72b1.png

http://i236.photobucket.com/albums/ff75/razzta01/unraid%20as%20host%20-KVM/hdd2_3_zps053ec091.png

http://i236.photobucket.com/albums/ff75/razzta01/unraid%20as%20host%20-KVM/hdd2_2_zps2acc62c1.png

http://i236.photobucket.com/albums/ff75/razzta01/unraid%20as%20host%20-KVM/hdd2_1_zpsfc1723bd.png

 

Rgds.

 

 

 

Link to comment

Hi again,

 

I want to resume where I ended playing with kvm-unraid, although I posted in another thread:

http://lime-technology.com/forum/index.php?topic=35136.msg334750#msg334750

Since then i have been testing my windows 7 and 8 vm´s. I will focus now on Windows 8 since I am more interested in it as my main OS for desktop.

 

Two-display setup

As I wrote in my post when I access my vm I basically have a dual-screen setup (although I only passthrough my nvidia card to 1 monitor). What happens is that my vm recognizes the tightvnc session a another screen(*). I can solve this by selecting within windows the single display option (so I can select my external monitor). It works flawlessly. I am planning to add my R9290 to properly test video reproduction and gaming.

(*)win8vm1_1_zps4ec7d034.png

 

hard disk performance

My vm´s .qcow2 is located in a brtfs partition in a SSD (which is mounted outside of the array). Unraid is running unprotected since I do not have a parity disk. Note:

  -My vm (win8vm1) is running in my unraid test-setup (Tower2)

  -My vm is connected to my network:

      -standalone PC (PC)

      -main unraid setup (Tower1): parity+8 hdd (all reiserfs).

transferspeeds_zps5d7c5745.png

I plan to passthrough to my vm a physical ethernet adapter. I guess performance can be improved. What do you think?

 

More info from HDTune (tests done wihtin the vm):

http://i236.photobucket.com/albums/ff75/razzta01/unraid%20as%20host%20-KVM/hdd2_4_zps00ac72b1.png

http://i236.photobucket.com/albums/ff75/razzta01/unraid%20as%20host%20-KVM/hdd2_3_zps053ec091.png

http://i236.photobucket.com/albums/ff75/razzta01/unraid%20as%20host%20-KVM/hdd2_2_zps2acc62c1.png

http://i236.photobucket.com/albums/ff75/razzta01/unraid%20as%20host%20-KVM/hdd2_1_zpsfc1723bd.png

 

Rgds.

 

luca,

 

you'll have to let me know how your testing goes with the R9 290.  We have one of those as well but it has been difficult to get to work with KVM with drivers.  Nice setup though!

 

- Jon

Link to comment
you'll have to let me know how your testing goes with the R9 290.  We have one of those as well but it has been difficult to get to work with KVM with drivers.  Nice setup though!

 

- Jon

 

I almost got an R9 290 last week since AMD dropped the price on them but have held off as I keep reading the NVidia cards are better at pass-through than the AMD cards on KVM. As much as I like to get a GTX970 I would be upset if it didn't work. I think I'm going to play it safe and get a GTX 750 Ti. Its cheap enough where if it doesn't work I won't be too upset over it.

Link to comment

you'll have to let me know how your testing goes with the R9 290.  We have one of those as well but it has been difficult to get to work with KVM with drivers.  Nice setup though!

 

- Jon

 

I almost got an R9 290 last week since AMD dropped the price on them but have held off as I keep reading the NVidia cards are better at pass-through than the AMD cards on KVM. As much as I like to get a GTX970 I would be upset if it didn't work. I think I'm going to play it safe and get a GTX 750 Ti. Its cheap enough where if it doesn't work I won't be too upset over it.

Know we have gotten a 780 to pass through ok.  I don't know if its safe to say that all 7xx GPUs from nvidia are solid, but I would think so (instinct talking there).

Link to comment

just curious here.  Do all nvidia cards have the problem where the VM can't be restarted without rebooting the server (like I experience on my Windows 7 VM with a 550Ti card)?

 

Is there any known solution to this very annoying problem?

 

Never have to reboot the VM. ;)

 

Sounds like its quite the pickle.

Link to comment

Hi,

I am trying to passthrough a pci ethernet card..1st using qemu:

<device>
  <name>net_eth0_63_4e_4f_00_00_00</name>
  path>/sys/devices/pci0000:00/0000:00:14.4/0000:05:05.0/net/eth0</path>
  <parent>pci_0000_05_05_0</parent>
  <capability type='net'>
    <interface>eth0</interface>
    <address>63:4e:4f:00:00:00</address>
    <link state='down'/>
    <capability type='80203'/>
  </capability>
</device>

But I get this error:

message: Error while starting domain: internal error: early end of file from monitor: possible problem: 2014-11-06T22:40:12.200734Z qemu-system-x86_64: -device vfio-pci,host=05:05.0,bus=pcie.0: vfio: Error: Failed to setup INTx fd: Device or resource busy 2014-11-06T22:40:12.239582Z qemu-system-x86_64: -device vfio-pci,host=05:05.0,bus=pcie.0: Device initialization failed. 2014-11-06T22:40:12.239637Z qemu-system-x86_64: -device vfio-pci,host=05:05.0,bus=pcie.0: Device 'vfio-pci' could not be initialized

 

I also tried hostdev...

root@Tower2:~# virsh nodedev-dumpxml pci_0000_05_05_0
<device>
  <name>pci_0000_05_05_0</name>
  <path>/sys/devices/pci0000:00/0000:00:14.4/0000:05:05.0</path>
  <parent>pci_0000_00_14_4</parent>
  <driver>
    <name>vfio-pci</name>
  </driver>
  <capability type='pci'>
    <domain>0</domain>
    <bus>5</bus>
    <slot>5</slot>
    <function>0</function>
    <product id='0x8169'>RTL8169 PCI Gigabit Ethernet Controller</product>
    <vendor id='0x10ec'>Realtek Semiconductor Co., Ltd.</vendor>
    <iommuGroup number='11'>
      <address domain='0x0000' bus='0x00' slot='0x14' function='0x4'/>
      <address domain='0x0000' bus='0x05' slot='0x05' function='0x0'/>
    </iommuGroup>
    <numa node='0'/>
  </capability>
</device>

so...

<hostdev mode='subsystem' type='pci' managed='yes'>
  <source>
     <address domain='0x0000' bus='0x00' slot='0x14' function='0x4'/>
  </source>
</hostdev>
<hostdev mode='subsystem' type='pci' managed='yes'>
  <source>
     <address domain='0x0000' bus='0x05' slot='0x05' function='0x0'/>
  </source>
</hostdev>

But I still get:

message: Error while starting domain: internal error: early end of file from monitor: possible problem: 2014-11-06T22:44:13.230617Z qemu-system-x86_64: -device vfio-pci,host=05:05.0,id=hostdev3,bus=pci.2,addr=0x6: vfio: Error: Failed to setup INTx fd: Device or resource busy 2014-11-06T22:44:13.269580Z qemu-system-x86_64: -device vfio-pci,host=05:05.0,id=hostdev3,bus=pci.2,addr=0x6: Device initialization failed. 2014-11-06T22:44:13.269638Z qemu-system-x86_64: -device vfio-pci,host=05:05.0,id=hostdev3,bus=pci.2,addr=0x6: Device 'vfio-pci' could not be initialized

I need some help?

Rgds.

Link to comment

what does you syslinux.cfg file look like?

 

Mine look like this...

 

default /syslinux/menu.c32
menu title Lime Technology
prompt 0
timeout 50
label KVM unRAID OS
  menu default
  kernel /bzimage
  append amd_iommu=on vfio_iommu_type1.allow_unsafe_interrupts=1 pcie_acs_override=downstream initrd=/bzroot
label unRAID OS Safe Mode (no plugins)
  kernel /bzimage
  append initrd=/bzroot unraidsafemode
label Memtest86+
  kernel /memtest
label Xen/unRAID OS
  kernel /syslinux/mboot.c32
  append /xen --- /bzimage --- /bzroot
label Xen/unRAID OS Safe Mode (no plugins)
  kernel /syslinux/mboot.c32
  append /xen --- /bzimage --- /bzroot unraidsafemode

 

Notice especially this part, which I had to add to get PCI passthru working

 

[code]amd_iommu=on vfio_iommu_type1.allow_unsafe_interrupts=1 pcie_acs_override=downstream

[/code]

 

Also, have you added anything to your go file?

 

I had to add this...

 

/usr/local/sbin/vfio-bind 0000:01:00.0 0000:01:00.1 0000:08:00.0

 

it looks like you're trying to do something here...

 

path>/sys/devices/pci0000:00/0000:00:14.4/0000:05:05.0/net/eth0</path>

 

but it looks like you're missing he leading <

 

I'm not sure they syntax is right, even with the < but it's easy to test

Link to comment

syslinux:

label KVM unRAID OS_6b10a
  menu default
  kernel /bzimage
  append amd_iommu=on vfio_iommu_type1.allow_unsafe_interrupts=1 pcie_acs_override=downstream initrd=/bzroot

go:

#!/bin/bash
mkdir -p /mnt/vm
mount /dev/disk/by-id/ata-SanDisk_SDSSDXP120G_132507400152-part1 /mnt/vm
# Start the Management Utility
/usr/local/sbin/emhttp &




Where did you add this: "/usr/local/sbin/vfio-bind 0000:01:00.0 0000:01:00.1 0000:08:00.0"? Did you automate it to load after every unraid start using a script?

Sorry about the missing <, but waht i posted was the actual output of vmmgr from dmacias.

My xml is:
<domain type='kvm' xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0'>
  <name>w8</name>
  <uuid>c80aaf73-9525-46a8-83a3-f4b90cc12064</uuid>
  <memory unit='KiB'>4194304</memory>
  <currentMemory unit='KiB'>4194304</currentMemory>
  <memoryBacking>
    <nosharepages/>
    <locked/>
  </memoryBacking>
  <vcpu placement='static'>4</vcpu>
  <cputune>
    <vcpupin vcpu='0' cpuset='0'/>
    <vcpupin vcpu='1' cpuset='1'/>
    <vcpupin vcpu='2' cpuset='2'/>
    <vcpupin vcpu='3' cpuset='3'/>
  </cputune>
  <os>
    <type arch='x86_64' machine='pc-q35-2.1'>hvm</type>
    <boot dev='cdrom'/>
    <bootmenu enable='no'/>
  </os>
  <features>
    <acpi/>
    <apic/>
  </features>
  <cpu mode='host-passthrough'>
    <topology sockets='2' cores='2' threads='1'/>
  </cpu>
  <clock offset='localtime'/>
  <on_poweroff>destroy</on_poweroff>
  <on_reboot>restart</on_reboot>
  <on_crash>destroy</on_crash>
  <devices>
    <emulator>/usr/bin/qemu-system-x86_64</emulator>
    <disk type='file' device='disk'>
      <driver name='qemu' type='qcow2' cache='none' io='native'/>
      <source file='/mnt/vm/images/windows8.qcow2'/>
      <target dev='vdc' bus='virtio'/>
      <address type='pci' domain='0x0000' bus='0x02' slot='0x03' function='0x0'/>
    </disk>
    <disk type='file' device='cdrom'>
      <driver name='qemu' type='raw'/>
      <source file='/mnt/disk1/isos/Win_8_1_64BIT.iso'/>
      <target dev='hda' bus='sata'/>
      <readonly/>
      <address type='drive' controller='0' bus='0' target='0' unit='0'/>
    </disk>
    <controller type='usb' index='0' model='ich9-ehci1'>
      <address type='pci' domain='0x0000' bus='0x02' slot='0x01' function='0x7'/>
    </controller>
    <controller type='usb' index='0' model='ich9-uhci1'>
      <master startport='0'/>
      <address type='pci' domain='0x0000' bus='0x02' slot='0x01' function='0x0' multifunction='on'/>
    </controller>
    <controller type='usb' index='0' model='ich9-uhci2'>
      <master startport='2'/>
      <address type='pci' domain='0x0000' bus='0x02' slot='0x01' function='0x1'/>
    </controller>
    <controller type='usb' index='0' model='ich9-uhci3'>
      <master startport='4'/>
      <address type='pci' domain='0x0000' bus='0x02' slot='0x01' function='0x2'/>
    </controller>
    <controller type='sata' index='0'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x1f' function='0x2'/>
    </controller>
    <controller type='pci' index='0' model='pcie-root'/>
    <controller type='pci' index='1' model='dmi-to-pci-bridge'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x1e' function='0x0'/>
    </controller>
    <controller type='pci' index='2' model='pci-bridge'>
      <address type='pci' domain='0x0000' bus='0x01' slot='0x01' function='0x0'/>
    </controller>
    <interface type='bridge'>
      <mac address='02:16:3e:1a:b3:4a'/>
      <source bridge='br0'/>
      <model type='virtio'/>
      <address type='pci' domain='0x0000' bus='0x02' slot='0x02' function='0x0'/>
    </interface>
    <input type='mouse' bus='ps2'/>
    <input type='keyboard' bus='ps2'/>
    <graphics type='vnc' port='5900' autoport='no' listen='192.168.0.103'>
      <listen type='address' address='192.168.0.103'/>
    </graphics>
    <video>
      <model type='cirrus' vram='9216' heads='1'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x0'/>
    </video>
    <hostdev mode='subsystem' type='usb' managed='no'>
      <source>
        <vendor id='0x0603'/>
        <product id='0x00f2'/>
      </source>
    </hostdev>
    <hostdev mode='subsystem' type='usb' managed='no'>
      <source>
        <vendor id='0x046d'/>
        <product id='0xc050'/>
      </source>
    </hostdev>
    <hostdev mode='subsystem' type='pci' managed='yes'>
      <source>
        <address domain='0x0000' bus='0x00' slot='0x14' function='0x4'/>
      </source>
      <address type='pci' domain='0x0000' bus='0x02' slot='0x05' function='0x0'/>
    </hostdev>
    <hostdev mode='subsystem' type='pci' managed='yes'>
      <source>
        <address domain='0x0000' bus='0x05' slot='0x05' function='0x0'/>
      </source>
      <address type='pci' domain='0x0000' bus='0x02' slot='0x06' function='0x0'/>
    </hostdev>
    <memballoon model='virtio'>
      <address type='pci' domain='0x0000' bus='0x02' slot='0x04' function='0x0'/>
    </memballoon>
  </devices>
  <seclabel type='none' model='none'/>
  <qemu:commandline>
    <qemu:arg value='-device'/>
    <qemu:arg value='ioh3420,bus=pcie.0,addr=1c.0,multifunction=on,port=1,chassis=1,id=root.1'/>
    <qemu:arg value='-device'/>
    <qemu:arg value='vfio-pci,host=01:00.0,bus=root.1,addr=00.0,multifunction=on,x-vga=on'/>
    <qemu:arg value='-device'/>
    <qemu:arg value='vfio-pci,host=00:14.2,bus=pcie.0'/>
  </qemu:commandline>
</domain>

 

Rgds.

 

Link to comment

what does you syslinux.cfg file look like?

 

Mine look like this...

 

default /syslinux/menu.c32
menu title Lime Technology
prompt 0
timeout 50
label KVM unRAID OS
  menu default
  kernel /bzimage
  append amd_iommu=on vfio_iommu_type1.allow_unsafe_interrupts=1 pcie_acs_override=downstream initrd=/bzroot
label unRAID OS Safe Mode (no plugins)
  kernel /bzimage
  append initrd=/bzroot unraidsafemode
label Memtest86+
  kernel /memtest
label Xen/unRAID OS
  kernel /syslinux/mboot.c32
  append /xen --- /bzimage --- /bzroot
label Xen/unRAID OS Safe Mode (no plugins)
  kernel /syslinux/mboot.c32
  append /xen --- /bzimage --- /bzroot unraidsafemode

 

Notice especially this part, which I had to add to get PCI passthru working

 

[code]amd_iommu=on vfio_iommu_type1.allow_unsafe_interrupts=1 pcie_acs_override=downstream

[/code]

 

Also, have you added anything to your go file?

 

I had to add this...

 

/usr/local/sbin/vfio-bind 0000:01:00.0 0000:01:00.1 0000:08:00.0

 

it looks like you're trying to do something here...

 

path>/sys/devices/pci0000:00/0000:00:14.4/0000:05:05.0/net/eth0</path>

 

but it looks like you're missing he leading <

 

I'm not sure they syntax is right, even with the < but it's easy to test

 

Justin...I'm curious...

 

Your sig says that you have an Intel Core i5-4440S - 2.8GHz .

 

However, your append line in you syslinux.cfg is loading AMD IOMMU:

 

append amd_iommu=on vfio_iommu_type1.allow_unsafe_interrupts=1 pcie_acs_override=downstream initrd=/bzroot

 

Unless I am wrong, if you have an Intel CPU, this should read:

 

append intel_iommu=on vfio_iommu_type1.allow_unsafe_interrupts=1 pcie_acs_override=downstream initrd=/bzroot

 

John

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.