1
The datasource altcloud will be used to pick up user data on `RHEVm`_ and `vSphere`_.
6
For `RHEVm`_ v3.0 the userdata is injected into the VM using floppy
7
injection via the `RHEVm`_ dashboard "Custom Properties".
9
The format of the Custom Properties entry must be:
13
floppyinject=user-data.txt:<base64 encoded data>
15
For example to pass a simple bash script:
19
% cat simple_script.bash
21
echo "Hello Joe!" >> /tmp/JJV_Joe_out.txt
23
% base64 < simple_script.bash
24
IyEvYmluL2Jhc2gKZWNobyAiSGVsbG8gSm9lISIgPj4gL3RtcC9KSlZfSm9lX291dC50eHQK
26
To pass this example script to cloud-init running in a `RHEVm`_ v3.0 VM
27
set the "Custom Properties" when creating the RHEMv v3.0 VM to:
31
floppyinject=user-data.txt:IyEvYmluL2Jhc2gKZWNobyAiSGVsbG8gSm9lISIgPj4gL3RtcC9KSlZfSm9lX291dC50eHQK
33
**NOTE:** The prefix with file name must be: ``floppyinject=user-data.txt:``
35
It is also possible to launch a `RHEVm`_ v3.0 VM and pass optional user
36
data to it using the Delta Cloud.
38
For more information on Delta Cloud see: http://deltacloud.apache.org
43
For VMWare's `vSphere`_ the userdata is injected into the VM as an ISO
44
via the cdrom. This can be done using the `vSphere`_ dashboard
45
by connecting an ISO image to the CD/DVD drive.
47
To pass this example script to cloud-init running in a `vSphere`_ VM
48
set the CD/DVD drive when creating the vSphere VM to point to an
49
ISO on the data store.
51
**Note:** The ISO must contain the user data.
53
For example, to pass the same ``simple_script.bash`` to vSphere:
62
NOTE: The file name on the ISO must be: ``user-data.txt``
66
% cp simple_scirpt.bash my-iso/user-data.txt
67
% genisoimage -o user-data.iso -r my-iso
74
% sudo mkdir /media/vsphere_iso
75
% sudo mount -o loop JoeV_CI_02.iso /media/vsphere_iso
76
% cat /media/vsphere_iso/user-data.txt
77
% sudo umount /media/vsphere_iso
79
Then, launch the `vSphere`_ VM the ISO user-data.iso attached as a CDROM.
81
It is also possible to launch a `vSphere`_ VM and pass optional user
82
data to it using the Delta Cloud.
84
For more information on Delta Cloud see: http://deltacloud.apache.org
86
.. _RHEVm: https://www.redhat.com/virtualization/rhev/desktop/rhevm/
87
.. _vSphere: https://www.vmware.com/products/datacenter-virtualization/vsphere/overview.html