abh1sar commented on PR #11719:
URL: https://github.com/apache/cloudstack/pull/11719#issuecomment-3338430080
> For update VM,
>
> * Maybe we should highlight that VM needs to be stop-started or allow
extraconfig only for stopped VM. `a-alert` can be used to show an appropriate
message.
I'll add that
> * Currently, existing extraconfig value is overridden so it would be
better if UpdateVM form shows the existing value pre-filled.
This can be done but is a bit tricky as multiple extraconfigs are stored and
shown as separate keys. e.g,
```
"details": {
"Message.ReservedCapacityFreed.Flag": "false",
"cpuOvercommitRatio": "2.0",
"extraconfig-1": "<memoryBacking>\n <locked/>\n</memoryBacking>",
"extraconfig-2": "<memoryBacking>\n
<nosharepages/>\n</memoryBacking>"
},
```
I would have to combine these into a single string in UI
```
<memoryBacking>
<locked/>
</memoryBacking>
<memoryBacking>
<nosharepages/>
</memoryBacking>
```
One more thing is that the separator is different in VMware/XenServer and KVM
Vmware/Xen : Single new line (`String[] extraConfigs =
decodedUrl.split("\\r?\\n");`
KVM : Double new lines (` String[] extraConfigs = decodedUrl.split("\n\n");`
I am thinking that for displaying, I can insert two double lines between
extra config by default. And modify the VMware/Xen separator to handle multiple
newlines `split.("\\r?\\n+)"`. That will take care of both cases
This would need testing on all 3 hypervisors
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]