VMware ESXi

How to deploy a Domotz Agent VMware disk image onto a VMware ESXi Host

This article contains a few tips and tricks on how to deploy a pre-configured VM image on a VMware ESXi Host.

Get your VM disk image

Download the VMware .vmdk disk from here:

https://domotz-vm-images-temp.s3.eu-west-1.amazonaws.com/domotzpro-ubuntu-20.04.3-x64-3.9.2-b001-vmware6.5_2022.zip

Unzip it:

VMware ESXi screenshot 1

Deploy the disk image to your VMware ESXi Host

Access your ESXi admin dashboard and create a new VM:

VMware ESXi screenshot 2

Click “Next” and set the following:

  1. Name: domotzpro-ubuntu-20.04.3-x64-3.9.2-b001-vmware6
  2. Compatibility: ESXi 6
  3. Guest OS family: Linux
  4. Guest OS version: Ubuntu Linux (64-bit)
VMware ESXi screenshot 3

Click “Next” and set the following:

  1. Select the Storage you want to deploy your VM.
  2. To upload the provided .vmdk files do the following:
    1. Delete the Hard disk 1.
    2. Add an Existing hard disk:
VMware ESXi screenshot 3

Click “Next” and do the following:

  1. In the “Datastore Browser” window create a new folder and name it with the VM name.
  2. Upload the .vmdk images you downloaded: first upload the domotzpro-ubuntu-20.04.3-x64-3.9.2-b001-vmware6.5-1-flat.vmdk and after that upload also the other file domotzpro-ubuntu-20.04.3-x64-3.9.2-b001-vmware6.5-1.vmdk:
VMware ESXi screenshot 4

Once you upload both files select the disk visible as your Hard Disk (the first file “domotzpro-ubuntu-20.04.3-x64-3.9.2-b001-vmware6.5-1-flat.vmdk” will not be listed, and this is normal).

  1. Click on “Next” and then “Finish”.
  2. Start the VM and activate your Agent.

To activate the agent access the VM on its port 3000 (http://<VM_IP_Address>:3000) using a browser. (if you need to login into the machine to see its current IP Address the user is domotz and the password is domotz).

We strongly recommend to change the password as soon as possible, and in general to not allow SSH to the VM.

IMPORTANT SECURITY NOTES:
After setting up your VM you must update it with security patches. You can do it by performing these two commands when logged into the cli as domotz user:
sudo apt update
sudo apt upgrade


Ensure to keep a process to continuously update and upgrade the system. Only the Domotz Agent software is automatically upgraded via SNAPd process.

VPN on Demand

If the Domotz Agent on the Virtual Machine is supposed to be used for the VPN On Demand, the following commands should be executed from within the Virtual Machine itself (connect via SSH using the above provided credentials):

sudo snap install domotzpro-agent-publicstore
sudo snap connect domotzpro-agent-publicstore:firewall-control
sudo snap connect domotzpro-agent-publicstore:network-observe
sudo snap connect domotzpro-agent-publicstore:raw-usb
sudo snap connect domotzpro-agent-publicstore:shutdown
sudo snap connect domotzpro-agent-publicstore:system-observe

sudo sh -c 'echo tun >> /etc/modules'
sudo modprobe tun

 
This will basically make the Domotz Agent able to control the network stack to create a VPN on Demand tunnel.

After doing that restart the Agent package:
 
sudo snap restart domotzpro-agent-publicstore

Updated on April 25, 2022

Was this article helpful?