API equivalent for nova boot --config-drive

Asked by Guido Patanella

I am interested in using the --config-drive option through REST api. So far, all I could found how to use the config-drive option is through the nova boot command:


Is this implemented through any API method ?

Question information

English Edit question
OpenStack Compute (nova) Edit question
No assignee Edit question
Last query:
Last reply:
Revision history for this message
LiangChen (hs-chen) said :

hi,Guido Patanella
  i see the code in path ../nova/nova/virt/configdrive.py,

  def required_by(instance):
    return instance.get('config_drive') or CONF.force_config_drive

and ../nova/nova/virt/libvirt/driver.py

     # Config drive
        if configdrive.required_by(instance):
            LOG.info(_('Using config drive'), instance=instance)

You can use rest api add "config_drive": true in message body.
You can also configure the Compute service to always create a config drive by setting the following option in /etc/nova/nova.conf:

Can you help with this problem?

Provide an answer of your own, or ask Guido Patanella for more information if necessary.

To post a message you must log in.