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

[sr-iov] Issue cloning template with VMXNET3 adapters – change one to SRIOV and add a SRIOV adapter #2092

Closed
4 tasks done
vasilsatanasov opened this issue Dec 14, 2023 · 2 comments Β· Fixed by #2133
Closed
4 tasks done
Assignees
Labels
bug Type: Bug
Milestone

Comments

@vasilsatanasov
Copy link
Contributor

Community Guidelines

  • I have read and agree to the HashiCorp Community Guidelines .
  • Vote on this issue by adding a πŸ‘ reaction to the original issue initial description to help the maintainers prioritize.
  • Do not leave "+1" or other comments that do not add relevant information or questions.
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment.

Terraform

1.4.6

Terraform Provider

v2.6.0

VMware vSphere

8.0.2 Build 22617221

Description

Attempting to use the resource vsphere_virtual_machine to clone an existing VM template with 4x network adaptors, that are all of type vmxnet3. You can see this is the outputs below, but the adaptors on the template vs the provisioned resource should look like this –

VM Template Adapters –
#1 – vmxnet3
#2 – vmxnet3
#3 – vmxnet3
#4 – vmxnet3

Provisioned Resource Adapters
#1 – vmxnet3
#2 – vmxnet3
#3 – vmxnet3
#4 – sriov
#5 - sriov

When doing so, it appears that the check for existing SR-IOV adaptors is getting triggered even when there aren’t existing SR-IOV adaptors.

Affected Resources or Data Sources

resource vsphere_virtual_machine

Terraform Configuration

 resource "vsphere_virtual_machine" "appliance_vms" {
    annotation = (known after apply)
    boot_retry_delay = 10000
    change_version = (known after apply)
    cpu_limit = -1
    cpu_share_count = (known after apply)
    cpu_share_level = "normal"
    datastore_id = "datastore-3107"
    default_ip_address = (known after apply)
    ept_rvi_mode = "automatic"
    extra_config_reboot_required = true
    firmware = "bios"
    folder = "f5"
    force_power_off = true
    guest_id = "other3xLinux64Guest"
    guest_ip_addresses = (known after apply)
    hardware_version = (known after apply)
    host_system_id = "host-3092"
    hv_mode = "hvAuto"
    id = (known after apply)
    ide_controller_count = 2
    imported = (known after apply)
    latency_sensitivity = "normal"
    memory = 16384
    memory_limit = -1
    memory_reservation = 16384
    memory_share_count = (known after apply)
    memory_share_level = "normal"
    migrate_wait_timeout = 30
    moid = (known after apply)
    name = "<omitted>"
    num_cores_per_socket = 1
    num_cpus = 8
    power_state = (known after apply)
    poweron_timeout = 300
    reboot_required = (known after apply)
    resource_pool_id = "resgroup-3089"
    run_tools_scripts_after_power_on = true
    run_tools_scripts_after_resume = true
    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 = "lsilogic"
    shutdown_wait_timeout = 3
    storage_policy_id = (known after apply)
    swap_placement_policy = "inherit"
    tools_upgrade_policy = "manual"
    uuid = (known after apply)
    vapp_transport = ["com.vmware.guestInfo" ]
    vmware_tools_status = (known after apply)
    vmx_path = (known after apply)
    wait_for_guest_ip_timeout = 0
    wait_for_guest_net_routable = true
    wait_for_guest_net_timeout = 5
    clone {
        template_uuid = "4229a839-1c13-85bd-a980-ae60d4a1339f"
        timeout = 30
    }
    disk {
        attach = false
        controller_type = "scsi"
        datastore_id = "<computed>"
        device_address = (known after apply)
        disk_mode = "persistent"
        disk_sharing = "sharingNone"
        eagerly_scrub = false
        io_limit = -1
        io_reservation = 0
        io_share_count = 0
        io_share_level = "normal"
        keep_on_remove = false
        key = 0
        label = "disk0"
        path = (known after apply)
        size = 82
        storage_policy_id = (known after apply)
        thin_provisioned = true
        unit_number = 0
        uuid = (known after apply)
        write_through = false
    }
    network_interface {
        adapter_type = "vmxnet3"
        bandwidth_limit = -1
        bandwidth_reservation = 0
        bandwidth_share_count = (known after apply)
        bandwidth_share_level = "normal"
        device_address = (known after apply)
        key = (known after apply)
        mac_address = (known after apply)
        network_id = "dvportgroup-3332"
    }
    network_interface {
        adapter_type = "vmxnet3"
        bandwidth_limit = -1
        bandwidth_reservation = 0
        bandwidth_share_count = (known after apply)
        bandwidth_share_level = "normal"
        device_address = (known after apply)
        key = (known after apply)
        mac_address = (known after apply)
        network_id = "network-5149"
    }
    network_interface {
        adapter_type = "vmxnet3"
        bandwidth_limit = -1
        bandwidth_reservation = 0
        bandwidth_share_count = (known after apply)
        bandwidth_share_level = "normal"
        device_address = (known after apply)
        key = (known after apply)
        mac_address = (known after apply)
        network_id = "network-5150"
    }
    network_interface {
        adapter_type = "sriov"
        bandwidth_limit = -1
        bandwidth_reservation = 0
        bandwidth_share_count = (known after apply)
        bandwidth_share_level = "normal"
        device_address = (known after apply)
        key = (known after apply)
        mac_address = (known after apply)
        network_id = "dvportgroup-5152"
        physical_function = "0000:b1:00.0"
    }
    network_interface {
        adapter_type = "sriov"
        bandwidth_limit = -1
        bandwidth_reservation = 0
        bandwidth_share_count = (known after apply)
        bandwidth_share_level = "normal"
        device_address = (known after apply)
        key = (known after apply)
        mac_address = (known after apply)
        network_id = "dvportgroup-6007"
        physical_function = "0000:b1:00.0"
    }
    vapp {
        properties = {
            "net.mgmt.addr" = "<omitted>"
            "net.mgmt.gw" = "<omitted>"
            "user.admin.pwd" = (sensitive value)
            "user.root.pwd" = (sensitive value)
        }
    }
}
Plan: 7 to add, 0 to change, 3 to destroy.

Debug Output

N/A

Panic Output

No response

Expected Behavior

Network adapter #4 should be replaced by the new sr-iov network adapter , sr-iov network adapter #5 should be added as new dapter

Actual Behavior

Error: error reconfiguring virtual machine: error processing network device changes post-clone: network_interface.3: changing the network_interface list such that there is a change in adapter_type to or from sriov for a particular index of network_interface is not supported.
Index 3, old adapter_type vmxnet3, new adapter_type sriov
Delete all the sriov network interfaces, apply, and then re-add network interfaces and reapply instead.

with module.f5_pci_t2_vm_instances.vsphere_virtual_machine.appliance_vms[1],
on .terraform/modules/f5_pci_t2_vm_instances/main.tf line 49, in resource "vsphere_virtual_machine" "appliance_vms":
49: resource "vsphere_virtual_machine" "appliance_vms" {

Steps to Reproduce

Deploy template with 4 vxnet3 network adapters. On clone replace vmxnet3 adapter 4 with sr-iov network adapter and add one more sr-iov adapter

Environment Details

No response

Screenshots

No response

References

No response

Copy link

github-actions bot commented Mar 6, 2024

This functionality has been released in v2.7.0 of the Terraform Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you!

@iBrandyJackson iBrandyJackson removed the needs-triage Status: Issue Needs Triage label Mar 6, 2024
Copy link

github-actions bot commented Apr 6, 2024

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 6, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Type: Bug
Projects
None yet
4 participants