frapposelli / vagrant-vcloud

Vagrant provider for VMware vCloud Director®
MIT License
67 stars 38 forks source link

Configure private network in vagrant file #114

Closed dorheini closed 3 years ago

dorheini commented 9 years ago

Hi. Is it possible to configure a private network in the vagrant vcloud plugin within the vagrant file as it is possible to configure private network in vagrant? my vagrant file:

-- mode: ruby --

vi: set ft=ruby :

nodes = [ { :hostname => 'test', :box => 'gateway', :box_url => 'MyBoxFile'} ]

VAGRANTFILE_API_VERSION = "2"

Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|

    config.vm.provider :vcloud do |vcloud|
        vcloud.vapp_prefix = "test"
            vcloud.hostname = 'https://vcloud.com'
            vcloud.username = 'Username'
        vcloud.password = 'Password'

         vcloud.org_name = 'OrgName'
         vcloud.vdc_name = 'Interactive'
         vcloud.catalog_name = 'Vagrant'

         # Set configuration for vApp-level networking.
         vcloud.network_bridge = true

         # Set the Organization Network where we will attach our vApp to
         vcloud.vdc_network_name = 'VdcNetworkName'
    end

    nodes.each do |node|
            config.vm.define node[:hostname] do |node_config|
                node_config.vm.box = node[:box]
                node_config.vm.hostname = node[:hostname]
                node_config.vm.box_url = node[:box_url]
                node_config.vm.network :forwarded_port,
                                    guest: 80,
                                    host: 8080,
                                    auto_correct: true

        end
end

end

tsugliani commented 9 years ago

Did you check this Network Deployment Options ?

Those are the supported network topologies for vagrant-vcloud.