Error While Executing VBoxManage, showvminfo, E_ACCESSDENIED (0x80070005)
- Dominant language
- Ruby
- Stars
- 27.2k
- Forks
- 4.4k
- Avg merge
- 1m
- Merged PRs (30d)
- 1
Description
### Debug output
PS C:\jason\Metasploitable> vagrant up
Bringing machine 'ub1404' up with 'virtualbox' provider...
Bringing machine 'win2k8' up with 'virtualbox' provider...
==> ub1404: Importing base box 'rapid7/metasploitable3-ub1404'...
==> ub1404: Matching MAC address for NAT networking...
==> ub1404: Checking if box 'rapid7/metasploitable3-ub1404' version '0.1.12-weekly' is up to date...
==> ub1404: Setting the name of the VM: Metasploitable3-ub1404
There was an error while executing `VBoxManage`, a CLI used by Vagrant
for controlling VirtualBox. The command and stderr is shown below.
Command: ["showvminfo", "b44b246c-3b99-43a7-9eb4-772e280c1f0e", "--machinereadable"]
Stderr: VBoxManage.exe: error: The object functionality is limited
VBoxManage.exe: error: Details: code E_ACCESSDENIED (0x80070005), component MachineWrap, interface IMachine, callee IUnknown
VBoxManage.exe: error: Context: "LockMachine(a->session, LockType_Shared)" at line 3328 of file VBoxManageInfo.cpp
PS C:\jason\Metasploitable>
### Expected behavior
I'm expecting to generate two VirtualBox VMs.
### Actual behavior
I get the error pasted above.
### Reproduction information
#### Vagrant version
2.4.9
#### Host operating system
Windows 11 25H2
#### Guest operating system
#### Steps to reproduce
I've tried uninstalling and reinstalling both Vagrant and VirtualBox, rebooting after every action. To reproduce I simply type "vagrant up" and I get the failure.
#### Vagrantfile
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
config.vm.synced_folder '.', '/vagrant', disabled: true
config.vm.define "ub1404" do |ub1404|
ub1404.vm.box = "rapid7/metasploitable3-ub1404"
ub1404.vm.hostname = "metasploitable3-ub1404"
config.ssh.username = 'vagrant'
config.ssh.password = 'vagrant'
ub1404.vm.network "private_network", ip: '172.28.128.3'
ub1404.vm.provider "virtualbox" do |v|
v.name = "Metasploitable3-ub1404"
v.memory = 2048
end
end
config.vm.define "win2k8" do |win2k8|
# Base configuration for the VM and provisioner
win2k8.vm.box = "rapid7/metasploitable3-win2k8"
win2k8.vm.hostname = "metasploitable3-win2k8"
win2k8.vm.communicator = "winrm"
win2k8.winrm.retry_limit = 60
win2k8.winrm.retry_delay = 10
win2k8.vm.network "private_network", type: "dhcp"
win2k8.vm.provider "libvirt" do |v|
v.memory = 4096
v.cpus = 2
v.video_type = 'qxl'
v.input :type => "tablet", :bus => "usb"
v.channel :type => 'unix', :target_name => 'org.qemu.guest_agent.0', :target_type => 'virtio'
v.channel :type => 'spicevmc', :target_name => 'com.redhat.spice.0', :target_type => 'virtio'
v.graphics_type = "spice"
# Enable Hyper-V enlightenments: https://blog.wikichoon.com/2014/07/enabling-hyper-v-enlightenments-with-kvm.html
v.hyperv_feature :name => 'stimer', :state => 'on'
v.hyperv_feature :name => 'relaxed', :state => 'on'
v.hyperv_feature :name => 'vapic', :state => 'on'
v.hyperv_feature :name => 'synic', :state => 'on'
end
# Configure Firewall to open up vulnerable services
case ENV['MS3_DIFFICULTY']
when 'easy'
win2k8.vm.provision :shell, inline: "C:\\startup\\disable_firewall.bat"
else
win2k8.vm.provision :shell, inline: "C:\\startup\\enable_firewall.bat"
win2k8.vm.provision :shell, inline: "C:\\startup\\configure_firewall.bat"
end
# Insecure share from the Linux machine
win2k8.vm.provision :shell, inline: "C:\\startup\\install_share_autorun.bat"
win2k8.vm.provision :shell, inline: "C:\\startup\\setup_linux_share.bat"
win2k8.vm.provision :shell, inline: "rm C:\\startup\\*" # Cleanup startup scripts
end
end
```ruby
# Copy-paste your Vagrantfile here. Remove any sensitive information such as passwords, authentication tokens, or email addresses.
```
Contributor guide
Research direction
Start with the supplied Vagrantfile and reproduce `vagrant up` on Windows 11, then inspect the `VBoxManage showvminfo ... --machinereadable` failure. Done means identifying a reproducible Vagrant-side cause and a focused way to verify it, or establishing that the error is external to Vagrant.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ruby
- Domain
- infrastructure, operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 38/100