vsphere/internal/virtualdevice/virtual_machine_device_subresource.go
func createSCSIController(l *object.VirtualDeviceList, ct string, st string) ([]types.BaseVirtualDeviceConfigSpec, error) {
	nc, err := l.CreateSCSIController(ct)
	if err != nil {
		return nil, err
	}
	nc.(types.BaseVirtualSCSIController).GetVirtualSCSIController().SharedBus = types.VirtualSCSISharing(st)
	cspec, err := object.VirtualDeviceList{nc}.ConfigSpec(types.VirtualDeviceConfigSpecOperationAdd)
	*l = applyDeviceChange(*l, cspec)
	return cspec, err
}
func createSCSIController(l *object.VirtualDeviceList, ct string, st string) ([]types.BaseVirtualDeviceConfigSpec, error) {
	nc, err := l.CreateSCSIController(ct)
	if err != nil {
		return nil, err
	}
	nc.(types.BaseVirtualSCSIController).GetVirtualSCSIController().SharedBus = types.VirtualSCSISharing(st)
	cspec, err := object.VirtualDeviceList{nc}.ConfigSpec(types.VirtualDeviceConfigSpecOperationAdd)
	*l = applyDeviceChange(*l, cspec)
	return cspec, err
}
// createSCSIController creates a new SCSI controller of the specified type and
// sharing mode.