Reply to Message

View discussion in a popup

Replying to:
online11
Contributor
Contributor

Add existing datastores to ESX without formatting

Hi everyone, I am new to scripting, trying to find a script that add disks to ESX host just like we do on vcenter.

Rescan disks - Add Storage - Select Disk/Lun - naa IDs are known - Keep existing signature - Finish

Scenario is that: I have 50+ replicated disks that I have to import on DR site with a known naa.ids

luns ids like below:

Fibre Channel Disk (naa.500506680180831a8000000000000505):1

Fibre Channel Disk (naa.400503480180821a8000000000000502):1

Fibre Channel Disk (naa.300503380180811a8000000000000511):1

Fibre Channel Disk (naa.200502280180851a8000000000000435):1

...

..

Lets say I have 2 ESX hosts not clustered.

ESX1 and ESX2

How would you add those 50 disks to the ESX hosts with a powercli script?

I am working on this issue quite some time but couldn't find a satisfactory answer.

PS: Keep existing signature is not a must, could be assign a new signature. All I need is not to format disk cause there is data inside.

Thanks...

Reply
0 Kudos