Proxmox VM auto start VM after found in shutdown state

I was having this strange issue, where a running busy VM stopeed all of a sudden due to high CPU or Memory overload issue. So manually had to start everythime. In order to avoid this, created a small script to start the VM in case if it’s down.


# Set environment

su -

if [[ $(qm status 101) = *"status: stopped"* ]];
echo `qm start 101`

Cloning KVM virtual machine using CLI

To clone your VM and spawn new instances in KVML

# virt-clone --original {Domain-Vm-Name-Here} --auto-clone


# virt-clone --original {Domain-Vm-Name-Here} --name {New-Domain-Vm-Name-Here} --auto-clone


# virt-clone --original {Domain-Vm-Name-Here} \
--name {New-Domain-Vm-Name-Here} --file {/var/lib/libvirt/images/}

Continue reading “Cloning KVM virtual machine using CLI” »


How to remove Virtualbox extpack

The following commands show examples how to list extension packs and remove one:

$ VBoxManage list extpacks
Extension Packs: 1
Pack no. 0: Oracle Virtual Machine VirtualBox Extension Pack
Version: 4.1.12
Revision: 77218
Description: USB 2.0 Host Controller, VirtualBox RDP, PXE ROM with E1000 support.
Usable: true
Why unusable:

Now Remove or Uninstall extpack as following:

$ VBoxManage extpack uninstall "Oracle Virtual Machine VirtualBox Extension Pack"
Successfully uninstalled "Oracle Virtual Machine VirtualBox Extension Pack".

Export/ Import VM to/from a backup file using command line on XenServer

Identify VM’s UUID

We start by identifying a virtual machine we would lake to export to as a regular backup file. Run xe vm-list to list all available virtual machines and take a note of the virtual machine in question:

# xe vm-list
uuid ( RO) : 7371124f-7d4d-66b7-cbc7-a98b1457543e
name-label ( RW): Debian Jessie 8.5
power-state ( RO): halted

uuid ( RO) : bad8e456-df88-435d-ba12-3f0f6e54b2c6
name-label ( RW): Control domain on host: xenserver
power-state ( RO): running

Take VM snapshot Continue reading “Export/ Import VM to/from a backup file using command line on XenServer” »


enable SNMP on Xen (XCP-NG) hypervisors

There are six steps to correctly configuring SNMP on your Citrix Xen hypervisor. These steps don’t require a system restart and are non-service affecting.

To start, we assume you’re running Xen v6.x or v7.x, and are logged into the Xen CLI as root.

1. Enable the SNMP daemon

Enable the snmpd daemon by typing-

chkconfig snmpd

2. Configure the SNMP service

Make a backup of the snmpd.conf file. The default snmpd.conf file contains a lot of useful documentation for more advanced implementations of SNMP.

# cp /etc/snmp/snmpd.conf /etc/snmp/snmpd.conf.backup

Continue reading “enable SNMP on Xen (XCP-NG) hypervisors” »


Force Shutdown Xen VM


  1. Disable High Availability (HA) so you don’t run into issues
  2. Log into the Xenserver host that is running your VM with issues via ssh or console via XenCenter
  3. Run the following command to list VMs and their UUIDs
    xe vm-list resident-on=<uuid_of_host>
  4. First you can try just the normal shutdown command with force
    xe vm-shutdown uuid=<UUID from step 3> force=true
  5. If that just hangs, use CONTROL+C to kill it off and try to reset the power state.  The force is required on this command
    xe vm-reset-powerstate uuid=<UUID from step 3> force=true
  6. If the VM is still not shutdown, we may need to destroy the domain
  7. Run this command to get the domain id of the VM.  It is the number in the first row of output. The list will be the VMs on the host.  Dom0 will be the host itself and all numbers after are running VM
  8. Now run this command using the domain ID from the output of step 7
    xl destroy <DOMID from step 7>

Force Stop Proxmox LXC

First try to unlock the pct (assuming your troubled container is 101):

pct unlock 101

if it works just stop and start again the vm. if it does’nt work (my case) try to stop with this

lxc-stop --name 101

if it’s does’nt work (my case) you can force stop with kill command

ps ax | grep lxc

then kill the process with your id (101 for me) kill pid (replace pid by the process name). After that you can just launch again you’r vm


Remove Proxmox Subscription Notice

Copy and paste following command to the terminal

(6.1 and up)

sed -i.backup "s/data.status !== 'Active'/false/g" /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js && systemctl restart pveproxy.service

(6.2-11 and up)

sed -i.backup -z "s/res === null || res === undefined || \!res || res\n\t\t\t.false/false/g" /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js && systemctl restart pveproxy.service

(6.2-12 and up) Continue reading “Remove Proxmox Subscription Notice” »


Virtualbox fixing VRDE on instead

By default, Remote Display only works on localhost / and cannot be accessed by ip address or hostname.

Check VRDE / Remote Display IP Address
You can check VRDE / Remote Display ip address using the following methods:

Open command prompt and run netstat -an |find /i “listening” or netstat -an |find /i “[PORT_NUMBER]” and you shall notice it is listening on Continue reading “Virtualbox fixing VRDE on instead” »


Remove Node from Proxmox Cluster

Step 1 : Migrate all VMs to another active node

Migrate all VMs to another active node. You can use the live migration feature if you have a shared storage or offline migration if you only have local storage.

Step 2 : Display all active nodes

Display all active nodes in order identify the name of the node you want to remove Continue reading “Remove Node from Proxmox Cluster” »