Config Drive support in the XenAPI driver

Registered by John Garbutt

Look at the libvirt driver support for Config Driver, and mirror that ability in the XenAPI driver.

Blueprint information

Vish Ishaya
Citrix OpenStack development team
Needs approval
Michael Still
Series goal:
Accepted for grizzly
Milestone target:
milestone icon 2013.1
Started by
Vish Ishaya
Completed by
Russell Bryant

Related branches



Some steps:
- nova/virt/ has ConfigDriveBuilder but depends on nova.virt.libvirt.utils -> refactor
- make agent optional in XenAPI
- config drive code should be triggered by the appropriate flag: instance.get('config_drive') or FLAGS.force_config_drive
- first phase: only vfat type config drive is supported (iso is complicated)
- Use ConfigDriveBuilder to build the raw file
- Create a new VDI with the size of the raw file
- Attach the VDI to compute
- dd all the contents ( the latter steps are implemented for raw image launch )
- As we only implement the vfat route, add a new public method that skips flag check (
FLAGS.config_drive_format == 'iso9660' and FLAGS.config_drive_format == 'vfat')

Non Happy path:
- Migration
- resize
- try out live migration

Lets use Generate -> ISO -> VDI (more likely to stay secure - more similar)

Gerrit topic:,topic:bp/xenapi-config-drive,n,z

Addressed by:
    Move mkfs from libvirt.utils to utils

Addressed by:
    Refactor: move find_guest_agent to xenapi.agent

Addressed by:
    xenapi: Add null agent

Addressed by:
    Refactor: config drive related functions

Addressed by:
    xenapi: refactor: Agent class

Addressed by:
    xenapi: Make agent optional

Addressed by:
    A first cut at adding configdrive to xenapi.


Work Items

Work items:
Refactor nova/virt/, so that it does not depend on libvirt: DONE
Make agent optional in XenAPI: INPROGRESS
Add configuration entries for config drive to compute config: TODO
Find the places in libvirt, where configdrive is used: TODO
Config drive behavior during migration, resize: TODO
Config drive behavior during live migration: TODO

This blueprint contains Public information 
Everyone can see this information.