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

vsphere-clone: Add support for multiple SCSI controllers #84

Open
ghost opened this issue Jun 28, 2021 · 1 comment
Open

vsphere-clone: Add support for multiple SCSI controllers #84

ghost opened this issue Jun 28, 2021 · 1 comment
Assignees
Labels
Milestone

Comments

@ghost
Copy link

ghost commented Jun 28, 2021

This issue was originally opened by @mayankbatra123 as hashicorp/packer#11091. It was migrated here as a result of the Packer plugin split. The original body of the issue is below.


Overview of the Issue

So vshpere-clone module of packer allows us to add storage configurations for adding multiple disks.
But it also add another scsi controller which is not required in all use cases.
Need an additional option to add multiple disk to default disk_controller rather than creating a new.
disk_controller = "scsi0" //example

Reproduction Steps

Add Storage configuration block to vshpere-clone module

Similar to this -

 disk_controller_type = ["pvscsi"]
  storage {
    disk_size             = var.secondary_storage.disk_size
    disk_thin_provisioned = var.secondary_storage.disk_thin_provisioned
    disk_eagerly_scrub    = var.secondary_storage.disk_eagerly_scrub
    disk_controller_index = var.secondary_storage.disk_controller_index
  }

Packer version

v1.7.2

Simplified Packer Buildfile

source "vsphere-clone" "vm-base" {
  vcenter_server      = "${var.vcenter_server}"
  datacenter          = "${var.vcenter_datacenter}"
  insecure_connection = "${var.vcenter_insecure_connection}"
  username            = "${var.vsphere_username}"
  password            = "${var.vsphere_password}"

  vm_name             = "${local.target_vm_tag}"
  template            = "${local.upstream_vm_tag}"
  folder              = "${var.target_vm_folder}"
  cluster             = "${var.target_vm_cluster}"
  datastore           = "${var.target_vm_datastore}"
  resource_pool       = "${var.target_vm_resource_pool}"
  
  **disk_controller_type = ["pvscsi"]**

  CPUs                = "${var.vm_cpus}"
  RAM                 = "${var.vm_ram_mb}"
  NestedHV            = true
  convert_to_template = "${var.vm_generate_template}"
  create_snapshot     = "${var.vm_create_snapshot}"
  linked_clone        = "${var.vm_linked_clone}"

  ssh_password        = "${var.ssh_password}"
  ssh_username        = "${var.ssh_username}"
  storage {
    disk_size             = var.secondary_storage.disk_size
    disk_thin_provisioned = var.secondary_storage.disk_thin_provisioned
    disk_eagerly_scrub    = var.secondary_storage.disk_eagerly_scrub
    disk_controller_index = var.secondary_storage.disk_controller_index
  }
}

Operating system and Environment details

Ubuntu- 20.4

The above configuration does create an additional disk along with another scsi controller.
If I remove the disk_controller_type from above configuration it throws an error.

It would be great to add an additional parameter to the configuration such as:
disk_controller = "scsi0" // just for example

This will allow the new disk to be mapped to default scsi controller rather than creating a new one.
Current--> 0:0, 1:0 -- Expected --> 0:0,0:1

@ghost ghost added bug builder/vsphere-iso Builder: vsphere-iso labels Jun 28, 2021
hmalphettes pushed a commit to hmalphettes/packer-plugin-vsphere that referenced this issue May 7, 2022
store source image url that was actually used, for recordkeeping
@tenthirtyam tenthirtyam added builder/vsphere-clone Builder: vsphere-clone and removed builder/vsphere-iso Builder: vsphere-iso labels Nov 4, 2022
@tenthirtyam tenthirtyam changed the title Multiple SCSI controller for vsphere-clone vsphere-clone: multiple SCSI controllers Nov 4, 2022
@jlundy2
Copy link

jlundy2 commented Jan 23, 2023

If you're using a pipeline of the following:

  1. Packer build base OS template from ISO
  2. Packer creates a custom template from the base OS template created in step 1
  3. Terraform deploy and customize the custom template created in step 2

You cannot manipulate any disks added in step 2 during deployment in step 3 as the terraform vsphere provider only supports one disk controller.

Hopefully, this context will help get this issue prioritized.

@tenthirtyam tenthirtyam added this to the Backlog milestone Apr 17, 2024
@tenthirtyam tenthirtyam modified the milestones: Backlog, v1.3.1 May 13, 2024
@tenthirtyam tenthirtyam modified the milestones: v1.3.1, Backlog Jun 13, 2024
@tenthirtyam tenthirtyam changed the title vsphere-clone: multiple SCSI controllers vsphere-clone: Add support for multiple SCSI controllers Jun 18, 2024
@tenthirtyam tenthirtyam modified the milestones: Backlog, v1.4.0 Jul 10, 2024
@tenthirtyam tenthirtyam self-assigned this Jul 10, 2024
@tenthirtyam tenthirtyam modified the milestones: v1.5.0, Backlog Sep 4, 2024
@tenthirtyam tenthirtyam modified the milestones: Backlog, v1.8.0 Oct 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants