Skip to content
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

Address PolicyIDByVirtualMachine and PolicyIDByVirtualDisk errors when deploying VM on ESXi. #1408

Merged
merged 1 commit into from
Dec 6, 2021

Conversation

sumitmaggo
Copy link
Contributor

@sumitmaggo sumitmaggo commented May 15, 2021

Description

This PR will address #1033 issue for ESXi as storage policy related APIs are supported only for vCenter.
This will also address the following error for ESXi related to storage policy for virtual disks:
Error: disk.0: this operation is only supported on vCenter: RESOURCE (1625), ACTION (PolicyIDByVirtualDisk)

This is tested with Terraform 0.13.3 version.

$ terraform plan
Refreshing Terraform state in-memory prior to plan...
The refreshed state will be used to calculate this plan, but will not be
persisted to local or remote state storage.

local_file.meta-data[0]: Refreshing state... [id=531754ffcbea5c01e45fcf0cc40be37aeaa34rte]
...

An execution plan has been generated and is shown below.
Resource actions are indicated with the following symbols:
~ update in-place

Terraform will perform the following actions:

vsphere_virtual_machine.example-vm[0] will be updated in-place
~ resource "vsphere_virtual_machine" "example-vm" {
boot_delay = 0
boot_retry_delay = 10000
boot_retry_enabled = false
change_version = "2021-05-15T07:40:57.251199Z"
cpu_hot_add_enabled = false
cpu_hot_remove_enabled = false
cpu_limit = -1
cpu_performance_counters_enabled = false
cpu_reservation = 0
cpu_share_count = 1000
cpu_share_level = "normal"
datastore_id = "5bd0b7d5-02d4a3bb-154a-ac162d77f63c"
efi_secure_boot_enabled = false
enable_disk_uuid = false
enable_logging = false
ept_rvi_mode = "automatic"
extra_config = {}
firmware = "bios"
force_power_off = true
guest_id = "centos8_64Guest"
guest_ip_addresses = []
hardware_version = 14
host_system_id = "ha-host"
hv_mode = "hvAuto"
id = "574d7840-19a1-45df-543b-4cd145eda7as"
ide_controller_count = 2
latency_sensitivity = "normal"
memory = 1024
memory_hot_add_enabled = false
memory_limit = -1
memory_reservation = 0
memory_share_count = 10240
memory_share_level = "normal"
migrate_wait_timeout = 30
moid = "1635"
name = "example-vm"
nested_hv_enabled = false
num_cores_per_socket = 1
num_cpus = 1
pci_device_id = []
poweron_timeout = 300
reboot_required = false
resource_pool_id = "ha-root-pool"
run_tools_scripts_after_power_on = true
run_tools_scripts_after_resume = true
run_tools_scripts_before_guest_reboot = false
run_tools_scripts_before_guest_shutdown = true
run_tools_scripts_before_guest_standby = true
sata_controller_count = 0
scsi_bus_sharing = "noSharing"
scsi_controller_count = 1
scsi_type = "pvscsi"
shutdown_wait_timeout = 3
swap_placement_policy = "inherit"
sync_time_with_host = false
uuid = "574d7840-19a1-45df-543b-4cd145eda7as"
vapp_transport = []
vmware_tools_status = "guestToolsNotRunning"
vmx_path = "example-vm/example-vm.vmx"
wait_for_guest_ip_timeout = 0
wait_for_guest_net_routable = true
wait_for_guest_net_timeout = 0
....

Acceptance tests

  • Have you added an acceptance test for the functionality being added?
  • Have you run the acceptance tests on this branch?

Output from acceptance testing:

$ make testacc TESTARGS='-run=TestAccXXX'

...

Release Note

Release note for CHANGELOG:

Fix for these two issues:
Error: this operation is only supported on vCenter: RESOURCE (52), ACTION (PolicyIDByVirtualMachine)
Error: disk.0: this operation is only supported on vCenter: RESOURCE (1625), ACTION (PolicyIDByVirtualDisk)
...

References

#1033

@sumitmaggo
Copy link
Contributor Author

@bill-rich @koikonom @aareet @sumitAgrawal007 Can you guys please look into this PR and provide your comments? Thanks in advance.

@sumitmaggo
Copy link
Contributor Author

@bill-rich @koikonom Can you please review and merge this PR as it has been approved by mumi?

@sumitmaggo
Copy link
Contributor Author

@bill-rich @koikonom @aareet @sumitAgrawal007 Can anyone please review this PR? Its been pending for too long and we are blocked because of it and not able to pick the latest vsphere provider version for ESXi.

@sumitmaggo
Copy link
Contributor Author

@bill-rich @koikonom Can you please help getting this PR reviewed and merged? We need to move to the latest version of vsphere provider and this issue is blocking that.

@caseypas
Copy link

Can someone please let us know when this PR will be merged?

@sumitmaggo
Copy link
Contributor Author

@bill-rich @koikonom Can you please help merge this PR? I see some requests to get this merged as its needed to get to the latest version of vsphere provider. Thanks in advance.

@redeux
Copy link
Contributor

redeux commented Jul 14, 2021

@sumitmaggo Thank you for your contribution to the vSphere provider. I've tagged this as a candidate for our next release. Please ensure that the all requirements such as test coverage and documentation are met in advance. We will start planning for the next release soon, but will be unable to evaluate your PR until all requirements are met.

@sumitmaggo
Copy link
Contributor Author

@redeux I have updated the Release Note content. Can you please check and let me know if anything is missing from my side to be updated? Thanks in advance.

@ChamMach
Copy link

ChamMach commented Nov 8, 2021

Hello, anything news on this PR ?

@tenthirtyam
Copy link
Collaborator

@ChamMach - The PR is already labeled by @redeux for the next-release-candidate. Now dependent on the next RC or GA.

Ryan

@ChamMach
Copy link

ChamMach commented Nov 8, 2021

Thanks @tenthirtyam, but yes in fact I was wondering if the date of the next RC it's more this year or in 2022 🤔

@tenthirtyam
Copy link
Collaborator

I can't speak to timescales. That's up to the PMs and maintainers.

Ryan

@appilon appilon self-assigned this Dec 2, 2021
@appilon appilon force-pushed the bugfix/deploy_on_esxi branch from 4212732 to b0d0460 Compare December 2, 2021 23:33
@appilon
Copy link
Contributor

appilon commented Dec 2, 2021

I took the liberty of rebasing and am looking at this now

@appilon
Copy link
Contributor

appilon commented Dec 6, 2021

Since this PR appears to be small/safe change, I will merge it. However, we cannot offer explicit support for vsphere without vcenter, it's not an environment we use during testing.

@github-actions
Copy link

github-actions bot commented Jan 6, 2022

I'm going to lock this pull request 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 related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 6, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
size/s Relative Sizing: Small
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants