Jump to: navigation, search

LibvirtCustomHardware

Revision as of 17:44, 21 January 2013 by DanielBerrange (talk)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Libvirt Custom Hardware Configuration

Currently libvirt will determine the disk / cdrom / nic device models based on the configured hypervisor type (libvirt_type in /etc/nova/nova.conf). For sake of optimal performance, it will default to using virtio for both disk and nic models. The downside of this approach is that it is not possible to run operating systems which lack virtio drivers. eg BSD, Solaris, old Linux, old Windows.

Just changing the defaults won't help because, even ignoring the performance implications of pocking a non-virtio model, there is no single disk / nic model that will satisfy every operating system. Thus there needs to be a way to request custom hardware models.

Image metadata properties

Glance has the ability to store arbitrary metadata properties against images. This provides a way to let the user request specific hardware models

It is anticipated that the user will be allowed three properties

  • disk_bus - specify the type of disk controller to attach disk devices to - one of scsi, virtio, uml, xen, ide, usb
  • cdrom_bus - specify the type of disk controller to attach cdrom devices to - one of scsi, virtio, uml, xen, ide, usb
  • nic_model - specify the model of the network interface device - one of 'e1000', 'rtl8139', 'xen', 'virtio', 'uml'

These can be set at time of image upload to glance, or after the face


# glance image-update \
    --property disk_bus=scsi \
    --property cdrom_bus=ide \
    --property nic_model=e1000 \
    f16-x86_64-openstack-sda