openstack-manuals/doc/common/section_cli_nova_fileinject...

24 lines
959 B
XML

<?xml version="1.0" encoding="UTF-8"?>
<section xmlns="http://docbook.org/ns/docbook"
xmlns:xi="http://www.w3.org/2001/XInclude"
xmlns:xlink="http://www.w3.org/1999/xlink"
version="5.0"
xml:id="inserting_files">
<title>Inject files into instances</title>
<para>You can inject local files into the instance file system when
you launch an instance.</para>
<para>Use the <parameter>--file dst-path=src-path</parameter>
parameter on the nova <command>boot</command> command.</para>
<para>You can inject up to five files.</para>
<para>For example, you might inject the
<filename>special_authorized_keysfile</filename> file into the
instance rather than using the regular ssh key injection.</para>
<para>Run the following
command:<screen> <prompt>$</prompt> <userinput>nova boot --image ubuntu-cloudimage --flavor 1 --file /root/.ssh/authorized_keys=special_authorized_keysfile</userinput></screen>
</para>
</section>