@@ -43,8 +43,8 @@ possible as well. For example, see Using an LDAP Server for User
4343Authentication.
4444
4545
46- User Data and Meta Data
47- -----------------------
46+ User Data and Meta Data via the Virtual Router
47+ ----------------------------------------------
4848
4949CloudStack provides API access to attach up to 32KB of user data to a
5050deployed VM. Deployed VMs also have access to instance metadata via the
@@ -87,4 +87,93 @@ is also supported.) For metadata type, use one of the following:
8787
8888- instance-id. The instance name of the VM
8989
90+ User Data and Meta Data via Config Drive
91+ ----------------------------------------
9092
93+ The user-data service on a Shared or L2 Network can be provided through the
94+ Virtual Router or through an attached iso called the Config drive.
95+
96+ Config drive is an ISO file that is mounted as a cd-rom on a user VM and
97+ contains the user VM related userdata, metadata (incl. ssh-keys) and
98+ password files.
99+
100+ Enable config drive
101+ ~~~~~~~~~~~~~~~~~~~
102+ To use the config drive the network offering must have the “ConfigDrive”
103+ provider selected for the userdata service.
104+
105+ If the networkoffering uses ConfigDrive for userdata and the template is
106+ password enabled, the password string for the VM is placed in password.txt file
107+ and it is included in the ISO.
108+
109+ ConfigDrive availability
110+ ~~~~~~~~~~~~~~~~~~~~~~~~
111+ At VM start the config drive ISO is attached on the 2nd cd/dvd drive of the
112+ user instance, such that any other ISO image (e.g. boot image or vmware tools)
113+ is mounted on 1st cd/dvd drive. This means existing functionality of
114+ supporting 1 cd rom drive is still available.
115+
116+ At Password reset or update of user data, Secondary Storage VM will rebuild the
117+ ConfigDrive ISO image. That is the existing ISO is mounted on a temporary directory,
118+ password, userdata or ssh-keys are updated and a new ISO is built from the
119+ updated directory structure.
120+
121+ In case of a password reset, the new password will be picked-up at VM start.
122+ To access the updated userdata, the user needs to remount the config drive ISO.
123+
124+ When a VM is stopped, the ConfigDrive network element will trigger the
125+ Secondary Storage VM to remove the ISO from the secondary storage.
126+
127+ Since the ISO is available on secondary storage, there is no need for an extra
128+ implementation in case of migration.
129+
130+ Supporting ConfigDrive
131+ ~~~~~~~~~~~~~~~~~~~~~~
132+
133+ Extra data is added to the VM profile to enable the creation of the config drive:
134+
135+ VMdata - a list of String arrays representing [“directory”, “filename”, “content”] on the ConfigDrive device.
136+
137+ - <mountdir>/cloudstack
138+
139+ - /metadata:
140+
141+ - availability-zone.txt
142+
143+ - instance-id.txt
144+
145+ - service-offering.txt
146+
147+ - cloud-identifier.txt
148+
149+ - local-hostname.txt
150+
151+ - vm-id.txt
152+
153+ - public-keys.txt
154+
155+ - /password
156+
157+ - vm_password.txt
158+
159+ - vm_password_md5checksum (for windows VM’s)
160+
161+ - <mountdir>/openstack/version/:
162+
163+ - user_data (=hardlink to <mountdir>/cloudstack/user_data/user_data.txt)
164+
165+ - vendor_data.json
166+
167+ - meta_data.json
168+
169+ - Network_data.json
170+
171+ - label, which is configurable in global settings:
172+
173+ - name : vm.configdrive.label
174+
175+ - default: config-2
176+
177+ For more detailed information about the Config Drive implementation refer to
178+ the `Wiki Article
179+ <https://cwiki.apache.org/confluence/display/CLOUDSTACK/Using+ConfigDrive+for+Metadata%2C+Userdata+and+Password#:~:text=CLOUDSTACK%2D9813%20%2D%20(),%2Dkeys)%20and%20password%20files> `_
0 commit comments