You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cloudstack.apache.org by "Rohit Yadav (JIRA)" <ji...@apache.org> on 2012/11/15 14:20:12 UTC

[jira] [Created] (CLOUDSTACK-489) Document how to use userdata feature for user vms

Rohit Yadav created CLOUDSTACK-489:
--------------------------------------

             Summary: Document how to use userdata feature for user vms
                 Key: CLOUDSTACK-489
                 URL: https://issues.apache.org/jira/browse/CLOUDSTACK-489
             Project: CloudStack
          Issue Type: Bug
          Components: Doc
    Affects Versions: pre-4.0.0
         Environment: KVM, Xen, VMWare etc.
            Reporter: Rohit Yadav
             Fix For: 4.1.0


The userdata should be a base64 encoded string upto 2KB which is put on domr's html directory and using HTTP GET the userdata information can be obtained from the domr. The operation does not require the VM to be in stopped state, though it is     advised to stop and call this api in case the user vm has a script which gets  the userdata information from domr while starting.

It is fixed with 4c86b1545dda53b74c534d479133692331e12a28. We need to document it, how to use userdata, for example, this script can be used to fetch the data:

    server_ip=$(grep dhcp-server-identifier /var/lib/dhclient-eth0.leases | tail -1 | awk '{print $NF}' | tr '\;' ' ')
    wget http://${server_ip}/latest/user-data
    
This feature can be useful, for example to use into puppet facts [1], or to do automation and horizontal scaling etc. based on userdata.
    
    [0] http://incubator.apache.org/cloudstack/docs/api/apidocs-4.0.0/domain_admin/updateVirtualMachine.html
    [1] http://geek.jasonhancock.com/2011/11/09/cloudstack-userdata-into-puppet-facts/

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira