>vagrant up --provider=hyperv
The provider 'hyperv' that was requested to back the machine
'default' is reporting that it isn't usable on this system. The
reason is shown below:
The Hyper-V provider requires that Vagrant be run with
administrative privileges. This is a limitation of Hyper-V itself.
Hyper-V requires administrative privileges for management
commands. Please restart your console with administrative
privileges and try again.
Expected behavior
Vagrant should start as command prompt started with admin rights.
Actual behavior
Still asking to run Vagrant with admin privileges.
Reproduction information
Vagrant version
>vagrant version
Installed Version: 2.3.6
Latest Version: 2.3.6
You're running an up-to-date version of Vagrant!
Host operating system
Microsoft Windows 11 Enterprise
Guest operating system
CentOS/7
Steps to reproduce
Start command prompt\power shell with admin rights
Give command vagrant up --provider=hyperv
Vagrantfile
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
config.vm.box = "centos/7"
config.vm.provider "hyperv" do |h, override|
unless File.exist?(".vagrant/machines/default/hyperv/action_provision")
override.vm.provision "shell", inline: <<-SHELL
yum install -y cifs-utils </dev/null
ip link set mtu 1400 dev eth0
echo "MTU=1400" >> /etc/sysconfig/network-scripts/ifcfg-eth0
SHELL
override.vm.post_up_message = "VM is initialized but not ready. Please run `vagrant reload` to finalize."
else
override.vm.synced_folder '.', '/vagrant', {
type: 'smb', mount_options: ['vers=3.0'],
}
override.vm.post_up_message = "Your VM is ready for use."
end
end
end
Debug output
Expected behavior
Vagrant should start as command prompt started with admin rights.
Actual behavior
Still asking to run Vagrant with admin privileges.
Reproduction information
Vagrant version
Host operating system
Microsoft Windows 11 Enterprise
Guest operating system
CentOS/7
Steps to reproduce
vagrant up --provider=hyperv
Vagrantfile