Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
windows-vm
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
pem
windows-vm
Commits
8208a074
Commit
8208a074
authored
Mar 21, 2025
by
César Galvis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: added more features in vagrantfile
parent
80728084
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
65 additions
and
0 deletions
+65
-0
README.md
README.md
+47
-0
Vagrantfile
Vagrantfile
+18
-0
InstallChocolatey.ps1
src/scripts/InstallChocolatey.ps1
+0
-0
No files found.
README.md
View file @
8208a074
...
...
@@ -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
Vagrantfile
View file @
8208a074
...
...
@@ -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.
...
...
src/scripts/InstallChocolatey.ps1
0 → 100644
View file @
8208a074
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment