diff --git a/.web-docs/components/builder/vsphere-clone/README.md b/.web-docs/components/builder/vsphere-clone/README.md index 277b8c2b..ef0c86c8 100644 --- a/.web-docs/components/builder/vsphere-clone/README.md +++ b/.web-docs/components/builder/vsphere-clone/README.md @@ -103,7 +103,7 @@ references, which are necessary for a build to succeed and can be found further - `disk_controller_type` ([]string) - The disk controller type. One of `lsilogic`, `lsilogic-sas`, `pvscsi`, - `nvme`, or `scsi`. Defaults to `lsilogic`. Use a list to define + `nvme`, `scsi`, or `sata`. Defaults to `lsilogic`. Use a list to define additional controllers. Refer to [SCSI, SATA, and NVMe Storage Controller Conditions, Limitations, and Compatibility](https://docs.vmware.com/en/VMware-vSphere/8.0/vsphere-vm-administration/GUID-5872D173-A076-42FE-8D0B-9DB0EB0E7362.html) for additional information. @@ -1331,7 +1331,7 @@ boot time. **NOTE**: Guests using Windows with Win32-OpenSSH v9.1.0.0p1-Beta, scp (the default protocol for copying data) returns a a non-zero error code since the MOTW cannot be set, which cause any file transfer to fail. As a workaround you can override the transfer protocol - with SFTP instead `ssh_file_transfer_method = "sftp"`. + with SFTP instead `ssh_file_transfer_protocol = "sftp"`. - `ssh_proxy_host` (string) - A SOCKS proxy host to use for SSH connection diff --git a/.web-docs/components/builder/vsphere-iso/README.md b/.web-docs/components/builder/vsphere-iso/README.md index 3636272a..ad9cfd6d 100644 --- a/.web-docs/components/builder/vsphere-iso/README.md +++ b/.web-docs/components/builder/vsphere-iso/README.md @@ -853,7 +853,7 @@ JSON Example: - `disk_controller_type` ([]string) - The disk controller type. One of `lsilogic`, `lsilogic-sas`, `pvscsi`, - `nvme`, or `scsi`. Defaults to `lsilogic`. Use a list to define + `nvme`, `scsi`, or `sata`. Defaults to `lsilogic`. Use a list to define additional controllers. Refer to [SCSI, SATA, and NVMe Storage Controller Conditions, Limitations, and Compatibility](https://docs.vmware.com/en/VMware-vSphere/8.0/vsphere-vm-administration/GUID-5872D173-A076-42FE-8D0B-9DB0EB0E7362.html) for additional information. @@ -1515,7 +1515,7 @@ JSON Example: **NOTE**: Guests using Windows with Win32-OpenSSH v9.1.0.0p1-Beta, scp (the default protocol for copying data) returns a a non-zero error code since the MOTW cannot be set, which cause any file transfer to fail. As a workaround you can override the transfer protocol - with SFTP instead `ssh_file_transfer_method = "sftp"`. + with SFTP instead `ssh_file_transfer_protocol = "sftp"`. - `ssh_proxy_host` (string) - A SOCKS proxy host to use for SSH connection diff --git a/.web-docs/components/builder/vsphere-supervisor/README.md b/.web-docs/components/builder/vsphere-supervisor/README.md index 0611211d..3aaaa09d 100644 --- a/.web-docs/components/builder/vsphere-supervisor/README.md +++ b/.web-docs/components/builder/vsphere-supervisor/README.md @@ -296,7 +296,7 @@ items are listed below as well as the _optional_ configurations. **NOTE**: Guests using Windows with Win32-OpenSSH v9.1.0.0p1-Beta, scp (the default protocol for copying data) returns a a non-zero error code since the MOTW cannot be set, which cause any file transfer to fail. As a workaround you can override the transfer protocol - with SFTP instead `ssh_file_transfer_method = "sftp"`. + with SFTP instead `ssh_file_transfer_protocol = "sftp"`. - `ssh_proxy_host` (string) - A SOCKS proxy host to use for SSH connection diff --git a/builder/vsphere/common/storage_config.go b/builder/vsphere/common/storage_config.go index 9ab0f286..eda45dd4 100644 --- a/builder/vsphere/common/storage_config.go +++ b/builder/vsphere/common/storage_config.go @@ -111,7 +111,7 @@ type DiskConfig struct { type StorageConfig struct { // The disk controller type. One of `lsilogic`, `lsilogic-sas`, `pvscsi`, - // `nvme`, or `scsi`. Defaults to `lsilogic`. Use a list to define + // `nvme`, `scsi`, or `sata`. Defaults to `lsilogic`. Use a list to define // additional controllers. Refer to [SCSI, SATA, and NVMe Storage Controller // Conditions, Limitations, and Compatibility](https://docs.vmware.com/en/VMware-vSphere/8.0/vsphere-vm-administration/GUID-5872D173-A076-42FE-8D0B-9DB0EB0E7362.html) // for additional information. diff --git a/builder/vsphere/driver/disk.go b/builder/vsphere/driver/disk.go index 06f8bb9d..9755afe9 100644 --- a/builder/vsphere/driver/disk.go +++ b/builder/vsphere/driver/disk.go @@ -18,7 +18,7 @@ type Disk struct { } type StorageConfig struct { - DiskControllerType []string // Example: "scsi", "pvscsi", "nvme", "lsilogic" + DiskControllerType []string Storage []Disk } @@ -30,9 +30,12 @@ func (c *StorageConfig) AddStorageDevices(existingDevices object.VirtualDeviceLi for _, controllerType := range c.DiskControllerType { var device types.BaseVirtualDevice var err error - if controllerType == "nvme" { + switch controllerType { + case "nvme": device, err = existingDevices.CreateNVMEController() - } else { + case "sata": + device, err = existingDevices.CreateSATAController() + default: device, err = existingDevices.CreateSCSIController(controllerType) } if err != nil { diff --git a/docs-partials/builder/vsphere/common/StorageConfig-not-required.mdx b/docs-partials/builder/vsphere/common/StorageConfig-not-required.mdx index 6553efb6..544dad8c 100644 --- a/docs-partials/builder/vsphere/common/StorageConfig-not-required.mdx +++ b/docs-partials/builder/vsphere/common/StorageConfig-not-required.mdx @@ -1,7 +1,7 @@ - `disk_controller_type` ([]string) - The disk controller type. One of `lsilogic`, `lsilogic-sas`, `pvscsi`, - `nvme`, or `scsi`. Defaults to `lsilogic`. Use a list to define + `nvme`, `scsi`, or `sata`. Defaults to `lsilogic`. Use a list to define additional controllers. Refer to [SCSI, SATA, and NVMe Storage Controller Conditions, Limitations, and Compatibility](https://docs.vmware.com/en/VMware-vSphere/8.0/vsphere-vm-administration/GUID-5872D173-A076-42FE-8D0B-9DB0EB0E7362.html) for additional information.