Visual Code Studio

I was using Sublime Text as my text editor. Recently switched to Visial Code Studio, it is an open source editor from Microsoft, it work on Windows, Linux and Mac. You can download it from

Here are some shortcuts i use

Docker container start on boot

To set a docker container to start on system reboot, run

Replace CONTAINER_ID with actual ID of your container.

MySQL Out of resources when opening file

On a MySQL server got the error

This is because number of files allowed to open by MySQL is set to too low. To view current settings, in MySQL command prompt, run


To increase the value, edit MySQL configuration file, this normally located in /etc/my.cnf, on some servers, it will be on /etc/mysql/my.cnf, add following under [mysqld] section.

Now restart MySQL

Verify it is changed with command

MySQL open_files_limit

Install LiteSpeed Web Server on Cpanel Server

To install LiteSpeed Web Server on Cpanel Server, run

This will instal 15 day TRAIl version of the LiteSpeed Web Server. Once you purchased license, you will be able to update license key in WHM.

LiteSpeed Web Server installed on folder

To restart LiteSpeed, run

Once LiteSpeed installed, you need to switch to LiteSpeed by running

You can also do this in WHM.

You can login to web interface at

You will need admin password to login here, to set admin password, run

mysqldump packet bigger than max_allowed_packet

When backing up a MySQL database using mysqldump command, got following error

To fix, you need to edit MySQL config file

Add following under [mysqld] section

Now restart MySQL with

You can verify the value is changed by running following SQL command in MySQL prompt

Or my running following command in command line

On a VPS, editing /etc/my.cnf did not changed the value in MySQL for some reason. I got it fixed by running mysqldump with –max_allowed_packet=2G option.

Proxmox Manage Virtual Machines with qm command

To list all running Virtual Machines, run

To stop a VM, run

Here are other qm commands

VMware ESXi set Virtual Machine to start on Boot

To set Virtual machine to start on boot, Go to

Click on the Virtual machine you need to start on Boot.

From Actions Menu, select “Autostart” click “Enable”

Create Virtual Machine in VMware ESXi Server

To create Virtual Machine, login to VMware ESXi, click on “Create/Register VM” link on top.

Create VM

On next page, it ask you to “Select creation type”.

Select “Create a new virtual machine”. Click next.

On next page, you need to “Select a name and guest OS”.

It ask for datastore, select the datastore you need to use for your VM.

On “Customize settings” page you need to select Virtual Machine CPU/RAM/Disk etc..

If you need to boot from ISO, set “CD/DVD Drive 1” to “Datastore ISO file”. This will show you datastore browser, you need to select the ISO file you need to install. Make sure you select “Connect at power on” option for VM to boot from ISO file.

On next screen, it shows information about the virtual machine you are going to create.

Click “Finish” to create the Virtual Machine.

Click on “Virtual Machines” link on left side menu, you will see all your Virtual Machines

Click on the VM to start the Virtual Machine, this will boot the VM from ISO, you can do the installation of Guest OS.

Posted in vmware