After some time using VMWare Workstation as a playground for my VM home lab environment, and after learning and testing with VM ESXi Hosts, I decided that is time to move to a hardware lab
So I achieved, for the start, 2 servers for the ESXi hosts, and because there is no HDD on the servers, I have installed the ESXi software on an USB Stick. For the storage I would like to use a dedicated shared server, but I am still looking what server and drives should I get. I need more time to check and see what would be the best solution for me.
But in the same time, I am not having enough patience to wait till I build my storage server, I would like to start testing the ESXi hosts right away. I know that this is a compromise solution, but I thought to attach a USB Disk as VMFS Datastore.
So in today’s post I would like to show you how can we add and configure a USB Disk as VMFS Datastore.
Please note that in the ESXi 6.7 version, USB devices larger than 2TB are not supported.
Connect to ESXi IP address, go to Actions and then select Services and Enable Secure Shell (SSH).
With your preferred SSH client, mine is Putty, start a connection to the ESXi host.
You have to stop USB Arbitrator Service. The service is used to passthrough the USB devices from hosts to a virtual machine. Once stopped, you will not be able anymore to passthrough USB devices to VMs.
# /etc/init.d/usbarbitrator stop
To maintain the stopped status of the service after reboot, insert the command:
# chkconfig usbarbitrator off
Connect USB device to the ESXi host. Then get the device identifier by issuing the following command in Putty:
# ls /dev/disks/
First USB device is the stick which is booting the ESXi software, so the second device is the USB Disk that we’d like to use for the datastore – mpx.vmhba33:C0:T0:L0
Write a gpt label to the USB device using its ID
# partedUtil mklabel /dev/disks/<deviceID> gpt
In order to create the partition, we need to have a few info:
1. The start sector: 2048
2. The GUID for VMFS: AA31E02A400F11DB9590000C2911D1B8
3. The end sector. This one should be calculated.
To calculate the end sector, we’ll issue the following command first:
# partedUtil getptbl /dev/disks/<deviceID>
Use this formula to get the end Sector:
243201 * 255 * 63 – 1 = 3907024064
Or you can use this formula:
# eval expr $(partedUtil getptbl /dev/disks/<deviceID> | tail -1 | awk '{print $1 " * " $2 " * " $3}') - 1
Now we have all the info and we can create the partition using the command:
# partedUtil setptbl /dev/disks/<deviceID> gpt "1 2048 <endSector> AA31E02A400F11DB9590000C2911D1B8 0"
We’ll format the partition now with VMFS6. Please be aware that we have “:1” after the deviceID.
# vmkfstools -C vmfs6 -S USB-Storage /dev/disks/<deviceID>:1
Return to ESXi and check the Storage tab. You should see here the new Datastore.
We have managed to add the USB-Disk as VMFS Datstore and we can now deploy VMs on it. I will proceed with the installation of vCenter Appliance.
Nguồn: it-react.com/index.php/2020/04/26/how-to-add-a-usb-disk-as-vmfs-datastore-in-esxi-6-7/;How to Upgrade ESXi 6 7 to 7 0 without vCenter (30) 05/10/2024
Wubuntu – New Linux Distro looks like Windows 10 - 11 (52) 15/09/2024
How To Install and Configure GitLab on Ubuntu (38) 12/09/2024
How to setup your own SVN (subversion) server in Ubuntu 20 (45) 11/09/2024
Centos 7 Extend partition with unallocated space (48) 08/09/2024
How to scan CentOS server for malware (36) 08/09/2024
Cài đặt Tomcat 9 trên CentOS 7 (39) 08/09/2024