How to Add External HDD to Virtual Machine and Make Datastore in vSphere ESXi 6
Hi my friend, this time I will share my experience when I get a storage problem on an enlarged server, here I use an alternative that is to make an external hdd into a datastore on a vm.
Preparation
- Prepare 1 external hard drive, here I use the hard drive with the My Passport brand.
- Plug your external hard disk into the server where the storage swells it.
- Enable SSH in VM
Enable SSH in VM |
Configure
Login SSH with Putty to VM
check status usbarbitrator
/etc/init.d/usbarbitrator status
stop service usbarbitrator
/etc/init.d/usbarbitrator stop
check status and stop usbarbitrator |
Check hard drive
ls /dev/disks/
Write the GPT label to your USB device using the ID you get:
partedUtil mklabel /dev/disks/t10.WD______My_Passport_2626WXL1AA96RUX0____ gpt
Calculate the end sector for your new partition from the resulting numbers from the following command:
partedUtil getptbl /dev/disks/t10.WD______My_Passport_2626WXL1AA96RUX0____ gpt
eval expr $(partedUtil getptbl /dev/disks/t10.WD______My_Passport_2626WXL1AA96RUX0____ | tail -1 | awk '{print $1 " \\* " $2 " \\* " $3}') - 1
Create VMFS partition using the number you calculated (end sector), the start sector (2048) and the VMFS GUID.
partedUtil setptbl /dev/disks/t10.WD______My_Passport_2626WXL1AA96RUX0____ gpt "1 2048 3906959804 AA31E02A400F11DB9590000C2911D1B8 0"
Format your new partition with VMFS6
vmkfstools -C vmfs6 -S External-Storage /dev/disks/t10.WD______My_Passport_2626WXL1AA96RUX0____:1
Format your new partition with VMFS6 |
Trying
Try going to the vSphere dashboard, and looking at storage, is there any additional datastore that we created earlier.
![]() |
Try going to the vSphere dashboard |
Post a Comment for "How to Add External HDD to Virtual Machine and Make Datastore in vSphere ESXi 6"