How to import Xen HVM domU into Ganeti 2.12?

97 views
Skip to first unread message

John N.

unread,
Nov 29, 2015, 9:23:02 AM11/29/15
to ganeti
Hello,

I can't seem to find any clear instructions or guide on how to simply import a Xen HVM domU into Ganeti 2.12. Can anyone help here?

My goal is to export my AsteriskNOW domU (CentOS) currently running on Xen 4.4 hypervisor on Debian 8 and to import it into my Ganeti 2.12 cluster also based on Debian 8 with Xen 4.4 hypervisor. That specific domU on my current Xen server is using LVM and on my ganeti instance I am also using LVM, maybe that make things easier...

Thanks in advance!
John

candlerb

unread,
Nov 30, 2015, 6:23:28 AM11/30/15
to ganeti
You need to create a new VM in ganeti with the appropriate paramters (-B minmem/maxmem/vcpus). It won't copy these from your xm settings.

The only thing you really need to deal with is the instance disk.

If your existing VM is a logical volume, and it already exists on the ganeti node and in the volume group that you will use with ganeti, then you can "adopt" it:

But if your ganeti machine is a different node then simply create a VM with a disk of the exact same size but leave it stopped (--no-start). Then you can dd the image from the old machine to the new logical volume.

If you created a drbd instance then don't dd to the logical volume directly, instead "activate" the disk first:
then you can dd to the drbd device.

Regards,

Brian.

John N.

unread,
Dec 2, 2015, 3:46:59 PM12/2/15
to ganeti
Hi Brian,

Thanks for help, I tried the adopt method as stated in the ganeti documentation and ran the following command:

# gnt-instance add -t plain -n iron1 --disk 0:adopt=asterisknow -B minmem=1024,maxmem=1024 --net 0:mac=aa:bb:cc:dd:ee:06 asterisknow

But got the following error message:

Failure: prerequisites not met for this operation:
error type: wrong_input, error details:
No guest OS or OS image specified

Actually I only have the debootstrap+default OS available for ganeti but the VM I am trying to migrate to ganeti is a CentOS image (AsteriskNOW). How can I deal with this issue?

Regards
J.

candlerb

unread,
Dec 3, 2015, 6:20:49 AM12/3/15
to ganeti
On Wednesday, 2 December 2015 20:46:59 UTC, John N. wrote:

But got the following error message:

Failure: prerequisites not met for this operation:
error type: wrong_input, error details:
No guest OS or OS image specified



Yes, you still need to define an OS, even though it's not being used for initial installation, because the OS definition can be needed later (e.g. it provides the scripts to export the image, and may be used if you ask ganeti to reinstall the OS)

I use ganeti-os-noop for this, i.e. "-o noop"
 
The export operation will do a raw dd block export, and the install/reinstall operations so nothing.

You need to install ganeti-os-noop of course.

John N.

unread,
Dec 3, 2015, 12:40:27 PM12/3/15
to ganeti
Thanks for the pointer regarindg ganeti-os-noop. I installed this OS definition and ran the same command as in my previous message but adding "-o noop" parameter. It worked but I have another issue now, somehow ganeti created this instance as a "xen-pvm" hypervisor type instance but this specific VPS is using HVM on my current VPS server so that under ganeti it does not boot.

How do I modify this instance now to force it to use xen-hvm instead of xen-pvm as hypervisor?

John N.

unread,
Dec 3, 2015, 1:14:18 PM12/3/15
to ganeti
Fantastic, it works! I needed to pass the "-H xen-hvm" option to gnt-instance.
Reply all
Reply to author
Forward
0 new messages