VMWare ESXi

Clone VM on VMware ESXi using vmkfstools

Free version of VMware ESXi don’t provide option to clone virtual machine. If you want to clone a VM, you need to purchase expensive vSphere license.

There is a work around for this, you need to clone disk of an existing Virtual machine using vmkfstools.

To make clone of a VM disk, SSH into your VMWare ESXi server as user root. Then create clone of disk with

For new VM, i created a directory. Path to datastore directory may be differnt on your server, you can find it using “df -h” command and checking the file system.

Shutdown the Virtual Machine you want to clone the disk from. Run

In screenshot below, i first tried to clone with out creating destination folder. That resulted in error. After creating destination folder, vmkfstools command worked.

vmkfstools

Creating VM using cloned disk

Login to VMware ESXi web interface. Create a new VM. On the step where you select hardware, delete existing Disk. Add a new disk, browse and select the newly created clone disk. In this case – “/vmfs/volumes/disk2/ubuntu-clone/ubuntu-clone.vmdk”

VMWare ESXi

Once the VM creation is finished, you will be able to start the new VM. You can create a VM, then use it as template for creating new virtual machines.

See VMWare

vmstat

vmstat 1

* High values in “wa” column mean: IO problem
* High values in “si”, “so” mean: excessive swapping

Sustained high swap rates (si and so) are usually bad. The system will start spending all of its time swapping, and make no progress on any actual work. You will also see the number of runnable (r and b) processes increase. If the situation gets bad enough and free memory gets too low, the Out-of-memory (oom) logic will start killing random processes. At this point, either reducing the number of processes that normally run or adding additional RAM are about the only options.

vmstat – Report virtual memory statistics

vmstat reports information about processes, memory, paging, block IO, traps, and cpu activity.

The first report produced gives averages since the last reboot. Additional reports give information on a sampling period of length delay. The process and memory reports are instantaneous in either case.

FIELD DESCRIPTION FOR VM MODE

FIELD DESCRIPTION FOR DISK MODE

FIELD DESCRIPTION FOR DISK PARTITION MODE

FIELD DESCRIPTION FOR SLAB MODE

Related commands

* iostat
* sar
* mpstat
* ps
* top
* free

See Linux Commands

vgcreate

To Create a volumegroup.

See lvm

Disable Netdata Email Notification

To disable email notifcation from netdata, run

Find

Replace with

By default, it open using nano, if you want to use vim to edit, select vim as default editor with

See netdata

find files by size

On a server, i wanted to find all log files that are larger than 1 GB in size, to do this, run

Example

To find files older than 100 days, run

See find

ubuntu-software-updates

Install drivers on Ubuntu

To install drivers on Ubuntu using command line, run

This list all drivers available for your hardware. You can install a driver with apt. In this cuase, i have 2 drivers available

First driver is recommended by Ubuntu. To install, run

Install Driver using Software & Updates

Start software and updates application.

Click on Additional Drivers tab. You will see available drivers for your computer.