Add NVMe controller support to vsphere-iso builder (#9880)
This commit is contained in:
parent
602729ac23
commit
d1a61cac33
|
@ -98,7 +98,7 @@ type NIC struct {
|
|||
}
|
||||
|
||||
type CreateConfig struct {
|
||||
DiskControllerType []string // example: "scsi", "pvscsi", "lsilogic"
|
||||
DiskControllerType []string // example: "scsi", "pvscsi", "nvme", "lsilogic"
|
||||
|
||||
Annotation string
|
||||
Name string
|
||||
|
@ -841,7 +841,13 @@ func addDisk(_ *VCenterDriver, devices object.VirtualDeviceList, config *CreateC
|
|||
|
||||
var controllers []types.BaseVirtualController
|
||||
for _, controllerType := range config.DiskControllerType {
|
||||
device, err := devices.CreateSCSIController(controllerType)
|
||||
var device types.BaseVirtualDevice
|
||||
var err error
|
||||
if controllerType == "nvme" {
|
||||
device, err = devices.CreateNVMEController()
|
||||
} else {
|
||||
device, err = devices.CreateSCSIController(controllerType)
|
||||
}
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
|
|
@ -149,7 +149,10 @@ type CreateConfig struct {
|
|||
// here](https://code.vmware.com/apis/358/vsphere/doc/vim.vm.GuestOsDescriptor.GuestOsIdentifier.html)
|
||||
// for a full list of possible values.
|
||||
GuestOSType string `mapstructure:"guest_os_type"`
|
||||
// Set VM disk controller type. Example `lsilogic`, pvscsi`, or `scsi`. Use a list to define additional controllers. Defaults to `lsilogic`
|
||||
// Set VM disk controller type. Example `lsilogic`, `pvscsi`, `nvme`, or `scsi`. Use a list to define additional controllers.
|
||||
// Defaults to `lsilogic`. See
|
||||
// [SCSI, SATA, and NVMe Storage Controller Conditions, Limitations, and Compatibility](https://docs.vmware.com/en/VMware-vSphere/7.0/com.vmware.vsphere.vm_admin.doc/GUID-5872D173-A076-42FE-8D0B-9DB0EB0E7362.html#GUID-5872D173-A076-42FE-8D0B-9DB0EB0E7362)
|
||||
// for additional details.
|
||||
DiskControllerType []string `mapstructure:"disk_controller_type"`
|
||||
// A collection of one or more disks to be provisioned along with the VM.
|
||||
Storage []DiskConfig `mapstructure:"storage"`
|
||||
|
|
|
@ -9,7 +9,10 @@
|
|||
here](https://code.vmware.com/apis/358/vsphere/doc/vim.vm.GuestOsDescriptor.GuestOsIdentifier.html)
|
||||
for a full list of possible values.
|
||||
|
||||
- `disk_controller_type` ([]string) - Set VM disk controller type. Example `lsilogic`, pvscsi`, or `scsi`. Use a list to define additional controllers. Defaults to `lsilogic`
|
||||
- `disk_controller_type` ([]string) - Set VM disk controller type. Example `lsilogic`, `pvscsi`, `nvme`, or `scsi`. Use a list to define additional controllers.
|
||||
Defaults to `lsilogic`. See
|
||||
[SCSI, SATA, and NVMe Storage Controller Conditions, Limitations, and Compatibility](https://docs.vmware.com/en/VMware-vSphere/7.0/com.vmware.vsphere.vm_admin.doc/GUID-5872D173-A076-42FE-8D0B-9DB0EB0E7362.html#GUID-5872D173-A076-42FE-8D0B-9DB0EB0E7362)
|
||||
for additional details.
|
||||
|
||||
- `storage` ([]DiskConfig) - A collection of one or more disks to be provisioned along with the VM.
|
||||
|
||||
|
|
Loading…
Reference in New Issue