Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ### Step 1: VM Configuration
- Create VM on Hyper V. In my case .iso file - kubuntu-18.04.1-desktop-amd64.iso
- Add External network Adapter.
- Export VM and create metadata.json file with
- {
- "provider": "hyperv"
- }
- update sudoers file for vagrant user using sudo without password prompt.
- ```sudo visudo``` and change line **%sudo ALL=(ALL:ALL) ALL** to: **%sudo ALL=(ALL:ALL) NOPASSWD:ALL**
- install ssh - ``` sudo apt install openssh-server
- ## Step 2: Box add and vagrant configuration
- create box from vagrant by command ```vagrant box add box-name box-path```
- create vagrant file by command ```vagrant init```
- change config.vm.box from **base** to **"kubuntu-18.04.1"**
- ``` vagrant up ``` with **--provider hyperv** key
- **if you receive error with checking hyper-v access**
- Go to "C:\HashiCorp\Vagrant\embedded\gems\2.2.3\gems\vagrant-2.2.3\plugins\providers\hyperv\scripts\utils\VagrantVM\VagrantVM.psm1"
- And remove content of function **Check-VagrantHyperVAccess {}**
- ## Step 3: Packaging
- vagrant package --output mynew.box
Add Comment
Please, Sign In to add comment