KVM passtrought PciExpress 3 card

Dmurr

New Member
Aug 5, 2014
3
0
1
Using pve-no-subscription repository.
Linux srv-vm2 3.10.0-3-pve #1 SMP Sat Aug 2 09:30:30 CEST 2014 x86_64 GNU/Linux


Code:
pveversion --verbose
proxmox-ve-2.6.32: not correctly installed (running kernel: 3.10.0-3-pve)
pve-manager: 3.2-4 (running version: 3.2-4/e24a91c1)
pve-kernel-3.10.0-3-pve: 3.10.0-13
pve-kernel-2.6.32-26-pve: 2.6.32-114
lvm2: 2.02.98-pve4
clvm: 2.02.98-pve4
corosync-pve: 1.4.7-1
openais-pve: 1.1.4-3
libqb0: 0.11.1-2
redhat-cluster-pve: 3.2.0-2
resource-agents-pve: 3.9.2-4
fence-agents-pve: 4.0.5-1
pve-cluster: 3.0-14
qemu-server: 3.1-16
pve-firmware: 1.1-3
libpve-common-perl: 3.0-19
libpve-access-control: 3.0-11
libpve-storage-perl: 3.0-21
pve-libspice-server1: 0.12.4-3
vncterm: 1.1-7
vzctl: 4.0-1pve6
vzprocps: 2.0.11-2
vzquota: 3.1-2
pve-qemu-kvm: 1.7-8
ksm-control-daemon: 1.1-1
glusterfs-client: 3.4.2-1
Need passtrought
Code:
05:00.0 Multimedia video controller [0400]: Conexant Systems, Inc. Device [14f1:8210]
06:00.0 Multimedia video controller [0400]: Conexant Systems, Inc. Device [14f1:8210]
07:00.0 Multimedia video controller [0400]: Conexant Systems, Inc. Device [14f1:8210]

Config VM:
Code:
boot: dcn
bootdisk: virtio0
cores: 2
machine: q35
hostpci0: 05:00.0,pcie=1,driver=vfio
hostpci1: 06:00.0,pcie=2,driver=vfio
hostpci3: 07:00.0,pcie=3,driver=vfio
ide2: cdrom,media=cdrom
memory: 2000
name: srv-video
net0: virtio=DE:8E:86:88:81:72,bridge=vmbr0
net1: virtio=E2:6F:B8:08:1C:B3
onboot: 1
ostype: win7
sata0: local:iso/virtio-win-0.1-81.iso,media=cdrom,size=72406K
sockets: 1
virtio0: store:100/vm-100-disk-1.qcow2,format=qcow2,cache=writeback,size=30G

Log error:
Code:
[COLOR=#000000][FONT=tahoma]unknown hostpci setting 'pcie=1'[/FONT][/COLOR]
[COLOR=#000000][FONT=tahoma]unknown hostpci setting 'pcie=2'[/FONT][/COLOR]
[COLOR=#000000][FONT=tahoma]vm 100 - unable to parse value of 'hostpci2' - unknown setting 'hostpci2'[/FONT][/COLOR]
[COLOR=#000000][FONT=tahoma]kvm: -device piix3-usb-uhci,id=uhci,bus=pci.0,addr=0x1.0x2: Bus 'pci.0' not found[/FONT][/COLOR]
[COLOR=#000000][FONT=tahoma]TASK ERROR: start failed: command '/usr/bin/kvm -id 100 -chardev 'socket,id=qmp,path=/var/run/qemu-server/100.qmp,server,nowait' -mon 'chardev=qmp,mode=control' -vnc unix:/var/run/qemu-server/100.vnc,x509,password -pidfile /var/run/qemu-server/100.pid -daemonize -name srv-video -smp 'sockets=1,cores=2' -nodefaults -boot 'menu=on' -vga std -no-hpet -cpu 'kvm64,hv_spinlocks=0xffff,hv_relaxed,+lahf_lm,+x2apic,+sep' -k en-us -m 2000 -device 'piix3-usb-uhci,id=uhci,bus=pci.0,addr=0x1.0x2' -device 'usb-tablet,id=tablet,bus=uhci.0,port=1' -device 'pci-assign,host=05:00.0,id=hostpci0,bus=pci.0,addr=0x10' -device 'pci-assign,host=06:00.0,id=hostpci1,bus=pci.0,addr=0x11' -device 'virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3' -device 'ahci,id=ahci0,multifunction=on,bus=pci.0,addr=0x7' -drive 'file=/var/lib/vz/template/iso/virtio-win-0.1-81.iso,if=none,id=drive-sata0,media=cdrom,aio=native' -device 'ide-drive,bus=ahci0.0,drive=drive-sata0,id=sata0,bootindex=100' -drive 'file=/dev/cdrom1,if=none,id=drive-ide2,media=cdrom,aio=native' -device 'ide-cd,bus=ide.1,unit=0,drive=drive-ide2,id=ide2,bootindex=101' -drive 'file=/vz/images/images/100/vm-100-disk-1.qcow2,if=none,id=drive-virtio0,format=qcow2,cache=writeback,aio=native' -device 'virtio-blk-pci,drive=drive-virtio0,id=virtio0,bus=pci.0,addr=0xa,bootindex=200' -netdev 'type=tap,id=net0,ifname=tap100i0,script=/var/lib/qemu-server/pve-bridge,vhost=on' -device 'virtio-net-pci,mac=DE:8E:86:88:81:72,netdev=net0,bus=pci.0,addr=0x12,id=net0,bootindex=300' -netdev 'type=user,id=net1,hostname=srv-video' -device 'virtio-net-pci,mac=E2:6F:B8:08:1C:B3,netdev=net1,bus=pci.0,addr=0x13,id=net1,bootindex=301' -rtc 'driftfix=slew,base=localtime' -machine 'type=q35' -global 'kvm-pit.lost_tick_policy=discard'' failed: exit code 1[/FONT][/COLOR]

How i can passtrought my pcie card for videorecorder?
 
"The pvetest repo is for testing only, there is no Proxmox VE Subscription Key needed to access this repository." I don't have Proxmox VE Subscription Key, but I can describe the errors in the process.
 
Thanks, gays. I realized that the connection will be only 3 pciexpress card in PVE ~ 3.4. So will have to storm Xen.
 
Thanks, gays. I realized that the connection will be only 3 pciexpress card in PVE ~ 3.4. So will have to storm Xen.

I currently it's 2 devices passthrough max. I have just send a patch to the dev mailing list to be able to passthough 4 cards. (should be enough for everybody I think)
 
I currently it's 2 devices passthrough max. I have just send a patch to the dev mailing list to be able to passthough 4 cards. (should be enough for everybody I think)

First, thanks for all your hard work and for the quick turnaround of changes based on what you are seeing in the forums!

I know Dietmar already applied the patch, but is there any chance we could set this higher?

In my case, I'm trying to get VGA passthrough working (1 card = 2 devices, hdmi video + hdmi audio) and I need to pass through my usb ports for keyboard/mouse/etc (shows as 4 intel USB controllers = 4 devices) and 2 SATA controllers (2 more devices). So I'm already at 8 without trying to do any other passthrough like telephony or TV card passthroughs that are popular with the passthrough crowd.

I might not be the typical use case, but if the VGA passthrough quirks get ironed out, it will be more common for people to want to emulate a desktop role (lots of usb and vga passthrough, + sata and nics), and most consumer grade motherboards use many devices when providing features. For example, my Asus P67 board has:

4 USB controllers
3 x SATA (6 intel ports, 2 jmicron ports, 2 marvel esata ports)
Dual nics
2 x PCIe x8 (VGA?)

So depending how you divvy those out to the VM's you could hit the upper limit of 4 pretty quick.

In any case, based on your patch it is straight forward to address it manually if need be, although it would require patching on every upgrade.

Thanks again to the Proxmox team for all their work....

Daniel
 
First, thanks for all your hard work and for the quick turnaround of changes based on what you are seeing in the forums!

I know Dietmar already applied the patch, but is there any chance we could set this higher?

In my case, I'm trying to get VGA passthrough working (1 card = 2 devices, hdmi video + hdmi audio) and I need to pass through my usb ports for keyboard/mouse/etc (shows as 4 intel USB controllers = 4 devices) and 2 SATA controllers (2 more devices). So I'm already at 8 without trying to do any other passthrough like telephony or TV card passthroughs that are popular with the passthrough crowd.

I might not be the typical use case, but if the VGA passthrough quirks get ironed out, it will be more common for people to want to emulate a desktop role (lots of usb and vga passthrough, + sata and nics), and most consumer grade motherboards use many devices when providing features. For example, my Asus P67 board has:

4 USB controllers
3 x SATA (6 intel ports, 2 jmicron ports, 2 marvel esata ports)
Dual nics
2 x PCIe x8 (VGA?)

So depending how you divvy those out to the VM's you could hit the upper limit of 4 pretty quick.

In any case, based on your patch it is straight forward to address it manually if need be, although it would require patching on every upgrade.

Thanks again to the Proxmox team for all their work....

Daniel

-for gpu video + audio, you can passthough the full device with both functions (see wiki example)


-usb devices can be passthrough individually (no need to passthrough the full controller)

usb0:
usb1:
....
https://pve.proxmox.com/wiki/USB_physical_port_mapping


- for nics && disk, for a desktop role, I don't see why you need to passthrough devices. (In term of performance, virtio-net and vitio-block are fast enough)
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!