Hi,
Did you stop start the vm after updating the Userdata (after step 4). API doc 
says we need to stop start the vm to take effect. 
http://cloudstack.apache.org/docs/api/apidocs-4.2/root_admin/updateVirtualMachine.html
Even after stop and start if same behavior exists then this is an issue.

Thanks
Harikrishna

-----Original Message-----
From: Stanislav Petrov [mailto:devilfighter1...@gmail.com] 
Sent: Friday, October 11, 2013 2:02 PM
To: users@cloudstack.apache.org
Subject: Setting user data removes SSH public key data on a running VM

Hi all,

My Environment is: CS 4.1.1, KVM hypervisor

Here is the use case steps:
1. Create SSH keypair "keypairname" through the REST API.
2. Deploy VM with the created keypair from step 1.
3. On the VM, the url "http://<dhcpserverip>/latest/public-keys" returns the 
public key.
4. Update the running VM with userdata.
5. On the VM, the url "http://<dhcpserverip>/latest/public-keys" returns 
nothing and the user data url "http://<dhcpserverip>/latest/user-data"
returns the user-data which was set in step 4.

Result: User data is set but public key is gone (cleaned).

When I update user data on a stopped VM, both SSH public key and user data are 
available.

Is this behavior expected or is this some kind of an issue ?

--
Best regards,
Stanislav Petrov

Reply via email to