Tag Archives: XenServer

Running Oracle VM Template for DB 12c in XenServer

As many may know Oracle VM Server is based on Xen hypervisor so it’s possible to run VMs prepared for Oracle VM on other Xen based solutions like XenServer or OCP.  Main difference is management of VMs – Oracle VM is using xm, while recent XenServer is using newer xapi stack.  But paravirtualized Linux kernels can run easily on both.

Oracle is providing VM templates with many of it’s key products – like for instance new Oracle 12c database.   In this article we will show how to run Oracle 12c Database VM template on XenServer 6.2. Continue reading Running Oracle VM Template for DB 12c in XenServer

Poor man’s backup for XenServer

I’m running several XenServer hosts and wanted to provide some basic backup of VMs. I decided to use USB disk – XenServer 6.2  provides great support for external disks.   I was looking around for some simple free tool for backup (to backup several VMs from different servers in scheduled batches), but did not find anything suitable (simple scripts were not flexible enough, bigger solutions were overkill in my case) – so I created my own solution xapi-back

My setup is:

  • I created small Debian VM and attached USB disk to it (in XS 6.2 this external disk will stay connected to VM after  VM or host reboot)
  • Installed xapi-back
  • Created special user for backup
  • Scheduled VM backups with cron

Main advantages of xapi-back  compared to other similar solutions:

  • easy to install – just download and run python setup.py
  • easy to configure –   just one simple configuration file with details of xen servers and some basic backup parameters
  • self-contained  – does not need xe or other tools (as many other solutions) and can run on any computer ( not only in xenserver Dom0 as some scripts,  generally I think it’s not good practice to run backups in Dom0, better is to have it separately).
  • complete – you can do all basic tasks from xapi-back via simple command line interface xb –  list VMs and their last backups,  backup, restore,  set VMs for scheduled backup ( with help of cron). You’ll not need any other management tools (xe, XenCenter, ….) to make backups.
  • self-maintaining – xapi-back can be scheduled and run automatically. It maintains backups’ storage, keeps N last backups and removes old backups so it can run unattended for months.
  • compact – it’s very small solution so it can run on any machine, only python  is needed (it can run easily on minimal Debian install or even on NAS)
  • universal – can run on any POSIX system, where python is running ( any Linux, FreeBSD, Solaris …)
  • multiple servers – can handle multiple XenServers and server’s pools

Changing Management Interface on XenServer 6.2

If you are changing management interface on XS (from eth1 to eth2, in my case, because eth1 was not connect to right subnet), be aware that management console must not update routing table for local subnet access appropriately – it keeps the record for previous interface there with same metric value, so actually old record will have preference.   So you might end up in situation, where you cannot access local subnet.

You can check with route command:

Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface   *      U     0      0        0 xenbr1   *      U     0      0        0 xenbr2
default         prague03-lab-co         UG    0      0        0 xenbr2

Temporarily it can be fixed by:

route del -net  netmask dev xenbr1

However this change is not saved – so it’ll not survive reboot.

Final solution is to use xsconsole and “Network and Management Interface” /  “Emergency Network Reset” –  this function will reboot host.

Migrating xend virtual machines to xapi platform (XCP/XenServer)

Xen hypervisor has currently 3 tool stacks : xend + xm (which is now deprecated),   xl (new low level tool) and xapi+xe.   xapi is most advanced and it is used in XenServer (and XCP , but it is now also deprecated because XenServer is now open source).  Recently I have been migrating some virtual machines from Xen 4 with xend to XenServer  6.2. Below are details of migrating linux machines to new environment. Continue reading Migrating xend virtual machines to xapi platform (XCP/XenServer)