VMware Cloud Community
JonathanBo
Contributor
Contributor
Jump to solution

Add new Hard Disk to a specific SCSI Controller without shutting down the VM

Hello,

I get a big interrogation about being able to add new Hard Disk to a specific SCSI Controller without shutting down the VM.

This is possible to do it by GUI but it seems impossible doing by CLI !

It looks like a non-sense for me but I think that I missed something.

Any of you have any clue of how it would be possible to do it by CLI (without shutting down the VM) ?

Thank you in advance !

Regards

1 Solution

Accepted Solutions
LucD
Leadership
Leadership
Jump to solution

This works for me

$vmName = 'MyVM'

$ctrlName = 'SCSI Controller 2'


$vm = Get-VM -Name $vmName

$ctrl = Get-ScsiController -VM $vm -Name $ctrlName

New-HardDisk -Controller $ctrl -VM $vm -StorageFormat Thin -CapacityGB 1


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

View solution in original post

2 Replies
LucD
Leadership
Leadership
Jump to solution

This works for me

$vmName = 'MyVM'

$ctrlName = 'SCSI Controller 2'


$vm = Get-VM -Name $vmName

$ctrl = Get-ScsiController -VM $vm -Name $ctrlName

New-HardDisk -Controller $ctrl -VM $vm -StorageFormat Thin -CapacityGB 1


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

JonathanBo
Contributor
Contributor
Jump to solution

Hello,

Looking at this, it seems quite simple but it works like a charm !

I was trying to make something really too complex for this this.

Thank you a lot.

Regards

0 Kudos