Saturday 8 September 2012

VMWare ESXi how to import a HDD from another ESXi foreign disk


esxcfg-volume -l  - list volumes, find UUID


VMFS3 UUID/label:  4dd52c33-b742ddde-cdc1-001e670402c1/SBS-Datastore
Can mount:  Yes
Can resignature:  Yes
Extent name:  naa.6003005700ed60001666bf1f70936030:1     range: 0 - 476671 (MB)


esxcfg-volume -M 4dd52c33-b742ddde-cdc1-001e670402c1


You need to tell it to detect the existing datastore: 
esxcfg-advcfg -s 1 /LVM/EnableResignature
esxcfg-advcfg -s 0 /LVM/DisallowSnapshotLun

Scan the volume:
esxcfg-rescan vmhba0 && esxcfg-rescan vmhba1
vmhba0 and vmhba1 are the volumes on your system.

Then login with the vi client:
Configuration ->Storage
Select Rescan
Which will scan for:
New storage adapters.
Scan for new VMFS volumes.

Click Refresh
Then go back to the summary and change the name of datastore from
snap-blah

To:
datastore1 or whatever name you want. 
Then turn the resignature option off.
esxcfg-advcfg -s 0 /LVM/EnableResignature
esxcfg-advcfg -s 1 /LVM/DisallowSnapshotLun

We create a 5 GB volume to install esxi on, so we can reinstall esxi without affecting the existing datastore(s).

No comments:

Post a Comment