Hi,
Today I created a functional for changing the tariff plan for my customers and I get a problem.
After instantiated VM from template, i see this (It`s OK and script working, when change between tariffs):
I try to setup password for instantiated VM with custom USER_INPUTS, e.g. PASSWORD_BASE64 with API one.vm.updateconf
, and change ONLY parameter PASSWORD_BASE64
, but after VM starts parameter OS
, FEATURES
and GRAPHICS
are deleted and parameter PASSWORD_BASE64 doesn`t change.
If i try to manually do this - that is OK.
- Stop VM
- Go to update configuration
- Change parameter
PASSWORD_BASE64
and save. - Re-create or change tariff.
After this actions password changed and that`s ok.
How I can do it with API?
I use this:
$context = $nebula->call('one.vm.info', [(int)$id]);
$context->TEMPLATE->CONTEXT->PASSWORD_BASE64 = base64_encode('zxcqwe123');
$nebula->call('one.vm.updateconf', [(int)$id, $context->asXML()]);
Versions of the related components and OS (frontend, hypervisors, VMs):
CentOS 7, ONe 5.4.6