Create a local ISO SR at XCP-NG

From the CLI:

  1. Create a directory on the local filesystem to storage your ISOs
  2. Copy/move ISOs to this new location
  3. Create the ISO SR using xe sr-create
  4. You can add or update ISOs later by placing them into the directory you created in step 1
  5. Rescan the SR if you change the files stored in the ISO directory

Continue reading “Create a local ISO SR at XCP-NG” »

Share

Install Xen Orchestra on Ubuntu 20

Prework

apt-get update && apt-get dist-upgrade

Node.js

For this particular installation node 16 is needed to be installed. Lets install-

Add NodeSource PPA

This command will add PPA sources required to be able to install NodeJS 16 on your Ubuntu 20.04 installation:

curl -s https://deb.nodesource.com/setup_16.x | sudo bash

Install NodeJS 16

Now that the PPA source has been added, we can install NodeJS 16 on our Ubuntu 20.04 installation. Run the following command:

sudo apt install nodejs -y

Tip: The -y flag means we’re not prompted to confirm our choices. Continue reading “Install Xen Orchestra on Ubuntu 20” »

Share

Force stop xen vm using command line

Instructions

  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. Run the following command to list VMs and their UUIDs
    xe vm-list resident-on=<uuid_of_host>
  3. First you can try just the normal shutdown command with force
    xe vm-shutdown uuid=<UUID from step 3> force=true
  4. 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
  5. If the VM is still not shutdown, we may need to destroy the domain.  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
    list_domains
  6. Now run this command using the domain ID from the output of step 7
    xl destroy <DOMID from step 7>
Share

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” »

Share

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” »

Share

Force Shutdown Xen VM

Instructions

  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
    list_domains
  8. Now run this command using the domain ID from the output of step 7
    xl destroy <DOMID from step 7>
Share

How to Add Additional Physical NICs to XenServer

From the XenServer Command Line Interface (CLI), issue the following command:

xe pif-list

Press Enter.

Note: If you have more than one XenServer in the pool, you must issue the xe host-list command to list all the XenServer hosts and write down the Universally Unique Identifier (UUID) of the host that you added the new NIC, then issue command xe pif-list host-uuid=[uuid of the XenServer host]

The preceding command lists all the physical NICs of that XenServer. If you do not see the additional NIC, you must scan for new physical interface(s) on a XenServer and issue this command:

xe pif-scan host-uuid=[uuid of the XenServer host]

Press Enter. Continue reading “How to Add Additional Physical NICs to XenServer” »

Share

Setup Xen Orchestra (XO) Community Edition

XCP-NG + Xen Orchestra Community Edition = a powerful 100% free virtualization environment and backup solution. I’m writing this to provide hand holding for those interested in XCP-NG but intimidated by the required command line setup to get Xen Orchestra Community Edition (XOCE) working.

The installation and update scripts for Xen Orchestra were written by DustinB3403; I’m using information from a few different sources to make an easy to follow guide.

For the purposes of this guide I’ll presume you already have XCP-NG installed and that XOCE will be running as a VM on XCP-NG. I’ll also assume you already have XCP-NG Center installed on a Windows OS. You can download XCP-NG Center at https://github.com/xcp-ng/xenadmin/releases.

*Updated 08-16-19 with TOML instructions for HTTPS. Thanks again to SloopDog for posting the HTTPS instructions.

Step 1: Download Linux ISO

I used Ubuntu Server 18.04 LTS (http://releases.ubuntu.com/18.04/). If you’re not comfortable with Linux I suggest you do the same so you can use the same commands without modification. Otherwise, feel free to use your own flavor. Download the Linux ISO and save it in a shared windows folder. Continue reading “Setup Xen Orchestra (XO) Community Edition” »

Share