cloudstack-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Mezentsev <...@soleks.com>
Subject Re: detach ISO using kickstart eject command
Date Tue, 11 Aug 2015 23:38:52 GMT
  Hi Luca,

I did it via cloudstack API, i don't think that doing eject via kickstart
would be correct approach, cloudstack in such situation has no idea what
happened with ISO. here is example of snippet (in Tcl)

<----cut ---->
package require http
package require base64
package require sha1

set csApiBaseUrl        "<your_url>;
set csApiPath           "/client/api?";
set csApiKey            "<your_api_key>"
set csSecretKey         "<your_secret_key>"

set csVmUuid [ ::http::data [::http::geturl
"http://<virt_router_ip>/latest/meta-data/instance-id"] ]

set csApiCommandList [list]

lappend csApiCommandList "command=detachIso";
lappend csApiCommandList "virtualmachineid=$csVmUuid";
lappend csApiCommandList "apiKey=$csApiKey"

set csApiCommandString [join $csApiCommandList "&"]

set csApiSignature [::base64::encode \
        [::sha1::hmac -bin -key $csSecretKey \
                [join [lsort -ascii [split [string tolower
$csApiCommandString] "&"]] "&"] \
        ] \
]

lappend csApiCommandList [ ::http::formatQuery "signature"
"$csApiSignature" ]

set csApiCommandString [join $csApiCommandList "&"]

set csCommandUrl ${csApiBaseUrl}${csApiPath}${csApiCommandString}

set csApiToken [ ::http::geturl $csCommandUrl ]

<---- cut ---->

> Does anyone knows if is possible to automatically detach the ISO at the
> end of
> VM instance creation using the kickstart command eject?
> I'm installing from a RedHat based ISO.
> ThanksLuca
  Daniel Mezentsev, founder
(+1) 604 313 8592.
Soleks Data Group.
Shaping the clouds.

Mime
  • Unnamed multipart/alternative (inline, 8-Bit, 0 bytes)
View raw message