[pve-devel] pci slot assignment proposal (hotplug requirement)
aderumier at odiso.com
Fri Aug 26 10:53:41 CEST 2011
to make hotplug and livemigration works correctly, we need to fix pci slot assignement of the devices and use new qemu --device syntax.
Currently, pci slots are automaticly assign in order of the devices in the kvm command line.
So sometime, if you add/remove disk or nic, the pci slot can change and can cause some problem.
exemple : on windows, ip config of a nic is registered by pci slot. So if you change your nic card slot, you lost your config. (yes,i known, fucking windows :p)
So, here a proposal for the pci slot, from 0->30.
0: host brige
1: serial,parallel,usb controller,ide controller
4 : audio0
5 : scsi0 (first scsi controller, scsi disk 1->7)
6 : scsi1 (second scsi controller,scsi disk 8->14)
7 : watchdog
8 : future device
9 : future device
10 -> 30 : virtio disk controller,nic or device pci-assign (pci passthough).
10 first devices are fixed in proxmox code.
10->30 devices are vitio disk,nic (virtio or not) and device with pci passthrough
Also, we need to specify pci slot in vm config file for virtio disk and nics:
bus=0 : for the moment, qemu can use only 1 bus, but maybe more in the future.
addr=10->30 : pci slot number.
for the moment:
my $MAX_VIRTIO_DISKS = 16;
my $MAX_NETS = 32;
this can cause some problems:
first, we can't have 32 net devices. (only 30 pci slots - others controllers).
and we can't add 16 disk + 17 nics.
We need to have a single value, like $MAX_DEVICES
So,I propose $MAX_DEVICES = 20. (must be enough for common mortals ;)
On the pve-manager side, we could simply add a dropdown list "pci slot" to nic and virtio disk forms, with free pci slots.
What do you think about it ?
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 183 bytes
Desc: not available
More information about the pve-devel