-
Notifications
You must be signed in to change notification settings - Fork 93
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
Issues with hyperv-ubuntu-16.04.json #2
Comments
@evancox10 remove headless and rename ram_size_mb to ram_size. My bad, I have updated this due to feedback from Packer team. I have not applied this change to the base box scripts yet. |
Thanks, will give it a shot |
Alright, that got me past that. Ran into a few more issues:
Not sure where the ParseUint is coming from, kind of strange. However, after rerunning the command in debug mode, this error did not show up. It also didn't show up upon running the command again in regular mode.
Still stuck there right now after some time. I've read reports of this clearing up on its own eventually. so we'll see where it's at tomorrow. Update: Just saw that it errored out with "!!! Download debconf preconfiguration file: The file needed for preconfiguration could not be retreieved from http://192.168.1.172:8874/preseed.cfg. The installation will proceed in non-automated mode." However, checking in Chrome, curl, etc., I can see that this file is reachable via HTTP. I'm not sure if these are issues with the packer baseboxes in this repo, or the packer-hyperv .exe itself. Would love to see this get included into the main packer branch, so just want to help squash bugs =) If you think I should raise these issues in your other repo, or in the PR to the master packer, let me know. Thanks, |
UPDATE: Figured it out, Windows Firewall had inbound access to packer.exe blocked. Changed this to allow and it starts to proceed. Issue 2 from my post above is still a problem. After rebooting computer today, the parse UInt error happened on the first run of packer build. Subsequent runs did not encounter the error. Have not rechecked issue 1 today, presumably still slow but maybe not. Some more info on the inability to access the preseed.cfg file from within the VM:
IMO, all of the above, and especially #2, point to a problem in Hyper-V and the networking it is providing to guests. Is it trying to filter out HTTP over non-standard ports? (I do not have the vswitch's filtering driver even enabled.) Some other issue? Maybe someone at @microsoft can help? |
@evancox10 for the firewall I think it was the same issue as #1 I am not sure what to do in this regard, other then possible adding some documentation. Any suggestions? |
@evancox10 for the slow ISO download speed. The download portion of the code is shared between all builders. So either we have an issue with GO downloading on Windows or the Packer implementation of downloading. More then likely there is something on your host limiting the Packer.exe download speeds. I don't notice the issue, as I have Teamcity agents using xcopy from a network share before running a build. I then reference the iso path locally, by overriding environment variable "IsoFileName" |
Re. firewall issues. Hard to go wrong with documentation for commonly encountered issues! Kind of funny that I ran into the same problem as the only other filed bug to the project. Should have checked that... my fault there. Re. download speeds, must have been a server side issue, I just tried again and averaged around 100 Mbps with peaks to 200 Mbps. Some transient issue with Ubuntu release servers I suppose. Also, any comments re. the strange "parse UInt error on initial run bug"? Let me know if there's any way I can get more debug information to try to pin down where this is coming from. Lastly, I let a full run continue last night and I don't think it completed successfully. It said it finished, but didn't produce any artifacts. The full (really long) log is below.
|
And after that, I've proceeded to get the strange EOF errors below. Could this have something to do with line-ending differences? I noticed that the Ubuntu .json files in your repo all use LF (Unix) endings, while the rest of the files use CR-LF. Should this match the host OS or the guest OS?? Does this even matter??? (It shouldn't IMHO).
|
Hey, any ideas on the failed shutdown cmd issue? I tried your new 145 build and got the same result. Also, once it errors out, should I expect it to clean up all the VMs/whatever packer created so that it starts from a clean slate? i.e. Is box creation supposed atomic, in that it either succeeds completely or leaves no trace that it happened? If so, it appears not to be cleaning up everything correctly, as the xenial-ubuntu VM is still present and running. I would expect this not to be the case, since you can see in this in the packer output: Edit: Accidentally hit "Close and comment" instead of just "comment" Edit 2: Shutdown failure possibly related to hashicorp/packer#4134 ? |
I'm hitting the same issue here too. I fetched the latest code today, built it, and have been debugging things. I think it's possible that sysprep could cause a firewall rule reset on Windows, but I really think the bigger problem is the Wait() statement is waiting on a successful result when the connection is about to fail. That would happen with both winrm and ssh. |
Here's my logs for reference. |
From looking at the gist, I think it may be due to improvements in the ssh communicator. When we are emptying the hdd we write 0 to file system till there is no space left. I think previously the error didn't bubble up. I will try to spin up an instance with the latest Packer and I will make sure error is swallowed when writing 0s |
I removed |
Also happens in my fork of boxcutter/Ubuntu I agree that it's probably due to changes in the ssh communicator. Windows doesn't use it and I have built several images correctly with clean shutdown through the winrm communicator. |
This looks like it could be the problem. I applied the fix from hashicorp/packer#4054 to hyperv-iso in my repo PatrickLang/packer@098abe9 Testing in progress. Got two different Ubuntu 16.04 builds going - generation 1 from boxcutter, generation 2 from your packer-baseboxes repo |
It worked - PR submitted |
Thanks for the help with this Patrick! Link to updated PR: |
Closing issue as it was resolved in #11 |
Looks like this is also occuring for me. It creates a internal network switch and in powershell you see the host ip show up. However the ubuntu machine does seem to be able to resolve an IP address which basically causes this issue. Is there any kind a network switch which has to be configured and provided as a param? |
@marcofranssen how are you assigning an ip to ubuntu machine. Do the virtual machine and the host have an ip assigned on the internal interfaces? If you are using dhcp, make sure your dhcp server is configured on the internal network. |
Hi, I'm trying to test these with this version of Packer w/ Hyper-V support, but getting the following errors:
Any ideas?
The text was updated successfully, but these errors were encountered: