how to start this
Closed this issue · 7 comments
I'm not very clear about how to run this. I copy the demo vagrant file. but there is the error when run varant up
Bringing machine 'default' up with 'cloudstack' provider...
==> default: Couldn't find Cheffile at ./Cheffile.
==> default: Warning! The Cloudstack provider doesn't support any of the Vagrant
==> default: high-level network configurations (config.vm.network
). They
==> default: will be silently ignored.
==> default: Fetching name for network with UUID 'network id'
/Users/ezhang/.vagrant.d/gems/gems/excon-0.45.4/lib/excon/socket.rb:108:in getaddrinfo': getaddrinfo: nodename nor servname provided, or not known (SocketError) (Excon::Errors::SocketError) from /Users/ezhang/.vagrant.d/gems/gems/excon-0.45.4/lib/excon/socket.rb:108:in
connect'
from /Users/ezhang/.vagrant.d/gems/gems/excon-0.45.4/lib/excon/ssl_socket.rb:148:in connect' from /Users/ezhang/.vagrant.d/gems/gems/excon-0.45.4/lib/excon/socket.rb:28:in
initialize'
from /Users/ezhang/.vagrant.d/gems/gems/excon-0.45.4/lib/excon/ssl_socket.rb:8:in initialize' from /Users/ezhang/.vagrant.d/gems/gems/excon-0.45.4/lib/excon/connection.rb:387:in
new'
from /Users/ezhang/.vagrant.d/gems/gems/excon-0.45.4/lib/excon/connection.rb:387:in socket' from /Users/ezhang/.vagrant.d/gems/gems/excon-0.45.4/lib/excon/connection.rb:106:in
request_call'
from /Users/ezhang/.vagrant.d/gems/gems/excon-0.45.4/lib/excon/middlewares/mock.rb:47:in request_call' from /Users/ezhang/.vagrant.d/gems/gems/excon-0.45.4/lib/excon/middlewares/instrumentor.rb:22:in
request_call'
from /Users/ezhang/.vagrant.d/gems/gems/excon-0.45.4/lib/excon/middlewares/base.rb:15:in request_call' from /Users/ezhang/.vagrant.d/gems/gems/excon-0.45.4/lib/excon/middlewares/base.rb:15:in
request_call'
from /Users/ezhang/.vagrant.d/gems/gems/excon-0.45.4/lib/excon/middlewares/base.rb:15:in request_call' from /Users/ezhang/.vagrant.d/gems/gems/excon-0.45.4/lib/excon/connection.rb:233:in
request'
from /Users/ezhang/.vagrant.d/gems/gems/fog-core-1.32.1/lib/fog/core/connection.rb:81:in request' from /Users/ezhang/.vagrant.d/gems/gems/fog-1.22.1/lib/fog/xml.rb:23:in
request'
from /Users/ezhang/.vagrant.d/gems/gems/fog-1.22.1/lib/fog/cloudstack/compute.rb:229:in issue_request' from /Users/ezhang/.vagrant.d/gems/gems/fog-1.22.1/lib/fog/cloudstack/compute.rb:192:in
request'
from /Users/ezhang/.vagrant.d/gems/gems/fog-1.22.1/lib/fog/cloudstack/requests/compute/list_networks.rb:13:in list_networks' from /Users/ezhang/.vagrant.d/gems/gems/vagrant-cloudstack-1.1.0/lib/vagrant-cloudstack/action/run_instance.rb:487:in
translate_from_to'
from /Users/ezhang/.vagrant.d/gems/gems/vagrant-cloudstack-1.1.0/lib/vagrant-cloudstack/action/run_instance.rb:501:in id_to_resourcefield' from /Users/ezhang/.vagrant.d/gems/gems/vagrant-cloudstack-1.1.0/lib/vagrant-cloudstack/action/run_instance.rb:510:in
id_to_name'
from /Users/ezhang/.vagrant.d/gems/gems/vagrant-cloudstack-1.1.0/lib/vagrant-cloudstack/action/run_instance.rb:61:in call' from /opt/vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/action/warden.rb:34:in
call'
from /Users/ezhang/.vagrant.d/gems/gems/vagrant-cloudstack-1.1.0/lib/vagrant-cloudstack/action/warn_networks.rb:14:in call' from /opt/vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/action/warden.rb:34:in
call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/action/builtin/synced_folders.rb:84:in call' from /opt/vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/action/warden.rb:34:in
call'
from /Users/ezhang/.vagrant.d/gems/gems/vagrant-omnibus-1.4.1/lib/vagrant-omnibus/action/install_chef.rb:38:in call' from /opt/vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/action/warden.rb:34:in
call'
from /Users/ezhang/.vagrant.d/gems/gems/vagrant-hostmanager-1.6.1/lib/vagrant-hostmanager/action/update_all.rb:24:in call' from /opt/vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/action/warden.rb:34:in
call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/action/builtin/config_validate.rb:25:in call' from /opt/vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/action/warden.rb:34:in
call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/action/builtin/provision.rb:80:in call' from /opt/vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/action/warden.rb:34:in
call'
from /Users/ezhang/.vagrant.d/gems/gems/vagrant-librarian-chef-0.2.1/lib/vagrant-librarian-chef/action/librarian_chef.rb:20:in call' from /opt/vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/action/warden.rb:34:in
call'
from /Users/ezhang/.vagrant.d/gems/gems/vagrant-berkshelf-4.0.4/lib/vagrant-berkshelf/action/upload.rb:13:in call' from /opt/vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/action/warden.rb:34:in
call'
from /Users/ezhang/.vagrant.d/gems/gems/vagrant-berkshelf-4.0.4/lib/vagrant-berkshelf/action/install.rb:10:in call' from /opt/vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/action/warden.rb:34:in
call'
from /Users/ezhang/.vagrant.d/gems/gems/vagrant-berkshelf-4.0.4/lib/vagrant-berkshelf/action/save.rb:10:in call' from /opt/vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/action/warden.rb:34:in
call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/action/warden.rb:95:in block in finalize_action' from /opt/vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/action/warden.rb:34:in
call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/action/warden.rb:34:in call' from /opt/vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/action/builder.rb:116:in
call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/action/runner.rb:66:in block in run' from /opt/vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/util/busy.rb:19:in
busy'
from /opt/vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/action/runner.rb:66:in run' from /opt/vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/action/builtin/call.rb:53:in
call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/action/warden.rb:34:in call' from /Users/ezhang/.vagrant.d/gems/gems/vagrant-cloudstack-1.1.0/lib/vagrant-cloudstack/action/connect_cloudstack.rb:42:in
call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/action/warden.rb:34:in call' from /Users/ezhang/.vagrant.d/gems/gems/vagrant-berkshelf-4.0.4/lib/vagrant-berkshelf/action/share.rb:10:in
call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/action/warden.rb:34:in call' from /Users/ezhang/.vagrant.d/gems/gems/vagrant-berkshelf-4.0.4/lib/vagrant-berkshelf/action/load.rb:10:in
call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/action/warden.rb:34:in call' from /opt/vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/action/builtin/env_set.rb:19:in
call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/action/warden.rb:34:in call' from /Users/ezhang/.vagrant.d/gems/gems/vagrant-berkshelf-4.0.4/lib/vagrant-berkshelf/action/check.rb:12:in
call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/action/warden.rb:34:in call' from /opt/vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/action/builtin/config_validate.rb:25:in
call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/action/warden.rb:34:in call' from /opt/vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/action/builder.rb:116:in
call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/action/runner.rb:66:in block in run' from /opt/vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/util/busy.rb:19:in
busy'
from /opt/vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/action/runner.rb:66:in run' from /opt/vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/machine.rb:214:in
action_raw'
from /opt/vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/machine.rb:191:in block in action' from /opt/vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/environment.rb:516:in
lock'
from /opt/vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/machine.rb:178:in call' from /opt/vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/machine.rb:178:in
action'
from /opt/vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/batch_action.rb:82:in `block (2 levels) in run'
Posting the Vagrantfile you used helps in figuring out what is going wrong, but from the output I suspect you have not specified a correct network UUID
==> default: Fetching name for network with UUID 'network id'
You can either specify a network UUID (something you need to find out in Cloudstack) or a network name (something you also find out in Cloudstack but is easier to remember).
From the output it seems you have set something like
cloudstack.network_id = 'network id'
Where network id
should be a UUID of a network in Cloudstack.
Hi Miguel
Thanks a lot. I'm new to Cloudstack.
---vagrantfile-----
Vagrant.configure("2") do |config|
# We don't use virtualbox so use dummy
config.vm.box = "dummy"
# The username of your bootstrap account
config.ssh.username = "bootstrap"
#Path to the SSH key of your bootstrap account
config.ssh.private_key_path = "~/.ssh/bootstrap.key"
# Tell Vagrant which version of Chef client to use config.omnibus.chef_version =:latest
# Tell Vagrant we like to use Berkshelf to resolve our cookbook dependencies config.berkshelf.enabled = true
# Now configure the Cloudstack parameters
config.vm.provider :cloudstack do |cloudstack, override|
cloudstack.host = "cloudstack.cloudprovider.org"
cloudstack.port = "443"
cloudstack.scheme = "https"
cloudstack.api_key = "1234567890qwertyuio"
cloudstack.secret_key = "1234567890qwertyu"
cloudstack.template_id = "template id"
cloudstack.service_offering_id = "offering id"
cloudstack.network_id = "network id"
cloudstack.zone_id = "ezone"
cloudstack.project_id = "ecloud"
cloudstack.instance_ready_timeout = 300
end
end
No worries @ezhang-pivotal, we're here to help you out.
In your Vagrantfile I see that you have not filled in several parameters that are required, namely:
cloudstack.template_id = "template id"
cloudstack.service_offering_id = "offering id"
cloudstack.network_id = "network id"
cloudstack.zone_id = "ezone"
cloudstack.project_id = "ecloud"
The vagrant-cloudstack plugin needs you to tell it which zone, project, template, service offering and network to use when creating a VM.
So, you need to have those ready in Cloudstack and then fill in the values in your Vagrantfile.
You can either fill in UUIDs or the names. For the UUIDs you need to use the *_id
attributes (just like what you have in your current Vagrantfile). For the names you need to use the respective *_name
attributes.
Example Vagrantfile snippet using UUIDs:
cloudstack.template_id = "12e2209a-cf0f-4aab-ac8b-8c208b25d9aa"
cloudstack.service_offering_id = "34e2209a-cf0f-4aab-ac8b-8c208b25d9aa"
cloudstack.network_id = "56e2209a-cf0f-4aab-ac8b-8c208b25d9aa"
cloudstack.zone_id = "78e2209a-cf0f-4aab-ac8b-8c208b25d9aa"
cloudstack.project_id = "90e2209a-cf0f-4aab-ac8b-8c208b25d9aa"
(UUIDs are fake, just for reference)
Example Vagrant file snippet using equivalent names:
cloudstack.template_name = "some_template"
cloudstack.service_offering_name = "some_service_offering"
cloudstack.network_name = "some_network"
cloudstack.zone_name = "ecloud"
cloudstack.project_name = "ecloud"
Let me know if you run into other difficulties.
Maybe I have wrong understanding. I still need a Cloudstack to using this? What I'm trying to find is a small cloudstack can run in vagrant
Yes, you do need a Cloudstack installation to run this against.
Basically, this plugin allows you to use Cloiudstack as a back-end for your Vagrant VMs.
@ezhang-pivotal can I close this issue?
Hi Schuberg Thanks a lot for your help. You can close it now
发送自 Outlook
On Thu, Aug 20, 2015 at 4:27 PM -0700, "Miguel Ferreira" notifications@github.com wrote:
@ezhang-pivotal can I close this issue?
—
Reply to this email directly or view it on GitHub.