Quantcast
Channel: VMware Communities : Discussion List - All Communities
Viewing all articles
Browse latest Browse all 176483

Help with moving the hard disks from one scsi controller to another scsi controller!

$
0
0

Hi

 

I deployed a bunch of VMs from a template and trying to customize them as per the requirement. I referred to one of the post and used the below code. The settings of the vms changed but the image is corrupted all the time.

 

## get the VM object

$vmVMSTORE23 = Get-VM VMSTORE23

## set the harddisk storageformat to thin

$vmVMSTORE23 | Get-HardDisk | Set-HardDisk -StorageFormat Thin

## set the SCSI controller type

$vmVMSTORE23 | Get-ScsiController | Set-ScsiController -Type VirtualLsiLogicSAS

 

 

 

I tried the other way adding  a new scsi controller and moving the existing hard disks to the new scsi controller. The one hard disk created along deployment from a template is not moving to new scsi controller and vm is trying to boot from scsi node 1:0 and not from scsi node 0:1. Here is code snap I used

 

 

 

$VirtualMachinesDetails | %{ New-HardDisk -VM $_.Name -CapacityGB 1 -Datastore (Get-Datastore $_.Datastore) -Persistence IndependentNonPersistent  -Confirm:$false } (Hard disk 2)

$VirtualMachinesDetails | %{ New-HardDisk -VM $_.Name -DiskType $_.rawtype -Devicename $_.rdm1 -Confirm:$false } (Hard disk 3)

$VirtualMachinesDetails | %{ New-HardDisk -VM $_.Name -DiskType $_.rawtype -Devicename $_.rdm2 -Confirm:$false } (Hard disk 4)

$disk = $VirtualMachinesDetails | %{Get-HardDisk -VM $_.Name | Select -First 4}

$VirtualMachinesDetails | %{New-ScsiController -HardDisk $disk -Type $_.Type}

 

Someone please help me with this.

 

Thanks in advance

 

Sai


Viewing all articles
Browse latest Browse all 176483

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>