-
Notifications
You must be signed in to change notification settings - Fork 95
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
error removing cdrom prior to reattaching: invalid number: n must be between 0 and 0 #393
Comments
@Hi-Angel to triage. |
Oh, I see, thank you. I'll have to dig into it, so I'll probably take a look into it tomorrow or on Friday at worst. |
Took a quick look into it. It's a funny bug: the reason the problem happens is because in Possible solutions I see:
|
Okay, got a fix locally by adding a function enlisting cdrom devices, which is the best way to handle that I think. But it doesn't quite work + I guess I need to add tests for that case as well, so it will take some more time. |
There's special case when option `remove_cdrom` is set that there would be zero cdrom devices by the time reattach_cdroms processing is executed, so the comparison to ISOPaths len is wrong. Instead use the amount of cdroms we have at that point. Fixes: hashicorp#393
There's special case when option `remove_cdrom` is set that there would be zero cdrom devices by the time reattach_cdroms processing is executed, so the comparison to ISOPaths len is wrong. Instead use the amount of cdroms we have at that point. Fixes: hashicorp#393
There's special case when option `remove_cdrom` is set that there would be zero cdrom devices by the time reattach_cdroms processing is executed, so the comparison to ISOPaths len is wrong. Instead use the amount of cdroms we have at that point. Fixes: hashicorp#393
There's special case when option `remove_cdrom` is set that there would be zero cdrom devices by the time `reattach_cdroms` processing is executed, so the comparison to ISOPaths len is wrong. Instead use the amount of cdroms we have at that point. Fixes: hashicorp#393
@StephenSo thank you for finding the bug! Its fix is being reviewed at #394 That said, I just wanted to mention that you can make it work without waiting for the fix to get merged by removing the |
Thanks for the update.
During the build there's 2 cdroms in use (1 for the OS and the other for VM tools), where only 1 is required in the VM template.
In the docs, maybe I misunderstood the process. Remove cdroms and then keep
only 1 for final config. So the correct process is to not remove cdroms and
just use reattach_cdroms?
It is confusing.
Perhaps the variable should simply be
retain_cdroms = # (to specify how many to be left in the template)
?
…On Fri, 22 Mar 2024, 12:27 Konstantin K, ***@***.***> wrote:
@StephenSo <https://github.com/StephenSo> thank you for finding the bug!
Its fix is being reviewed at #394
<#394>
That said, I just wanted to mention that you can make it work without
waiting for the fix to get merged by removing the remove_cdrom line from
the config. I don't see the point of removing the cdroms if you want them
immediately to be readded. Reattached cdroms should have no flies attached
to them in case that's what you were afraid of. As it stands, the option is
just excess code for you to read and for your server to execute 😊
—
Reply to this email directly, view it on GitHub
<#393 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABIKYKZPJUN2HH35CWFAYZTYZQPUFAVCNFSM6AAAAABE7GC42SVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMJUHE3TEMBSGI>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Well, I do not seem to see at all
So the interaction with
I think |
Thanks @Hi-Angel, I will remove the use of |
Overview of the Issue
Packer build for a given Windows server build no longer works. I believe the 1.2.5 refactoring release created this issue, it only became apparent once #386 was corrected. Now the build finishes, with the error
Version 1.2.4 and older:
D: = Windows Install media ISO
E: = VMware Tools ISO
Version 1.2.6:
D: = VMware Tools ISO
E: = Windows Install media ISO
Reproduction Steps
Works as per previous version: KO Packer build where
Change to 1.2.6 - Build will timeout waiting for VMTools to install
Packer Version
1.8.3
Plugin Version and Builders
Please provide the plugin version.
1.2.6
Please select the builder.
vsphere-iso
VMware vSphere Version
Please provide the VMware vSphere version.
vCenter Server 7.0 Update 3o
VMware ESXi 7.0 Update 3g
Guest Operating System
Windows 2022 & 2019
Simplified Packer Buildfile
Set the env var
PACKER_LOG=1
for maximum log detail.The text was updated successfully, but these errors were encountered: