Install HandBrake on Ubuntu 18.04

HandBreak is an OpenSource Video transcoder available from https://handbrake.fr. It can convert video to various format.

Latest version of Handbreak available in Ubuntu PPA. To install, enable Handbreak PPA

Install handbreak with

kvm-os-image

Install Linux KVM on Ubuntu

Linux KVM is virtualisation software that allow you to create virtual machine under linux. To install on Ubuntu, run

Install libvirtd, this allow you to easily create KVM virtual machines and allow remote connection from virt-manager GUI application.

Enable and start libvirt

At this stage, you should be able to connect to KVM server form your computer using virt-manager.

Downloading ISO

Before you can setup any VM, you need to download ISO image for the OS. Here i downloaded ISO image for Ubuntu 19.04

Once downloaded, you should be able to select this ISO image in virt-manager when creating a VM.

See Linux KVM

Ignore a folder in maldet

maldet is malware scanner for linux. On a shared hosting server, maldet detected one cusomer files as malware, on checking i found it is false positive. It is just a log file written by the application. To avoid getting further email from this application, i added this folder to maldet ignore_paths.

To add a folder to ignore list, edit file

Add the folder you need to ignore to end of this file as a new line.

Example

See maldet

Download RPM package from yum repository

To download RPM file from yum repo, you need to install yum-utils package.

Now you can use command

Example

This will download and store all rpm files in /var/yum folder. –resolve will resolve dependency and download them. This will be helpful if you need to install a package on a system with no direct internet connection.

See yum

Enable Passive FTP in ISPConfig

To enable Passive FTP in Debian/Ubuntu installation of ISPConfig, run

Restart pure-ftpd

Now open ports 40110-40210 in firewall.

On CSF Firewall, edit

Add

At ened of TCP_IN line.

Example

See ispconfig

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