-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
Vagrant up with Hyper-V fails on -switchname for import_vm_vmcx.ps1 script #9774
Comments
Same Problem here. This was broken in commit e47e1df. The Parameter was renamed in import_vm_vmcx.ps1, but not in import.rb (line 143) where the script is called. Changing it there restores functionality for me but might break something else - I don't know as I didn't dig in too far. |
The switchid is a uuid, which is returned by e.g. Though, after applying the change from commit 2730fe7, I was able to get rid of the switch error with adding the default switch like this to my Vagrantfile: |
So it was introduced in 2.1.0 and it should work in previous release? |
Yes, seems to be working after this:
|
After upgrading to 2.1.1 I'm getting an error on |
Same here. I just installed vagrant to a custom folder (d:\tools\vagrant) and after doing an up i get this D:\tools\Vagrant\embedded\gems\2.1.1\gems\vagrant-2.1.1\plugins\providers\hyperv\scripts\import_vm_xml.ps1 : A parameter cannot be found that matches That file has no mention what so ever of 'switchid' so some weird stuff is happening. Also, as a heavy powershell user it blows my mind you'd use combine to add in functions. There is a Import-Module cmdlet or dot sourcing to help with this, whats done here is down right blasphemy lol |
It doesn't work in freshly installed 2.1.1 ( Win Pro 10). I had to downgrade to 2.0.4 where everything works with hyperv.
|
Ditto, still seems to be an issue. Fresh install of 2.1.1 on a Win2k12 machine and I have the same error. This is my first time trying to use Vagrant so I thought I may be doing something wrong but it looks like I'm not alone. I can see in PowerShell logs it's trying to execute this... (Note: I have replaced my user with XXX) So it looks like import_vm_xml.ps1 does not want the "switchid" parameter and that's what is causing the error. If I edit import_vm_xml.ps1 and just add a dummy parameter... Core problem though is that the hyperv import.rb uses... |
Please go back to using Switch Name and not SwitchID --- SwitchID is a bad smell in my opinion, the SwitchID can change when windows is updated, for example between v1607 and v1709 and again when v1803 WIndows removed and re-added virtual switches with different IDs but the same name. See also #9818 with other people having this same problem. |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further. |
Vagrant version
2.1.0
Host operating system
Widnows 10 Pro
Guest operating system
Ubuntu 16.04
Vagrantfile
Debug output
https://gist.github.com/MJLHThomassen/58600432c1e8427bf023cda68c2da9a5
Expected behavior
The VM should start
Actual behavior
The powershell script import_vm_vmcx.ps1 was passed a
-switchname
parameter while it only accepts a-switchid
parameter when choosing the network switch.Steps to reproduce
vagrant up
and press enterThe text was updated successfully, but these errors were encountered: