-
Notifications
You must be signed in to change notification settings - Fork 454
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
VM changes after 1.17.0 fail with error due to hardware version #1049
Comments
It looks like this causes it to always include the tag: And I think it may only need it if the hardware version is changing? Or is it that it isn't detecting the current hardware version correctly and is therefore trying to upgrade - the actual error message being displayed is from the UpgradeVM_TaskBody call, which isn't needed as there is no hardware upgrade needed. |
Also, I noticed the docs are slightly wrong for hardware_version - the docs have it part of the clone option (indentation issue) |
Looking at the state file it does have the hardware_version listed as 9: {
"module": "module.metrics",
"mode": "managed",
"type": "vsphere_virtual_machine",
"name": "virtual_machine",
"each": "list",
"provider": "provider.vsphere",
"instances": [
{
"index_key": 0,
"schema_version": 3,
"attributes": {
"alternate_guest_name": "",
"annotation": "Managed via Terraform",
"boot_delay": 0,
...
"hardware_version": 9, |
I'm not sure why it is trying to upgrade the hardware version. The web client confirms the existing version is 9. The UpgradeVM_TaskBody call is trying to upgrade to vmx-9 though. I'm trying to follow the code, but I don't get why the if statement here isn't matching https://github.com/terraform-providers/terraform-provider-vsphere/pull/1020/files#diff-f8ef493fad928634f3515e7a57e998a5R900-R902 |
Hi @stuart-c! That is interesting that including the hardware version is causing your config to fail. Even though it is sending the hardware version each time, it shouldn't cause any changes unless the version being sent is different than the one in the config. Would it be possible to get the full debug output so I can get a better idea of what is going on through the process? |
This is the error response from the ReconfigVM_Task that includes the Version: <?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body>
<WaitForUpdatesExResponse xmlns="urn:vim25">
<returnval>
<version>1</version>
<filterSet>
<filter type="PropertyFilter">session[52816cb2-c195-547e-8815-2aabf1c555bc]52cab62a-400b-d759-6397-296fd9348fb7</filter>
<objectSet>
<kind>enter</kind>
<obj type="Task">task-708969</obj>
<changeSet>
<name>info</name>
<op>assign</op>
<val xsi:type="TaskInfo">
<key>task-708969</key>
<task type="Task">task-708969</task>
<name>ReconfigVM_Task</name>
<descriptionId>VirtualMachine.reconfigure</descriptionId>
<entity type="VirtualMachine">vm-88664</entity>
<entityName>xxxx</entityName>
<state>error</state>
<cancelled>false</cancelled>
<cancelable>false</cancelable>
<error>
<fault xsi:type="InvalidArgument"></fault>
<localizedMessage>A specified parameter was not correct: </localizedMessage>
</error>
<reason xsi:type="TaskReasonUser">
<userName>xxxx</userName>
</reason>
<queueTime>2020-04-20T17:10:41.552525Z</queueTime>
<startTime>2020-04-20T17:10:41.561071Z</startTime>
<completeTime>2020-04-20T17:10:41.566017Z</completeTime>
<eventChainId>12508460</eventChainId>
</val>
</changeSet>
</objectSet>
</filterSet>
</returnval>
</WaitForUpdatesExResponse>
</soapenv:Body>
</soapenv:Envelope> (no error without that extra tag) |
And these are the commands it executes (failure situation):
I've no idea why it is sending UpgradeVM_TaskBody as it is already v9 (in Terraform state & vSphere UI) and that's what it is being upgraded to. |
@bill-rich is there anything in particular you'd like to look at? Comparing the between 1.17.0 & 1.17.1 the only difference is the addition of the |
This should be fixed in #1055. Please let me know if you're still running into the issue with the latest version of the provider. |
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 feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 [email protected]. Thanks! |
Community Note
Terraform Version
Terraform v0.12.24
vSphere Provider Version
provider.vsphere 1.17.0 - wprks
provider.vsphere 1.17.1 (and later) - does not work
Affected Resource(s)
vsphere_virtual_machine
Terraform Configuration Files
Debug Output
Panic Output
Expected Behavior
Actual Behavior
Error: The operation is not supported on the object.
Within vSphere the errors were:
Steps to Reproduce
Looking at the debug logs the call which fails (ReconfigVM_Task) the only difference between the two versions is the vmx-9 tag is sent for 1.17.1 and later, which causes it to fail.
Important Factoids
vSphere Client version 6.7.0.42000
References
The text was updated successfully, but these errors were encountered: