Commit 8208a074 by César Galvis

feat: added more features in vagrantfile

parent 80728084
......@@ -22,11 +22,57 @@ Install VirtualBox from [here](https://www.virtualbox.org/wiki/Downloads)
### Configure environment
> Some steps from [dev.to](https://dev.to/sannae/setting-up-windows-virtual-test-environments-with-vagrant-4k1b)
> Check vagrant boxes [here](https://portal.cloud.hashicorp.com/vagrant/discover)
```sh
# Create a Vagrantfile and initiate the box
vagrant init gusztavvargadr/windows-11 --box-version 2302.0.2409
```
Generate `Chocolatey` script from [here](https://chocolatey.org/install) and add the file in `src/scripts/InstallChocolatey.ps1` file.
Add the following lines in `Vagrantfile`:
```ruby
# VM setup
config.vm.provider "virtualbox" do |vb|
vb.name = "Windows-VPN"
vb.memory = 2048
vb.cpus = 2
end
# Enable UI
config.vm.provider "virtualbox" do |vb|
vb.gui = true
end
# Provisioning
## Run the external script to install Chocolatey
config.vm.provision "shell", path: "src/scripts/InstallChocolatey.ps1"
## Run the inline script to install forticlientvpn via Chocolatey
config.vm.provision "shell", inline: "choco install forticlientvpn --yes"
```
### Run the virtual machine
```sh
# Bring up your virtual machine
vagrant up
```
### Post installation steps
In `VirtualBox`, go to `Devices` ->
## Useful commands
```sh
# Suspend VM
vagrant suspend
# Power off VM
vagrant halt
# Destroy VM
vagrant destroy
```
\ No newline at end of file
......@@ -15,6 +15,24 @@ Vagrant.configure("2") do |config|
config.vm.box = "gusztavvargadr/windows-11"
config.vm.box_version = "2302.0.2409"
# VM setup
config.vm.provider "virtualbox" do |vb|
vb.name = "Windows-VPN"
vb.memory = 2048
vb.cpus = 2
end
# Enable UI
config.vm.provider "virtualbox" do |vb|
vb.gui = true
end
# Provisioning
## Run the external script to install Chocolatey
config.vm.provision "shell", path: "src/scripts/InstallChocolatey.ps1"
## Run the inline script to install forticlientvpn via Chocolatey
config.vm.provision "shell", inline: "choco install forticlientvpn --yes"
# Disable automatic box update checking. If you disable this, then
# boxes will only be checked for updates when the user runs
# `vagrant box outdated`. This is not recommended.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment