"vagrant up" switching which virtual machine provider it references.

31 views
Skip to first unread message

Bryant Austin

unread,
Jan 17, 2019, 10:37:57 AM1/17/19
to Vagrant
I am using Windows 10 Pro (10.0.17134 Build 17134) with Vagrant 2.2.3 but it also happened with 2.2.0.  When I activate Hyperv and run "vagrant up", it references Virtualbox functionality and files.  When I deactivate Hyperv and run, it references Hyperv files.  I have included my Vagrantfiles and part of the responses.
Has anyone ever seen anything like this or have a solution?  I can provide the complete debug vagrant.log if it would help anyone.

Using Hyperv:
 INFO interface: error: Failed to mount folders in Linux guest. This is usually because
the "vboxsf" file system is not available. Please verify that
the guest additions are properly installed in the guest and
can work properly. The command attempted was:
mount -t cifs -o vers=2.0,credentials=/etc/smb_creds_vgt-00e0674e3c8395f8084a373cd2991baa-c7d00abd240ac993d59654f7552a22f2,uid=1000,gid=1000,username=bryan,password=***** 

Vagrantfile:
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
  config.vm.define "padawan", primary: true do |machine|
    machine.vm.box = "centos/7"
    machine.vm.box_version = "1811.02"
    machine.vm.hostname = "padawan"
    machine.vm.provider "hyperv" do |hp, override|
      hp.vmname = "padawan"
      hp.memory = "8192"
      hp.cpus = "2"
      override.vm.synced_folder ".", "/u01/padawan", type:"smb", mount_options: ["username=bryan","password=******"] 
    end
  end
  config.vm.network "forwarded_port", guest: 80, host: 3000, host_ip: "127.0.0.1"
  config.vm.network "private_network", ip: "*.*.*.*"
end

Using Virtualbox and with Hyperv disabled:
Get-Item : Cannot find path 'C:\WINDOWS\System32\vmms.exe' because it does not exist.
At D:\HashiCorp\Vagrant\embedded\gems\2.2.3\gems\vagrant-2.2.3\plugins\providers\hyperv\scripts\get_vm_status.ps1:21 char:28
+ $HyperVVersion = [version](Get-Item $VmmsPath).VersionInfo.ProductVer ...

Vagrantfile:
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
  config.vm.define "padawan", primary: true do |machine|
    machine.vm.box = "centos/7"
    machine.vm.box_version = "1811.02"
    machine.vm.hostname = "padawan"
    machine.vm.provider "virtualbox" do |vb, override|
      vb.name = "padawan"
      vb.vmname = "padawan"
      vb.memory = "8192"
      vb.cpus = "2"
      override.vm.synced_folder ".", "/u01/padawan", type:"smb", mount_options: ["username=bryan","password=*******"] 
    end
  end
  config.vm.network "forwarded_port", guest: 80, host: 3000, host_ip: "127.0.0.1"
  config.vm.network "private_network", ip: "*.*.*.*"
end

Bryant Austin

unread,
Jan 18, 2019, 11:01:25 AM1/18/19
to Vagrant
Turns out that there is a .vagrant directory in the project directory (in this case the padawan directory).  Deleting this .vagrant directory helps this issue.
Reply all
Reply to author
Forward
0 new messages