I recently bought a book called: DevOps for the Desparate and cannot get past chapter 1 exercises to create a VM in Oracle Virtual Box.
In the initial set-up phase for chapter 1, I am creating:
- A Hyper-V Ubuntu VM
- In the Ubuntu VM, I am creating another VM in Oracle VirtualBox using Vagrant
I've gone through the exercises multiple times now and not having much luck since when I get to the command that creates the VM using
vagrant up
The creation fails.
I've tried the following OS's
- Ubuntu 18.04 LTS
- Ubuntu 20.04 LTS
- Ubuntu 22.04 LTS
This was not in the instructions, but when the Hyper-V image is created, I resized the hard drive to 100GB in Hyper-V setting since I kept running out of space when I ran:
$vagrant up
After I resized the hard drive in Hyper-V, I discovered that I also needed to resize the Linux partition which I did using:
growpart
All of the other steps I completed successfully, IE:
Page xiv
Set-VMProcessor -VMName 'Ubuntu 20.04 LTS' -ExposeVirtualizationExtensions $true
Page xxi
$git clone https://github.com/bradleyd/devops_for_the_desperate/
Page 4
Installed Vagrant
Page 7
Installed Ansible
When I get to Page 9, this fails:
$ vagrant up
I've been getting different errors, but now I am getting this one:
$ vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Importing base box 'ubuntu/focal64'...
==> default: Matching MAC address for NAT networking...
==> default: Checking if box 'ubuntu/focal64' version '20230719.0.0' is up to date...
==> default: Setting the name of the VM: dftd
==> default: Clearing any previously set network interfaces...
**There was an error while executing `VBoxManage`, a CLI used by Vagrant for controlling VirtualBox. The command and stderr is shown below.
Command: ["hostonlyif", "ipconfig", "vboxnet2", "--ip", "172.28.128.1", "--netmask", "255.255.255.0"]
Stderr: VBoxManage: error: Code E_ACCESSDENIED (0x80070005) - Access denied (extended info not available)
VBoxManage: error: Context: "EnableStaticIPConfig(Bstr(pszIp).raw(), Bstr(pszNetmask).raw())" at line 242 of file VBoxManageHostonly.cpp**
Thanks in advance.