# Windows 10 Virtual Machine, R environment, as GitLab runner
> create a Virtualbox under windows 10 with R and Rtools + some dependencies.
If you want to develop and test your R package, build an R package binary under/for windows automatically, this is the right place.
> Create a VirtualBox under windows 10 with R and Rtools + some dependencies. And register it as a GitLab Runner.
## Dependencies
### System
* VirtualBox (>=6.0.0) and extension Pack
* Vagrant (>=2.2.10)
* Ansible (>=2.2.1.0)
* pywinrm (>=0.3.0) compatible with Ansible Python version (defualt is 2)
### GitLab Runner
A bare metal or a Virtual Machine with nested Virtualization on the hypervisor activated as a server.
Install GitLab-Runner and register a _shell_ runner. _gitlab-runner_ user have to get access to _vboxmanage_, _vagrant_ and _ansible_.
Register a virtualbox runner call win10R4.
```bash
gitlab-runner register \
--non-interactive\
--name win10R4
--url <Gitlab_URL> \
--registration-token <registration-token> \
--executor"virtualbox"\
--tag-list windows,R4 \
--ssh-user vagrant \
--ssh-password vagrant \
--virtualbox-base-name"WIN10R4"\
--virtualbox-disable-snapshots=false\
--virtualbox-base-snapshot="bootR4"
```
## Principle
We use a Vagrant box _GAEV/win10_ (from vagrant cloud) that is a windows10 professional test version with vboxaGuestAditions.
Every things happen in the [[.gitlab-ci.xml]] file.
Vagrant create and provision (via ansible) the virtualbox.
Mainly the [[VagrantFile]] set up a virtual machine from Vagrant cloud _GAEV/win10_ (a windows10 professional evaluation version with vbBoxGuestAditions).
Files in [[provisioning]] are playbooks for ansible that will install/configure R, Rtools, packages, MiKTeX, Pandoc, gitlab-runner.
After the virtual machine creation and configuration, it registered as a new gitlab-runner (by replacing the existing virtualbox machine "WIN10R4").
After virtual machine creation and configuration, it registered as a new gitlab-runner (by replacing an existing one).