From 30fd6a32a2590fad0e06493cd505e45ae507f418 Mon Sep 17 00:00:00 2001 From: sophia Date: Tue, 14 Feb 2023 16:05:00 -0800 Subject: [PATCH 1/6] Update curl download options docs --- website/content/docs/vagrantfile/machine_settings.mdx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/website/content/docs/vagrantfile/machine_settings.mdx b/website/content/docs/vagrantfile/machine_settings.mdx index 4a437f03c..4a59d81ea 100644 --- a/website/content/docs/vagrantfile/machine_settings.mdx +++ b/website/content/docs/vagrantfile/machine_settings.mdx @@ -76,7 +76,9 @@ the name of the synced folder plugin. to pass to the downloader. For example, a path to a key that the downloader should use could be specified as `{key: ""}`. The keys should be options supported by `curl` using the unshortened form of the flag. For - example, use `append` instead of `a`. + example, use `append` instead of `a`. To pass a curl option that does not + accept a value, include the option in the map with the value `true`. For + example specify the `--fail` flag as `{fail: true}`. - `config.vm.box_download_insecure` (boolean) - If true, then SSL certificates from the server will not be verified. By default, if the URL is an HTTPS From fbd90b1965974dc1ac300568d3cc583f3a86b1d8 Mon Sep 17 00:00:00 2001 From: sophia Date: Tue, 14 Feb 2023 16:17:42 -0800 Subject: [PATCH 2/6] Clarify file provisioning docs --- website/content/docs/provisioning/file.mdx | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/website/content/docs/provisioning/file.mdx b/website/content/docs/provisioning/file.mdx index aae5e7fd3..a49309d91 100644 --- a/website/content/docs/provisioning/file.mdx +++ b/website/content/docs/provisioning/file.mdx @@ -27,10 +27,11 @@ end ``` If you want to upload a folder to your guest system, it can be accomplished by -using a file provisioner seen below. When copied, the resulting folder on the guest will -replace `folder` as `newfolder` and place its on the guest machine. Note that if -you'd like the same folder name on your guest machine, make sure that the destination -path has the same name as the folder on your host. +using a file provisioner seen below. This will copy the your local `folder` +(specified as the `source`) to the the `newfolder` on the guest machine +(specified as the `destination`). Note that if you'd like the same folder name +on your guest machine, make sure that the destination path has the same name as +the folder on your host. ```ruby Vagrant.configure("2") do |config| From 37540664c707fef5d689e693b9525665220f2d67 Mon Sep 17 00:00:00 2001 From: sophia Date: Wed, 15 Feb 2023 10:09:49 -0800 Subject: [PATCH 3/6] Add another example for finding ip --- website/content/docs/networking/private_network.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/content/docs/networking/private_network.mdx b/website/content/docs/networking/private_network.mdx index f52b06cbe..79770e5c9 100644 --- a/website/content/docs/networking/private_network.mdx +++ b/website/content/docs/networking/private_network.mdx @@ -40,7 +40,7 @@ end This will automatically assign an IP address from the reserved address space. The IP address can be determined by using `vagrant ssh` to SSH into the machine and using the appropriate command line tool to find the IP, -such as `ifconfig`. +such as `ifconfig` or `ip addr show`. ## Static IP From 1c72132914e14cc7145bb9deca242489036f0cb6 Mon Sep 17 00:00:00 2001 From: Mike Pennisi Date: Thu, 7 Apr 2022 18:08:17 -0400 Subject: [PATCH 4/6] Document Box requirement for "vagrant" group By default, the `vagrant rsync` command assumes that the SSH user belongs to a group of the same name [1]: # Folder options opts[:owner] ||= ssh_info[:username] opts[:group] ||= ssh_info[:username] Although consumers can override this behavior, Vagrant Boxes which follow this convention will provide a more seamless experience. Document the convention in the instructions for Vagrant Box authors. [1] https://github.com/hashicorp/vagrant/blob/3d68e16f1b5d616f879d24f48dac2598acac0a38/plugins/synced_folders/rsync/helper.rb#L73-L75 --- website/content/docs/boxes/base.mdx | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/website/content/docs/boxes/base.mdx b/website/content/docs/boxes/base.mdx index f6d352757..c32f50b5e 100644 --- a/website/content/docs/boxes/base.mdx +++ b/website/content/docs/boxes/base.mdx @@ -116,10 +116,11 @@ users, passwords, private keys, etc.). By default, Vagrant expects a "vagrant" user to SSH into the machine as. This user should be setup with the [insecure keypair](https://github.com/hashicorp/vagrant/tree/main/keys) -that Vagrant uses as a default to attempt to SSH. Also, even though -Vagrant uses key-based authentication by default, it is a general convention -to set the password for the "vagrant" user to "vagrant". This lets people -login as that user manually if they need to. +that Vagrant uses as a default to attempt to SSH. It should belong to a +group named "vagrant". Also, even though Vagrant uses key-based +authentication by default, it is a general convention to set the +password for the "vagrant" user to "vagrant". This lets people login as +that user manually if they need to. To configure SSH access with the insecure keypair, place the public key into the `~/.ssh/authorized_keys` file for the "vagrant" user. Note From fa24dc82376faedded652d32bba80431b3637e9d Mon Sep 17 00:00:00 2001 From: Ryan Gerstenkorn Date: Mon, 30 Nov 2020 01:50:26 -0600 Subject: [PATCH 5/6] Add example config to disable default share When you use the default share the guest has access to the Vagrantfile on the host. Disabling the default share and using sharing another subfolder is an easy way to work around this. --- templates/commands/init/Vagrantfile.erb | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/templates/commands/init/Vagrantfile.erb b/templates/commands/init/Vagrantfile.erb index 5b9bff115..a9b33125d 100644 --- a/templates/commands/init/Vagrantfile.erb +++ b/templates/commands/init/Vagrantfile.erb @@ -54,6 +54,13 @@ Vagrant.configure("2") do |config| # argument is a set of non-required options. # config.vm.synced_folder "../data", "/vagrant_data" + # Disable the default share of the current code directory. Doing this + # provides improved isolation between the vagrant box and your host + # by making sure your Vagrantfile isn't accessable to the vagrant box. + # If you use this you may want to enable additional shared subfolders as + # shown above. + # config.vm.synced_folder ".", "/vagrant", disabled: true + # Provider-specific configuration so you can fine-tune various # backing providers for Vagrant. These expose provider-specific options. # Example for VirtualBox: From d0ff2886daf8da89a7779792c0adda95ebccf2d5 Mon Sep 17 00:00:00 2001 From: sophia Date: Wed, 15 Feb 2023 16:07:04 -0800 Subject: [PATCH 6/6] Add linux command for uuids ref: https://github.com/hashicorp/vagrant/pull/12015 --- website/content/docs/cli/package.mdx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/website/content/docs/cli/package.mdx b/website/content/docs/cli/package.mdx index c93362d3d..1bae2dfcf 100644 --- a/website/content/docs/cli/package.mdx +++ b/website/content/docs/cli/package.mdx @@ -20,7 +20,9 @@ and if the provider supports it. - `--base NAME` - Instead of packaging a VirtualBox machine that Vagrant manages, this will package a VirtualBox machine that VirtualBox manages. `NAME` should be the name or UUID of the machine from the VirtualBox GUI. - Currently this option is only available for VirtualBox. + Currently this option is only available for VirtualBox. + **In a multi-machine environment, the UUID is required.** This info can be + gathered in two different ways `ls -l ~/VirtualBox\ VMs` or `vboxmanage list vms`. - `--output NAME` - The resulting package will be saved as `NAME`. By default, it will be saved as `package.box`.