├── .gitignore ├── Vagrantfile ├── LICENSE └── README.md /.gitignore: -------------------------------------------------------------------------------- 1 | .vagrant 2 | win10x64Pro.box 3 | -------------------------------------------------------------------------------- /Vagrantfile: -------------------------------------------------------------------------------- 1 | # -*- mode: ruby -*- 2 | # vi: set ft=ruby : 3 | 4 | # All Vagrant configuration is done below. The "2" in Vagrant.configure 5 | # configures the configuration version (we support older styles for 6 | # backwards compatibility). Please don't change it unless you know what 7 | # you're doing. 8 | Vagrant.configure(2) do |config| 9 | 10 | # Every Vagrant virtual environment requires a box to build off of. 11 | config.vm.box = "win10x64Pro" 12 | config.vm.box_url = "http://1234" 13 | 14 | config.vm.guest = :windows 15 | config.vm.communicator = "winrm" 16 | config.vm.boot_timeout = 600 17 | config.vm.graceful_halt_timeout = 600 18 | 19 | config.vm.network :forwarded_port, guest: 3389, host: 3389 20 | config.vm.network :forwarded_port, guest: 5985, host: 5985, id: "winrm", auto_correct: true 21 | 22 | config.vm.provider "virtualbox" do |vm| 23 | vm.name = "vagrant-pc" 24 | vm.gui = true 25 | vm.cpus = 2 26 | vm.memory = 2048 27 | end 28 | end 29 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2016 John Ryan 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # vagrant-windows10 2 | 3 | A windows 10 virtual machine setup to run under VagrantUp and VirtualBox 4 | 5 | 6 | ## Prerequisites 7 | 8 | You'll need both these to get going. 9 | 10 | - Install [git - the source control tool ](https://git-scm.com/downloads) 11 | - Install [VirtualBox - free virtualization software ](https://www.virtualbox.org/wiki/Downloads) 12 | - Install [Vagrant - a tool easily manage and create virtual machines from online images ](https://www.vagrantup.com/) 13 | 14 | ## Usage 15 | 16 | 1. Download the virtual box Windows 10 image and add it to the Vagrant Library 17 | 18 | ``` bash 19 | wget -O ~/Downloads/win10x64Pro.box http://url/to/image 20 | vagrant box add win10x64Pro ~/Downloads/win10x64Pro.box 21 | ``` 22 | 23 | 2. Download this repository containing the Vagrant scripts 24 | 25 | ``` 26 | git clone https://github.com/jnyryan/vagrant-windows10.git 27 | cd vagrant-windows10 28 | ``` 29 | 30 | 3. Start the VM 31 | 32 | ``` 33 | vagrant up 34 | ``` 35 | 36 | After a minute of the provisioning process the VM will start up. 37 | 38 | 4. All done, then shut it down 39 | ``` 40 | vagrant halt 41 | ``` 42 | or destroy it 43 | ``` 44 | vagrant destroy 45 | ``` 46 | 47 | ## Creating your own Vagrant Base image 48 | 49 | This is a WIP of creating a Windows 10 VM. 50 | 51 | Method 52 | 53 | - Download ISO from [microsoft](https://www.microsoft.com/en-gb/software-download/windows10) 54 | - Create a VirtualBox virtual Machine with Windows 10 installed 55 | - Configure it to be used with Vagrant 56 | - create user and pwd as vagrant 57 | - get latest updates 58 | - change it's name to VagrantPC 59 | - Reduce the size of the image 60 | - Create the vagrant "box" 61 | - add the box to your vagrant library 62 | - Create a Vagrantfile so start it up 63 | 64 | 65 | 1. 66 | http://huestones.co.uk/node/305 67 | 68 | http://kamalim.github.io/blogs/how-to-create-you-own-vagrant-base-boxes/ 69 | 70 | http://www.mynetworks.me/2015/08/02/windows-10-built-in-administrator-account-issues/ 71 | 72 | Reduce the size of the image 73 | 74 | [Reduce-the-size-of-your-windows-10-installation-using-compact](http://winaero.com/blog/reduce-the-size-of-your-windows-10-installation-using-compact-exe/) 75 | 76 | Export the vmand import it again to shrink it 77 | 78 | https://www.maketecheasier.com/shrink-your-virtualbox-vm/ 79 | 80 | C:\Windows\System32\cleanmgr.exe /d c: 81 | sdelete.exe -z c: 82 | VboxManage clonehd name-of-original-vm.vdi name-of-clone-vm.vdi 83 | 84 | ### Package the box 85 | 86 | ``` 87 | cd 88 | vagrant package --base win10x64Pro-vagrantbase --output win10x64Pro.box 89 | vagrant box add win10x64Pro win10x64Pro.box 90 | ``` 91 | 92 | ### Repackage the box after making additions 93 | 94 | ``` 95 | cd 96 | vagrant package --output win10x64ProUpdate.box 97 | vagrant box add win10x64ProUpdate win10x64ProUpdate.box 98 | ``` 99 | --------------------------------------------------------------------------------