3 Replies Latest reply on Apr 16, 2019 8:58 AM by adamflaig1

    Remove-SCSIController?

    internetrush1 Enthusiast

      http://blogs.vmware.com/vipowershell/2010/12/support-for-virtual-machine-scsi-controllers-in-powercli-411.html

       

      Referenceing the above, there is no cmdlet similar to the subject line; however, i have a few dozen servers that just got 17 drives removed and need their SCSI controllers removed as well. Why do they not get automatically removed and is there a way to remove them?

       

      Thanks!

        • 1. Re: Remove-SCSIController?
          LucD Guru
          Community WarriorsUser ModeratorsvExpert

          Are you sure there is no device still connected to the SCSI controller ?

          Like the blogpost says, once you remove the last device, the SCSI controller will be removed as well.

           

          In what powerstate are the VMs ?

          Did you try a poweroff/poweron for the VM ?

          1 person found this helpful
          • 2. Re: Remove-SCSIController?
            internetrush1 Enthusiast

            THe VM was powered on at the time that this was done, THis was all done in POWERCLI 5.0.1.

             

            Did nto attempt to powercycle them, too bad the blog does not specify .

            • 3. Re: Remove-SCSIController?
              adamflaig1 Novice

              I know this is an older post but I was able to still duplicate this issue in PowerCLi 6.5.

               

              I migrated the drives to a new controller and the older controller still persisted through multiple power cycles. 

               

              To remove the controller as expected after migrating production drives to a new controller I performed the following steps:

               

              1. power off the VM
              2. Added new hard disk to the stuck controller.
              3. power on/off
              4. remove new hard disk
              5. controller should be gone

               

               

                

              $origController = get-scsicontroller -VM $testVM

              $testVM | stop-VM -confirm:$false

              Get-HardDisk -VM $testVM | New-ScsiController -type ParaVirtual

              $testVM | start-VM -confirm:$false

              $testVM | stop-VM -confirm:$false

              $tmpDisk = new-Hard-disk -controller $origController -capacityKB 1000000

              $tmpDisk | remove-HardDisk -confim:$false

              $testVM | start-VM -confirm:$false