Dela via


New-SCVirtualScsiAdapter

Creates a virtual SCSI adapter on a virtual machine, virtual machine template, or hardware profile used in VMM.

Syntax

VM (Default)

New-SCVirtualScsiAdapter
    [[-AdapterID] <Byte>]
    -VM <VM>
    [-VMMServer <ServerConnection>]
    [-ShareVirtualScsiAdapter <Boolean>]
    [-Synthetic]
    [-ScsiControllerType <VMSCSIControllerType>]
    [-RunAsynchronously]
    [-PROTipID <Guid>]
    [-JobVariable <String>]
    [-OnBehalfOfUser <String>]
    [-OnBehalfOfUserRole <UserRole>]
    [<CommonParameters>]

HardwareProfile

New-SCVirtualScsiAdapter
    [[-AdapterID] <Byte>]
    -HardwareProfile <HardwareProfile>
    [-VMMServer <ServerConnection>]
    [-ShareVirtualScsiAdapter <Boolean>]
    [-Synthetic]
    [-ScsiControllerType <VMSCSIControllerType>]
    [-RunAsynchronously]
    [-PROTipID <Guid>]
    [-JobVariable <String>]
    [-OnBehalfOfUser <String>]
    [-OnBehalfOfUserRole <UserRole>]
    [<CommonParameters>]

Template

New-SCVirtualScsiAdapter
    [[-AdapterID] <Byte>]
    -VMTemplate <Template>
    [-VMMServer <ServerConnection>]
    [-ShareVirtualScsiAdapter <Boolean>]
    [-Synthetic]
    [-ScsiControllerType <VMSCSIControllerType>]
    [-RunAsynchronously]
    [-PROTipID <Guid>]
    [-JobVariable <String>]
    [-OnBehalfOfUser <String>]
    [-OnBehalfOfUserRole <UserRole>]
    [<CommonParameters>]

JobGroup

New-SCVirtualScsiAdapter
    [[-AdapterID] <Byte>]
    -JobGroup <Guid>
    [-VMMServer <ServerConnection>]
    [-ShareVirtualScsiAdapter <Boolean>]
    [-Synthetic]
    [-ScsiControllerType <VMSCSIControllerType>]
    [-RunAsynchronously]
    [-PROTipID <Guid>]
    [-JobVariable <String>]
    [-OnBehalfOfUser <String>]
    [-OnBehalfOfUserRole <UserRole>]
    [<CommonParameters>]

Description

The New-SCVirtualScsiAdapter cmdlet creates a virtual SCSI adapter on a virtual machine, virtual machine template, or hardware profile used in a Virtual Machine Manager (VMM) environment. After you create the virtual SCSI adapter, you can use the Set-SCVirtualScsiAdapter cmdlet to modify its settings.

Note: Using the ShareVirtualScsiAdapter parameter to share a virtual SCSI adapter on a virtual machine in order to enable guest clustering is supported only if the virtual machine is deployed on an ESX host. The SharedVirtualScsiAdapter parameter is not used for a virtual machine on a Hyper-V host because a virtual machine on a Hyper-V host uses iSCSI for shared storage.

A virtual machine on a Citrix XenServer host always has one virtual SCSI adapter. You cannot remove this adapter or add additional adapters.

Examples

Example 1: Create a virtual SCSI adapter on a virtual machine

PS C:\> $VM = Get-SCVirtualMachine -Name "VM01"
PS C:\> New-SCVirtualScsiAdapter -VM $VM

The first command gets the virtual machine object named VM01 and stores the object in the $VM variable.

The second command creates a virtual SCSI adapter on VM01.

Example 2: Create a virtual SCSI adapter on a virtual machine template

PS C:\> $VMTemplate = Get-SCVMTemplate | where { $_.Name -eq "VMTemplate01" }
PS C:\> New-SCVirtualScsiAdapter -VMTemplate $VMTemplate

The first command gets the virtual machine template object named VMTemplate01 from the VMM library and stores the object in the $VMTemplate variable.

The second command creates a virtual SCSI adapter on VMTemplate01.

Example 3: Create a virtual SCSI adapter on a hardware profile

PS C:\> $HWProfile = Get-SCHardwareProfile | where { $_.Name -eq "NewHWProfile01" }
PS C:\> New-SCVirtualScsiAdapter -HardwareProfile $HWProfile

The first command gets the hardware profile object named NewHWProfile01 from the VMM library and stores the object in the $HWProfile variable.

The second command creates a virtual SCSI adapter on NewHWProfile01.

Parameters

-AdapterID

Specifies the logical unit number, or LUN ID. Hyper-V and XenServer do not expose this value, and it cannot be changed. For a VMware ESX host, the default is 7 and cannot be changed.

Parameter properties

Type:Byte
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:0
Mandatory:False
Value from pipeline:True
Value from pipeline by property name:False
Value from remaining arguments:False

-HardwareProfile

Specifies a hardware profile object.

Parameter properties

Type:HardwareProfile
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

HardwareProfile
Position:Named
Mandatory:True
Value from pipeline:True
Value from pipeline by property name:False
Value from remaining arguments:False

-JobGroup

Specifies an identifier for a series of commands that will run as a set just before the final command that includes the same job group identifier runs.

Parameter properties

Type:Guid
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

JobGroup
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-JobVariable

Specifies that job progress is tracked and stored in the variable named by this parameter.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-OnBehalfOfUser

Specifies the name of a user. This cmdlet sets the on behalf of user as the user that this parameter specifies.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-OnBehalfOfUserRole

Specifies a user role. This cmdlet sets the on behalf of user role as the user role that this parameter specifies. To obtain a user role object, use the Get-SCUserRole cmdlet.

Parameter properties

Type:UserRole
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-PROTipID

Specifies the ID of the Performance and Resource Optimization tip (PRO tip) that triggered this action. This parameter lets you audit PRO tips.

Parameter properties

Type:Guid
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-RunAsynchronously

Indicates that the job runs asynchronously so that control returns to the command shell immediately.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-ScsiControllerType

Specifies a SCSI controller type. Valid values are:

  • DefaultTypeNoType
  • LsiLogic
  • BusLogic
  • ParaVirtualSCSI
  • LsiLogicSAS

Parameter properties

Type:VMSCSIControllerType
Default value:None
Accepted values:DefaultTypeNoType, LsiLogic, BusLogic, ParaVirtualSCSI, LsiLogicSAS
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-ShareVirtualScsiAdapter

Indicates whether a virtual SCSI adapter is shared so that it can be used in guest clustering.

  • Hyper-V host: No (for guest clustering, use iSCSI storage)
  • XenServer host: No (Xen VMs always have exactly one SCSI adapter)

Note: When sharing a SCSI controller on a virtual machine on an ESX host, VMM defaults the SCSI sharing policy on VMware to "physical."

Parameter properties

Type:Boolean
Default value:None
Supports wildcards:False
DontShow:False
Aliases:Shared

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Synthetic

Indicates that a device, such as a virtual network adapter, on a virtual machine deployed on a Hyper-V host is a high-performance synthetic device. Requires a virtualization-aware guest operating system on the virtual machine.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-VM

Specifies a virtual machine object.

Parameter properties

Type:VM
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

VM
Position:Named
Mandatory:True
Value from pipeline:True
Value from pipeline by property name:False
Value from remaining arguments:False

-VMMServer

Specifies a VMM server object.

Parameter properties

Type:ServerConnection
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:True
Value from pipeline by property name:False
Value from remaining arguments:False

-VMTemplate

Specifies a VMM template object used to create virtual machines.

Parameter properties

Type:Template
Default value:None
Supports wildcards:False
DontShow:False
Aliases:Template

Parameter sets

Template
Position:Named
Mandatory:True
Value from pipeline:True
Value from pipeline by property name:False
Value from remaining arguments:False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

Outputs

VirtualSCSIAdapter

This cmdlet returns a VirtualSCSIAdapter object.

Notes

  • Requires a VMM virtual machine object, virtual machine template object, or hardware profile object, which can be retrieved by using the Get-SCVirtualMachine, Get-SCVMTemplate, or Get-SCHardwareProfile cmdlets, respectively.