You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users-cn@cloudstack.apache.org by "yuanshuai.develop" <yu...@gmail.com> on 2013/05/17 09:45:49 UTC

回复: 请问调用cloudstack的API时返回The given command does not exist是什么原因?

“command=updateVirtualMachine\”后面有个斜杠是怎么出现的呢?我觉得cloudstack把斜杠也作为command了,所以导致不识别该command




yuanshuai.develop

From: WXR
Date: 2013-05-17 15:37
To: CloudStack邮件组
Subject: 请问调用cloudstack的API时返回The given command does not exist是什么原因?
使用admin账户登录cloudstack,并查询出 其中一个虚拟机的id为:4f2e7238-8d7b-4640-a2ba-ef39b6f7f14c
admin账户的apikey为:GIki22sTZk1stiLH1jNUeofLr-GKwHuPajnHDrvIngF0g7OkMSorq_ja9BKwn7M_kGBXtkNl3K2sG9__w_71fQ

查阅cloudstack 4.0.0的API 文档,找个管理员使用的api中的rebootVirtualMachine
接受一个参数id,虚拟机的id,构建url如下:

http://192.168.2.132:8080/client/api?command=updateVirtualMachine\&id=4f2e7238-8d7b-4640-a2ba-ef39b6f7f14c\&apikey=GIki22sTZk1stiLH1jNUeofLr-GKwHuPajnHDrvIngF0g7OkMSorq_ja9BKwn7M_kGBXtkNl3K2sG9__w_71fQ

<errorresponse cloud-stack-version="4.0.2.20130420145617">
  <errorcode>432</errorcode>
  <errortext>The given command does not exist</errortext>
</errorresponse>

请问这个报错是什么原因导致的,是不是我还少做了什么步骤呢?