-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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: error creating vm: Invalid configuration for device '2'. #10430
Comments
Yes also got this issue when i try to add a second disk to a 2019 server config with type lsilogic-sas i suspect vmware needs to know the disk target 0:0 and 0:1 for the second disk but i'm just guessing |
tested again and in the hostd.log: the config spec : deviceChange = (vim.vm.device.VirtualDeviceSpec) [ (vim.vm.ConfigSpec) { |
Is there any update on this issue? Am also getting the same error.
|
You can work around this issue for now:
A happy side-effect to doing it this way, is that you increase multipath loadbalancing for most storagefabrics ;) |
@djpbessems - I get that, but I'd still like to combine drives to controllers. I was planning on building a VM Template with multiple drives for MS SQL but it might have to be a day 2 operation or a VSphere API call. |
For what it's worth, I think this is a regression. In a previous version of packer I could use 2 disks on one controller just fine, so you could try downgrading packer. |
I confirmed getting a successful build with the following config on version 1.6.5
looking at the diff between 1.6.5 and 1.6.6 the files that seem suspect in the vsphere setup are:
If I knew golang a bit more I would try and take a hack at fixing it. |
I confirmed as well that I am able to work with 1.6.5! Thanks for that pointer. Another thing I did notice with 1.6.6 in regards to Windows 2019 installations. If I did setup more than one drive and each drive had its own controllers. The Windows installation would randomly pick a drive instead of using the first one. I only had Disk 0 exposed in unattended.xml. Since I have reverted to 1.6.5, this issue has gone away as well but I am only using one controller now. |
I confirm this behavior with both 1.6.6 and 1.7. The way the docs is suggesting to handle multiple disks is not working:
Throws |
Hey @Arderos, could you try out these binaries and let me know if it fixes the error, please? |
Confirmed working in 1.7.1 |
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
When trying to deploy more than one drive on the same controller with vsphere-iso, I get "vsphere-iso: error creating vm: Invalid configuration for device '2'."
The only way around this is declaring a new disk_controller_type for each hard drive. What I found out with this resolution is if I try to make a hard drive share the controller, the device 'x', increments by 1. Something seems off with how controllers are deployed. Is it even possible to have one controller but multiple disks with paravirtual?
Reproduction Steps
Declare "disk_controller_type": ["pvscsi"]
Then call for two hard drives under storage. They should be default use Index 0 if I read it correctly.
"storage": [
{
"disk_size": 102400,
"disk_thin_provisioned": true
},
{
"disk_size": 10240,
"disk_thin_provisioned": true
}
],
Steps to reproduce this issue
Packer version
From
1.6.6
Simplified Packer Buildfile
https://pastebin.ubuntu.com/p/sfWdcmVMKT/
Operating system and Environment details
Windows 10 Enterprise
Log Fragments and crash.log files
What I see is in VCenter is the same error
"Invalid configuration for device '2'."
The text was updated successfully, but these errors were encountered: