There is no return of random set password at start of password enabled virtual 
machine, 
so user can not login. VM must be stopped and password restarted again in order 
to get actual password. 

This part of code is in charge of it..seems not to working well, indeed there 
is no args.password value again. 

file ./ui/scripts/instances.js 

actions: { 
start: { 
label: 'label.action.start.instance' , 
... 
... 
... 
complete: function(args) { 
if(args.password != null) { 
alert('Password of the VM is ' + args.password); 
} 
return 'label.action.start.instance'; 
} 
... 


----- Original Message -----

From: "Min Chen" <min.c...@citrix.com> 
To: cloudstack-dev@incubator.apache.org, "Rohit Yadav" <bhais...@apache.org>, 
"Sinisa Denic" <sde...@peacebellservers.com> 
Cc: shadow...@gmail.com 
Sent: Thursday, February 14, 2013 9:08:39 PM 
Subject: Re: Password has been reset to undefined 

Filed a JIRA issue for this: 
https://issues.apache.org/jira/browse/CLOUDSTACK-1277. 
Fix has been checked into 4.1 (Commit 
07ce770e9711ab5ddfc9382129b35c96aadc7846) and ported to master. 

Thanks 
-min 


On 2/14/13 10:48 AM, "Min Chen" <min.c...@citrix.com> wrote: 

>I found the problem for this. The reason is that in UserVmVO class, 
>"password" is defined as "transit", so it is not stored in Database. When 
>we use id to find this user vm from user_vm_view, the password set from 
>reset routine internally is lost. I will file a defect on this and provide 
>a fix today. 
> 
>Thanks 
>-min 
> 
>On 2/14/13 2:13 AM, "Rohit Yadav" <bhais...@apache.org> wrote: 
> 
>>Hi Sinisa, thanks for reporting this. Please file this issue on JIRA. 
>>But AFAIK the response generator is supposed to create the response, 
>>the cmd api class should not add the password. I don't remember if it 
>>was an issue, let's ask Min as she did a lot of the response 
>>generating stuff. 
>> 
>>Hi Min, can you check please? 
>> 
>>Regards. 
>> 
>>On Thu, Feb 14, 2013 at 3:36 PM, Sinisa Denic 
>><sde...@peacebellservers.com> wrote: 
>>> Sorry I forgot to set cs-dev mailing list in cc in my previous post so 
>>>other users can see. 
>>> I will repeat: 
>>> 
>>> In order to get password on UI after reset password for virtualmachine 
>>>in CS4.1.0-SNAPSHOT 
>>> I had to made this modification: 
>>> 
>>> --- 
>>>a/api/src/org/apache/cloudstack/api/command/user/vm/ResetVMPasswordCmd.j 
>>>a 
>>>va 
>>> +++ 
>>>b/api/src/org/apache/cloudstack/api/command/user/vm/ResetVMPasswordCmd.j 
>>>a 
>>>va 
>>> @@ -114,6 +114,7 @@ public class ResetVMPasswordCmd extends 
>>>BaseAsyncCmd { 
>>> if (result != null){ 
>>> UserVmResponse response = 
>>>_responseGenerator.createUserVmResponse("virtualmachine", 
>>>result).get(0); 
>>> response.setResponseName(getCommandName()); 
>>> + response.setPassword(password); 
>>> this.setResponseObject(response); 
>>> } else { 
>>> throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, 
>>>"Failed to reset vm password"); 
>>> 
>>> Do you maybe know where the problem could reside,as I spent a few days 
>>>on it :(? 
> 


Reply via email to