cloudmesh / client

Deprecated: Version 3 of cloudmesh is a light weight cloud client to manage virtual clusters
http://cloudmesh.github.io/client
Other
3 stars 12 forks source link

Error in sample script vms.cm #252

Open mmccombe opened 7 years ago

mmccombe commented 7 years ago
ISSUE TYPE

The cloudmesh documentation has the following sample script "vms.cm" to create 3 virtual machines at: http://cloudmesh.github.io/client/commands/command_advanced.html#script-to-create-3-vms

The wait for VMS section runs the command "vm ip wait $vm#" for each vm. This is not a valid cloudmesh command and cause the message "Could not execute command the command" to be returned. I believe the three wait lines should be replaced by one line "vm wait" as that has worked for all of my testing.

REPLACE vm ip wait $vm1 vm ip wait $vm2 vm ip wait $vm3

WITH vm wait

ENTIRE SCRIPT

Script to create 3 vms

Let us assume the cloud is the chameleon cloud on which we like to create the vms. Than our script vms.cm looks as follows:

var cloud=chameleon

refresh on debug off key add --ssh default cloud=$cloud secgroup upload --cloud=$cloud

GET 3 VMS WITH IP

vm boot var vm1=default.vm

vm boot var vm2=default.vm

vm boot var vm3=default.vm

WAIT FOR THE VMS

vm ip wait $vm1 vm ip wait $vm2 vm ip wait $vm3

ASSIGN IPS

vm ip assign $vm1 vm ip assign $vm2 vm ip assign $vm3

CREATE THE INVENTORY

vm ip inventory $vm1,$vm2,$vm3

TEST SSH

vm ssh $vm1 --command=hostname vm ssh $vm2 --command=hostname vm ssh $vm3 --command=hostname