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
vsphere-iso builder "boot_command" causes "invalid fault" in vSphere #8957
Comments
Hi, thanks for opening this. We'll take a look when we can. |
It may be an issue with your boot_command. Its powering off the VM for some reason after it does the back spaces. Here is the boot_command that I use for ubuntu: "boot_command": [
"<esc><wait>",
"<esc><wait>",
"<enter><wait>",
"/install/vmlinuz<wait>",
" auto<wait>",
" console-setup/ask_detect=false<wait>",
" console-setup/layoutcode=us<wait>",
" console-setup/modelcode=pc105<wait>",
" debconf/frontend=noninteractive<wait>",
" debian-installer=en_US.UTF-8<wait>",
" fb=false<wait>",
" initrd=/install/initrd.gz<wait>",
" kbd-chooser/method=us<wait>",
" keyboard-configuration/layout=USA<wait>",
" keyboard-configuration/variant=USA<wait>",
" netcfg/get_domain=vm<wait>",
" netcfg/get_hostname=vagrant<wait>",
" locale=en_US.UTF-8<wait>",
" grub-installer/bootdev=/dev/sda<wait>",
" noapic<wait>",
" preseed/file=/media/{{user `preseed_path`}}<wait>",
" -- <wait>",
"<enter><wait>"
], |
Hello @rmetschke |
Thanks for the note @KOConchobhair. Does setting "boot_wait" solve this for you, @rmetschke ? |
This isn't a solution for me as going longer than 10 seconds misses the window for stopping the boot sequence. I should add that this is Ubuntu server 18.04.3. |
Here's a knowledge base article I found about that error: https://kb.vmware.com/s/article/1014371. Is it possible that your vm is getting moved somehow after being created, like maybe vmotion is turned on or something? |
This is environment is just the basic vSphere + vCenter package, so no vMotion. |
@amitbhadra saw this repeatedly with the new boot command implementation from @sylviamoss. We may see this occur more frequently with 1.6.1. It also appeared to be intermittent (worked ok after a few tries). It may be that we just need to catch the error and try again. |
I'm having this issue constantly while trying to build machines on vSphere - it also appears that it sometimes just drops parts of my command. |
@EzraBrooks what version of vmware and packer? |
vSphere/ESXi 6.7 and Packer 1.6.0. |
@EzraBrooks can you try using the 1.6.1-Nightly? It changes the way the boot command is entered, but uses the same underlying vsphere APIs. If it still happens, I'm wondering if we can put in some retry logic if it gets an error. |
Appears to work without any invalid faults or any dropping of inputs. Thanks! |
I am running vSphere/ESXi 6.7 and Packer 1.6.2 and I run into the same issue. ==> vsphere-iso: files/CentOS-7-x86_64-Minimal-1908.iso?checksum=sha256%3A9a2c47d97b9975452f7d582264e9fc16d108ed8252ac6816239a3b58cef5c53d => /opt/fs/buildovf/files/CentOS-7-x86_64-Minimal-1908.iso ==> Wait completed after 45 seconds 948 milliseconds ==> Some builds didn't complete successfully and had errors: ==> Builds finished but no artifacts were created. I added a boot_wait of 20s but same issue. |
I have the same issue Packer 1.6.2 vSphere 6.5
Error running boot command: error typing a boot command (code, down) 41, false: ServerFaultCode: Cannot complete the operation due to an incorrect request to the server. If i choose ESXi 6.0 build 13635687 cluster - this error appears. |
@uutest74 ESXI 6.0 doesn't support the keyboard API. |
Sometimes, I get this error when Packer is typing in the boot_command: ==> Some builds didn't complete successfully and had errors: The error sometimes happens when Packer is typing in the boot_command. Usually, there are already some characters typed in successfully, i.e. the issue here is not a permission to input key presses. The VM remains running after the failure. Packer: 1.6.5 |
As I just posted on the corresponding open issue on the jetbrains repo, I'm seeing this intermittently (5-10% of my CI runs), using a Debian Buster packer host, running Packer v1.6.5 on Jenkins v2.249.2, interfacing with vSphere v6.7.0.44000, and a Debian Buster guests, with default settings in packer template for key and keygroup intervals, and the below boot_command. Incidentally, my Jenkins/Packer host is also running in the same vSphere cluster (with nested virtualization on, obviously), but from reading the other reports, this doesn't seem to be relevant. Are people having any success with setting longer key intervals? I'm loathe to do that bc the "typing boot command..." stage already takes a seemingly long time. I tend to think that my environment should have one of the lowest latency possible between the packer processes and the vSphere guest process, since it's all going through the internal networking of our vSphere data center (>=30Gbps).
(BTW, I've played with several things to try to get the install console to be larger than the default, the above vga=884 being the most recent. Anyone know how to get that working for an env like mine?) EDIT: I have changed my |
@timblaktu try to see if this build works: https://app.circleci.com/pipelines/github/hashicorp/packer/8924/workflows/ef5fd9b6-c559-4165-a61a-ac257d675a80/jobs/105663/artifacts It will attempt to retry sending the keystroke after it gets an error |
THanks @jhawk28. Perhaps someone who is experiencing this frequently can test this build, e.g. @rmetschke? This issue is not consistently repeatable for me. Perhaps, however, I could force it to happen by changing the key interval or keygroup interval? If you can provide some guidance on how to configure these settings I am willing to experiment. The vsphere-iso docs show that there is a builder parameter for |
the
Side note: the jetbrains repo is basically dead. Packer core is the maintainer of the plugin now. |
@jhawk28 I trust you, but why then do the docs say that the Sounds like you're saying |
@timblaktu I'm just reading the code. The
|
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. |
Overview of the Issue
Almost every time I try to build a new vSphere VM using the Ubuntu Server installer, it fails shortly after inputting the boot command. This is similar to what is described in jetbrains-infra/packer-builder-vsphere#63. The error probably a little different due to running vCenter 6.7u3 and vSphere 6.7u3. Packer version is 1.5.4. Here is the Packer build output.
Simplified Packer Buildfile
Log Fragments and crash.log files
https://gist.github.com/rmetschke/55bef5ef4b2002238ec32b290318b3ca
The text was updated successfully, but these errors were encountered: