What’s the maximum number of virtio-blk disks?

It depends on the number of other PCI devices that you are exporting to the guest. In the current implementation each virtio-blk disk is a separate PCI device (although Anthony pointed out that you can create multifunction PCI devices which let you break this limit in some narrow circumstances).

How many other PCI devices are you likely to have? Run lspci in a guest to see. Probably you have a host bridge, an ISA bridge for all your legacy devices, a network card, a VGA adapter, a USB controller, an emulated PIIX4 and a memory balloon. That’s 7 devices, and we haven’t even got to disks yet.

PCI is limited to 32 devices in total. So 25 or so virtio block devices is the maximum you would be able to add to a real guest without accepting limitations on things like hotplugging which you would get if you used multifunction devices. (libguestfs is limited to 25 disks but for other reasons to do with limits in febootstrap).

Work is proceeding to remove this limit.

About these ads

Leave a comment

Filed under Uncategorized

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s