Guest User

Untitled

a guest
Jan 21st, 2019
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.02 KB | None | 0 0
  1. ### Step 1: VM Configuration
  2.  
  3. Create VM on Hyper V. In my case .iso file - kubuntu-18.04.1-desktop-amd64.iso
  4.  
  5. Add External network Adapter.
  6.  
  7. Export VM and create metadata.json file with
  8.  
  9. {
  10. "provider": "hyperv"
  11. }
  12.  
  13. update sudoers file for vagrant user using sudo without password prompt.
  14. ```sudo visudo``` and change line **%sudo ALL=(ALL:ALL) ALL** to: **%sudo ALL=(ALL:ALL) NOPASSWD:ALL**
  15.  
  16. install ssh - ``` sudo apt install openssh-server
  17.  
  18. ## Step 2: Box add and vagrant configuration
  19.  
  20. create box from vagrant by command ```vagrant box add box-name box-path```
  21.  
  22. create vagrant file by command ```vagrant init```
  23.  
  24. change config.vm.box from **base** to **"kubuntu-18.04.1"**
  25.  
  26. ``` vagrant up ``` with **--provider hyperv** key
  27.  
  28. **if you receive error with checking hyper-v access**
  29.  
  30. Go to "C:\HashiCorp\Vagrant\embedded\gems\2.2.3\gems\vagrant-2.2.3\plugins\providers\hyperv\scripts\utils\VagrantVM\VagrantVM.psm1"
  31.  
  32. And remove content of function **Check-VagrantHyperVAccess {}**
  33.  
  34. ## Step 3: Packaging
  35.  
  36. vagrant package --output mynew.box
Add Comment
Please, Sign In to add comment