You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by GitBox <gi...@apache.org> on 2020/01/08 16:53:12 UTC
[GitHub] [cloudstack] andrijapanicsb commented on issue #3510: Allow
additional configuration metadata to VMs
andrijapanicsb commented on issue #3510: Allow additional configuration metadata to VMs
URL: https://github.com/apache/cloudstack/pull/3510#issuecomment-572158850
Test Name | Steps | Expected Result | Status
-- | -- | -- | --
Add configuration when not enabled | Make sure that enable.additional.vm.configuration is false and add extra configuration following the KVM example bellow. | VM Details are not being updated (localcloud) SBCM5> > update virtualmachine id=26f88815-5e08-4ab1-ba0b-15658110ab40 extraconfig='%3CmemoryBacking%3E%0A%20%20%3Chugepages%2F%3E%0A%3C%2FmemoryBacking%3E' filter=details, {} | Passed
Enable configuration | Set enable.additional.vm.configuration to True and add extra configuration following the KVM example bellow. | User is able to set configuration (localcloud) SBCM5> > update virtualmachine id=26f88815-5e08-4ab1-ba0b-15658110ab40 extraconfig='%3CmemoryBacking%3E%0A%20%20%3Chugepages%2F%3E%0A%3C%2FmemoryBacking%3E' filter=details, { “details": { "extraconfig-1": "<memoryBacking>\n <hugepages/>\n</memoryBacking>" }, | Passed
KVM extra config | Deploy a VM and set extra config with the following api call: deploy virtualmachine … extraconfig='%3CmemoryBacking%3E%0A%20%20%3Chugepages%2F%3E%0A%3C%2FmemoryBacking%3E' | Dump xml the domain on the kvm host and verify that the extra settings are there virsh dumpxml 2 … <memory unit='KiB'>524288</memory> <currentMemory unit='KiB'>524288</currentMemory> <memoryBacking> <hugepages/> </memoryBacking> … | Passed
VMware extra config | Deploy a VM Stop the VM Update the VM with the following api command and start it update virtualmachine id=[vm-id] extraconfig=' hypervisor.cpuid.v0%3DFALSE' | Cat the vmx file on the primary storage and observe that the specific setting is there cat "$(esxcli vm process list \| grep i-2-8-VM \| tail -1 \| awk '{print $3}')" \| grep -w 'hypervisor.cpuid.v0 = "FALSE"' hypervisor.cpuid.v0 = "FALSE" | Passed
XenServer extra config | Deploy a VM Stop the VM Update the VM with the following api command and start it update virtualmachine id=[vm-id] extraconfig=' HVM-boot-policy%3D%0APV-bootloader%3Dpygrub%0APV-args%3Dhvc0' | On the Xen host us the ‘xe vm-param-get param-name’ command to get the specific parameter and observe it’s been set xe vm-param-get param-name=PV-bootloader uuid=f5b6ea53-b9dd-d118-a404-582675cc4345 pygrub xe vm-param-get param-name=PV-args uuid=f5b6ea53-b9dd-d118-a404-582675cc4345 hvc0 | Passed
KVM key list restriction | Remove all items from allow.additional.vm.configuration.list.kvm Deploy a VM and set extra config with the following api call: deploy virtualmachine … extraconfig='%3CmemoryBacking%3E%0A%20%20%3Chugepages%2F%3E%0A%3C%2FmemoryBacking%3E' | Exception appears that the item is not allowed. Any of the child records of that xml node were not added as well CloudstackAPIException: Execute cmd: deployvirtualmachine failed, due to: errorCode: 530, errorText:Extra config is not on the list of allowed keys for KVM hypervisor hosts | Passed
VMware key list restriction | Remove all items from allow.additional.vm.configuration.list.vmware global setting Deploy a VM Stop the VM Update the VM with the following api command and start it update virtualmachine id=[vm-id] extraconfig='hypervisor.cpuid.v0%3DFALSE' | Exception appears that the item is not allowed. CloudstackAPIException: Execute cmd: deployvirtualmachine failed, due to: errorCode: 530, errorText:Extra config hypervisor.cpuid.v0=FALSE is not on the list of allowed keys for VMware hypervisor hosts. | Passed
XenServer key list restriction | Remove all items from allow.additional.vm.configuration.list.xenserver global setting Deploy a VM Stop the VM Update the VM with the following api command and start it update virtualmachine id=[vm-id] extraconfig='HVM-boot-policy%3D%0APV-bootloader%3Dpygrub%0APV-args%3Dhvc0' | Exception appears that the item is not allowed. CloudstackAPIException: Execute cmd: deployvirtualmachine failed, due to: errorCode: 530, errorText:Extra config HVM-boot-policy= is not on the list of allowed keys for XenServer hypervisor hosts. | Passed
XenServer key mapping negative | Pass an argument that is not valid as per the given pattern: Test value: HVM-boot-policy= PV-bootloader=pygrub=failure PV-args=hvc0 | Cloudstack throws an exception when validating the map: (localcloud) SBCM5> > update virtualmachine id=afeb87cf-5a0a-4807-9c69-8644544ccdf9 extraconfig=HVM-boot-policy%3D%0APV-bootloader%3Dpygrub%3Dfailure%0APV-args%3Dhvc0 🙈 Error: (HTTP 530, error code 4250) The passed extra config string 'HVM-boot-policy= PV-bootloader=pygrub=failure PV-args=hvc0' contains an invalid key/value pair pattern | Passed
Clean extra config data | Stop the VM Execute update VM with ‘cleanupdetails=true’ argument | Any additional config has been removed (localcloud) SBCM5> > list virtualmachines id=9207b8b4-6d94-4a93-ba44-20ad5cd39f76 filter=details, { "virtualmachine": [ "details": { "deployvm": "true", "extraconfig-1": "<memoryBacking>\n <hugepages/>\n</memoryBacking>" } (localcloud) SBCM5> > update virtualmachine id=9207b8b4-6d94-4a93-ba44-20ad5cd39f76 cleanupdetails=true { "virtualmachine": {...} (localcloud) SBCM5> > list virtualmachines id=9207b8b4-6d94-4a93-ba44-20ad5cd39f76 filter=details, { "virtualmachine": [ "details": {} } | Passed
KVM – Nested keys not allowed | Create an xml that is containing a not allowed key inside an allowed key and try submitting it. | (localcloud) SBCM5> > update virtualmachine id=9d5b6561-ee7b-4711-94c7-c79f268cfa24 extraconfig='%3CmemoryBacking%3E%0A%20%20%3Chugepages%2F%3E%0A%3C%2FmemoryBacking%3E' 🙈 Error: (HTTP 530, error code 4250) Extra config hugepages is not on the list of allowed keys for KVM hypervisor hosts (localcloud) SBCM5> > list configurations name=allow.additional.vm.configuration.list.kvm { "name": "allow.additional.vm.configuration.list.kvm", "value": "memoryBacking" } | Passed
Apply configuration when it’s disabled | Set enable.additional.vm.configuration to false Apply any configurations to a VM. | (localcloud) SBCM5> > update virtualmachine id=9d5b6561-ee7b-4711-94c7-c79f268cfa24 extraconfig='%3CmemoryBacking%3E%0A%3C%2FmemoryBacking%3E' 🙈 Error: (HTTP 431, error code 4350) attempted setting extraconfig but enable.additional.vm.configuration is disabled | Passed
Update some of the enabled configurations | Have a list of enabled keys, but pass just one of them | (localcloud) SBCM5> > update virtualmachine id=9d5b6561-ee7b-4711-94c7-c79f268cfa24 extraconfig='%3CmemoryBacking%3E%0A%3C%2FmemoryBacking%3E' { "virtualmachine": { … "details": { "Message.ReservedCapacityFreed.Flag": "true", "extraconfig-1": "<memoryBacking>\n</memoryBacking>" } … (localcloud) SBCM5> > list configurations name=allow.additional.vm.configuration.list.kvm { "name": "allow.additional.vm.configuration.list.kvm", "value": "memoryBacking, hugepages" } | Passed
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services