- How to Create VMFS Datastore on Vmware OS bootdrive
- Vmware ESXi 6.x NUT Client Installation and Configuration
- Create OVA using vmware ovftool on ESXi or Vcenter
How to Create VMFS Datastore on Vmware OS bootdrive
Normally a vmfs partition is already created by ESXi on the boot drive. You can verify by going logging into the ESX Web GUI and navigating to Storage --> Devices --> Boot disk (Figure 1).
Clicking on the drive will show the Partition diagram of the boot drive and the vmfs partition is usually partition 3. Make a note of the UUID of the device and the partition number (Figure 2).
Create a vmfs datastore named datastore-ssd on the the boot device using the UUID and the partition number you noted above using the command below (Device format is /vmfs/devices/disks/ vm1.<UUID>:3):
vmkfstools --createfs vmfs6 -S datastore-ssd /vmfs/devices/disks/vml.0100000000453530465f314634345f344134345f314230300057444320434c:3
If successful, you should get an output similar to below:
create fs deviceName:'/vmfs/devices/disks/vml.0100000000453530465f314634345f344134345f314230300057444320434c:3', fsShortName:'vmfs6', fsName:'datastore-ssd' deviceFullPath:/dev/disks/t10.NVMe____WDC_CL_SN720_SDAQNTW2D512G2D2000__________E50F1F444A441B00:3 deviceFile:t10.NVMe____WDC_CL_SN720_SDAQNTW2D512G2D2000__________E50F1F444A441B00:3 ATS on device /dev/disks/t10.NVMe____WDC_CL_SN720_SDAQNTW2D512G2D2000__________E50F1F444A441B00:3: not supported . Checking if remote hosts are using this device as a valid file system. This may take a few seconds... Scanning for VMFS-6 host activity (4096 bytes/HB, 1024 HBs). Creating vmfs6 file system on "t10.NVMe____WDC_CL_SN720_SDAQNTW2D512G2D2000__________E50F1F444A441B00:3" with blockSize 1048576, unmapGranularity 1048576, unmapPriority default and volume label "datastore-ssd". Successfully created new volume: 5fc102ac-257939bc-7e5b-0cc47ac8166c
Additionally, the datastore you created should appear under Storage --> Datastores in your ESXi Web Gui (Figure 3).
Vmware ESXi 6.x NUT Client Installation and Configuration
- SSH must be enabled on your ESXi installation
- Community acceptance level must be enabled on your ESXi installation in order to install the client
- Secure copy the NutClient-ESXi-2.x.x.tar.gz to your ESXi server’s /tmp directory by either using WinSCP/pscp in Windows or scp in Linux.
- Set ESXi Community Acceptance level:
esxcli software acceptance set --level=CommunitySupported
- Untar NutClient-ESXi-2.x.x.tar.gz:
tar -xzf NutClient-ESXi-2.x.x.tar.gz
- Install Client:
- If installation was successful you should see the following output:
Installation Result Message: Operation finished successfully. Reboot Required: false VIBs Installed: Margar_bootbank_upsmon_2.7.4-2.1.0 VIBs Removed: VIBs Skipped:
- You can delete the files in the /tmp directory and disable the SSH service if desired.
- In the ESXi Web client, navigate to Host —> Manage —> System —> Advanced Settings. In the Search box enter UserVars.Nut (Figure 1).
- Configure the following variables:
- NutUpsName: Name of the UPS on the NUT server (in the form of inverter_name@server_name or server_ip). Several inverters can be entered separated by a space. There will be no system shutdown until the last UPS still standing has given the shutdown command.
- NutUser: Name of the NUT server login account
- NutPassword: NUT Server Connection Account Password
- NutFinalDelay: Seconds to wait after receiving the low battery event to shut down the system
- NutSendMail: Set to 1 for the NUT client to send an e-mail to each important event of the UPS
- NutMailTo: E-mail address to send UPS events to
- In the ESXi Web client, navigate to Host —> Manage —> Services —> NutClient —> Actions —> Policy —> Start and Stop with Host (Figure 2).
- In the ESXi Web client, navigate to Host —> Manage —> Services —> NutClient —> Actions —> Start (Figure 3).
- Use the ESXi host configuration tab in the vSphere Client to decide how to start and stop (or suspend) virtual machines. This order will be respected by the UPS shutdown procedure.
- The clean shutdown of the OS in the virtual machines is only possible if the vmware tools are installed.
- To uninstall the NUT client, use the upsmon-remove script that is in the file that you downloaded:
/tmp # sh upsmon-remove
- To estimate the time needed for the server to shut down on UPS alert, type the command below on the host ESXi (by ssh or on the console). The shutdown procedure is immediately started:
/opt/nut/sbin/upsmon -c fsd
- If the NUT Client is configured correctly, the ESXi /var/log/syslog.log should have a message similar to below where ups@UPSHOST is the ups name and the UPS host you setup earlier :
2019-09-22T13:28:07Z upsmon: Communications with UPS ups@UPSHOST established
Create OVA using vmware ovftool on ESXi or Vcenter
Download ovftool for Windows 64 from vmware.com and install.
From an elevated command prompt, navigate to c:\Program Files\VMware\VMware OVF Tool
Run any of the following commands depending on your environment:
Vcenter Example (local)
ovftool --noSSLVerify vi://[USERNAME]@[VHOST]/[DATACENTER]/vm/[MACHINE_NAME] C:\ova\[OVA_MACHINE_NAME].ova
ESXi Example (Share):
ovftool --noSSLVerify vi://[USERNAME]@[ESXI_HOST]/[MACHINE_NAME] \\[FILE_SERVER]\[SHARE]\[MACHINE_NAME].ova