Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with "vagrant up" from local box repository for hyperv #13391

Open
Wolvverine opened this issue May 17, 2024 · 0 comments
Open

Problem with "vagrant up" from local box repository for hyperv #13391

Wolvverine opened this issue May 17, 2024 · 0 comments

Comments

@Wolvverine
Copy link

Wolvverine commented May 17, 2024

/Vagrant/embedded/gems/gems/vagrant-2.4.1/plugins/providers/hyperv/action/import.rb:20:in call': undefined method directory' for nil:NilClass (NoMethodError)

Full debug logs:

https://pastebin.com/AG0d01B5

Host operating system

Problem on Windows with local store box with Mint linux.

Reproduction information

Steps to reproduce

vagrant box add --name mintv1 "e:\Hyper-V VMs\Exported\Mint-Vagrant-Box\linuxmint-21.3-cinnamon-64bit.box"

vagrant up testlocal

Vagrantfile

Vagrant.configure("2") do |config|
	
	config.vm.define "test" do |test|
		test.vm.box = "wolvverine/LinuxMintCinnamon"
		test.vm.box_version = "1"
		test.vm.hostname = "Test-Vagrant"
		test.vm.network 'public_network', bridge: 'Internal Switch', type: "dhcp"
		test.vm.network 'private_network', bridge: 'Private Switch', type: "dhcp"
		test.vm.guest = :linux
		test.vm.box_architecture = 'amd64'
		#test.vm.synced_folder '.', '/vagrant', disabled: false, mount_options: ['vers=3.0']
		test.vm.provider 'hyperv' do |h|
			h.vmname = 'Test-Vagrant'
			h.cpus = 2,
			h.enable_virtualization_extensions = false,
			h.enable_enhanced_session_mode = true,
			h.enable_checkpoints = true,
			h.enable_automatic_checkpoints = true,
			h.vm_integration_services = {
				guest_service_interface: true,
				CustomVMSRV: true,
				heartbeat: true
			}
		end
		Vagrant::Config.run do |config|
			#config.vm.synced_folder "/mnt/scripts", "E:\Vagrant_Home\scripts", create: true
			#config.vm.provision :shell, :path => "/mnt/scripts/test.sh"
			config.vm.provision :shell, :path => "./scripts/test.sh"
		end
	end
	
	config.vm.define "testlocal" do |testlocal|
		testlocal.vm.box = "mintv1"
		testlocal.vm.hostname = "Test-Vagrant-local"
		testlocal.vm.network 'public_network', bridge: 'Internal Switch', type: "dhcp"
		testlocal.vm.network 'private_network', bridge: 'Private Switch', type: "dhcp"
		testlocal.vm.guest = :linux
		testlocal.vm.box_architecture = 'amd64'
		#testlocal.vm.synced_folder '.', '/vagrant', disabled: false, mount_options: ['vers=3.0']
		testlocal.vm.provider 'hyperv' do |h|
			h.vmname = 'Test-Vagrant-local'
			h.cpus = 2,
			h.enable_virtualization_extensions = false,
			h.enable_enhanced_session_mode = true,
			h.enable_checkpoints = true,
			h.enable_automatic_checkpoints = true,
			h.vm_integration_services = {
				guest_service_interface: true,
				CustomVMSRV: true,
				heartbeat: true
			}
		end
		Vagrant::Config.run do |config|
			#config.vm.synced_folder "/mnt/scripts", "E:\Vagrant_Home\scripts", create: true
			#config.vm.provision :shell, :path => "/mnt/scripts/test.sh"
			config.vm.provision :shell, :path => "./scripts/test.sh"
		end
	end
	
end
@Wolvverine Wolvverine changed the title /Vagrant/embedded/gems/gems/vagrant-2.4.1/plugins/providers/hyperv/action/import.rb:20:in call': undefined method directory' for nil:NilClass (NoMethodError) Problem with up from local box repository for hyperv May 17, 2024
@Wolvverine Wolvverine changed the title Problem with up from local box repository for hyperv Problem with "vagrant up" from local box repository for hyperv May 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant