...
%3Ccontroller%20type%3D%27usb%27%20index%3D%271%27%20model%3D%27ehci%27%3E%3C%2Fcontroller%3E
A configurable global config 'additional.vm.configuration.black.list.kvm' is available for Root admin to specify a list options that are disallowed with this feature.
The keys in the blacklisted commands are used to validate the tags from the user passed XML as extraconfig data. Any tag/element that is found with the name in the blacklist of commands will result to an Exception.
e.g. <name>my vm </name> or <memory unit="KiB">262144</memory> or <currentMemory unit="KiB">262144</currentMemory> will throw an exception by default because this type of XML tags have been blacklisted.
Similar for this hypervisor, the primary configuration file of the guest VM is built by CloudStack, therefor, the additional metadata will also be parsed and append to the builder.
For XenServer, functionality has only been added to only support the 'vm-param'set' option for 'xe' command and the full list of options is available here xe-full-command-list
Example: Following commands are used to convert a VM from HVM to PV;
...
vm-param-set%20PV-bootloader%3Dpygrub%0Avm-param-set%20PV-args%3Dhvc0%0Avm-param-set%20HVM-boot-policy%3D
The algorithm for XenServer does the following checks;
Similar for this hypervisor, the primary configuration file of the guest VM is built by CloudStack, therefor, the additional metadata will also be parsed and append to the VMX file builder.
...
hypervisor.cpuid.v0%3DFALSE
The configuration passed is parsed as key/value pair and every key is validated against against the blacklisted commands set by Root admin. An Exception is thrown if an invalid key is found.
Admin users will be allowed to use this feature with very few restrictions, whilst normal users will be constrained to several restrictions that are controlled by the admin.
...
The ‘deployVirtualMachine’ , and (updateVirtualMachines) API commands are refactored to include a new parameter ‘extraconfig’. This parameter will accept the URL encoded string and CloudStack will store in the 'user_vm_details' under the key 'extraconfig'.
Global configuration settings are added with Account scope in the Service Layer for the admin user to allow and control passing of additional data;
UserVmManageImpl class is refactored to include the new Boolean configuration setting to allow/disallow passing of additional data during VM deployment/updating, and stores the data in the 'user_vm_details' table.
...