Creating a Box That Doesn't Appear to Match Standard Model?

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Creating a Box That Doesn't Appear to Match Standard Model?

Jon Forrest
I want to create a Vagrant box file that doesn't appear
to match the way boxes are created, as shown in the
Vagrant "Base Boxes" document. I should mention that I've
already successfully created a VirtualBox to use for the
base. Also, I'm using Vagrant 1.0.5 on Windows. I'm hoping
to get some advice about the correct way to do what
I describe below.

Here's how my box differs:

1) I don't intend on using Puppet at all in
this box. Yet, the docs say Ruby and RubyGems,
and Chef or Puppet are required. I don't understand
if this is a real requirement, or only necessary
in configurations that will indeed use Puppet or Chef.

2) My VM needs both a host-only network and a NAT
adapter. Not only that, but the NAT network *must*
be on eth1 and the host-only on eth0. Since Vagrant
automatically creates a NAT network, I'm concerned
that this will be the first network it creates, thus
putting it on eth0. How can I control which network
goes where?

3) I've created my VirtualBox VM to have static
IP addresses for both networks. Yet, the host-only
network configuration option

    config.vm.network :hostonly, "X.X.X.X"

appears to require an IP address. Why does Vagrant
need to be given an IP address here?

4) The document says "the main user should have password-less
sudo privileges". Why is this necessary as opposed to just
having a root account preloaded with the proper public ssh keys?

5) I created a test Vagrantfile that looks like this:

Vagrant::Config.run do |config|
  # ...
  config.vm.network :hostonly, "192.168.1.1"
end

and then ran

vagrant package --vagrantfile Vagrantfile Machine1

To my surprise, Vagrant produced the message

"A multi-vm environment is required for name specification to this command"

What is this about? The name I specified is just the VirtualBox
name for the VM I want to use as the base. I turned on Vagrant
logging but this error was the first error shown.

Cordially,
Jon Forrest

--
You received this message because you are subscribed to the Google Groups "Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
 
 
Reply | Threaded
Open this post in threaded view
|

Re: Creating a Box That Doesn't Appear to Match Standard Model?

Daniel Kuffner
Hi John'
You do not have to install puppet or chef. I use such boxes myself to test our installer.



On Tuesday, February 19, 2013 4:42:58 AM UTC+1, Jon Forrest wrote:

> I want to create a Vagrant box file that doesn't appear
> to match the way boxes are created, as shown in the
> Vagrant "Base Boxes" document. I should mention that I've
> already successfully created a VirtualBox to use for the
> base. Also, I'm using Vagrant 1.0.5 on Windows. I'm hoping
> to get some advice about the correct way to do what
> I describe below.
>
> Here's how my box differs:
>
> 1) I don't intend on using Puppet at all in
> this box. Yet, the docs say Ruby and RubyGems,
> and Chef or Puppet are required. I don't understand
> if this is a real requirement, or only necessary
> in configurations that will indeed use Puppet or Chef.
>
> 2) My VM needs both a host-only network and a NAT
> adapter. Not only that, but the NAT network *must*
> be on eth1 and the host-only on eth0. Since Vagrant
> automatically creates a NAT network, I'm concerned
> that this will be the first network it creates, thus
> putting it on eth0. How can I control which network
> goes where?
>
> 3) I've created my VirtualBox VM to have static
> IP addresses for both networks. Yet, the host-only
> network configuration option
>
>     config.vm.network :hostonly, "X.X.X.X"
>
> appears to require an IP address. Why does Vagrant
> need to be given an IP address here?
>
> 4) The document says "the main user should have password-less
> sudo privileges". Why is this necessary as opposed to just
> having a root account preloaded with the proper public ssh keys?
>
> 5) I created a test Vagrantfile that looks like this:
>
> Vagrant::Config.run do |config|
>   # ...
>   config.vm.network :hostonly, "192.168.1.1"
> end
>
> and then ran
>
> vagrant package --vagrantfile Vagrantfile Machine1
>
> To my surprise, Vagrant produced the message
>
> "A multi-vm environment is required for name specification to this command"
>
> What is this about? The name I specified is just the VirtualBox
> name for the VM I want to use as the base. I turned on Vagrant
> logging but this error was the first error shown.
>
> Cordially,
> Jon Forrest

--
You received this message because you are subscribed to the Google Groups "Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.