migrating VMs from other XEN systems

75 views
Skip to first unread message

Michael Richardson

unread,
Jun 1, 2015, 5:33:10 PM6/1/15
to syn...@googlegroups.com
I know how to migrate VMs from a bare XEN platform to ganeti with DRBD.
I don't know how to customize the generated /etc/xen file to use my set of partitions, etc. (machines have multiple disks, LVMs spans across them, etc)
I'm afraid that Ganeti will mess up the files on me, so I think that I could somehow tell synnefo about the VMs and the details, but my impression
is that I can't do this with the snf-image or debootstrap backends; I need a new backend.
I consider writing one, in particular, one that just uses pvgrub as it's kernel.
Is there a way to go halfway...? I import with Ganeti, tell ganeti about my custom xen.cfg files, and then tell synnefo that the VMs exist, not to
mess with them, but allow tenants to start/stop the VMs through synnefo?  (most of the VMs are internal)


Christos Stavrakakis

unread,
Jun 12, 2015, 6:22:31 AM6/12/15
to syn...@googlegroups.com, Michael Richardson
--
You received this message because you are subscribed to the Google Groups "Synnefo" group.
To unsubscribe from this group and stop receiving emails from it, send an email to synnefo+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Hello Michael,

snf-image is used by Synnefo only during instance creation, so it is not really
relevant here.

The process to import your XEN instances to Synnefo contains two distinct
phases. The first phase involves importing your XEN instances into a Ganeti
cluster that is being used by Synnefo. I am not aware of the XEN configuration,
but I am sure you will get some help in the Ganeti mailing list.

Once you have the VM running under Ganeti, you can import it to Synnefo using
the 'snf-manage server-import' command. This command will shutdown the Ganeti
instance, rename it in order to match the Synnefo naming rule (snf-$id) and
then start it again.  e.g.

# snf-manage server-import --user=0683cdca-ae6b-43ee-8dc6-23546d4428bb
    --backend-id=1 --image=7b7d7308-a5d7-458c-a20c-2dcf01647c5e
    --flavor=1 instance-name

From this point, the instance can be managed by Synnefo and will belong to the
user that you specified above. The 'image' option does not play an important
role here, but is required from the API and it will be used in order to display
a proper icon in the Cyclades UI.

This command will fail to import the instance if it is connected to networks
that Synnefo is not aware. The easiest way will be to remove all instance NICs
before importing it, and then assign new ones using Synnefo.

Best,
Christos

PS: I played around with the server-import command and it seems it has some
    minor bugs. I have attached a small patch that should be applied to
    '/usr/share/pyshared/synnefo/logic/management/commands/server-import.py'.
    I will soon send a PR for this.

snf_import.patch

Vladimir Palii

unread,
Mar 6, 2018, 12:31:17 PM3/6/18
to Synnefo
Hello Christos,

We are experiencing same problems with migrating VM from another Ganeti cluster without synnefo management. 
When we are trying to import instance, we getting errors: 

#gnt-backup import -t plain --dry-run --src-node=node05 -n node05 instance23
Tue Mar  6 16:35:16 2018  - INFO: Resolved given name 'instance23' to 'instance23.scrumbled'
Failure: prerequisites not met for this operation:
error type
: wrong_input, error details:
OS
'debootstrap+default' not in supported OS list for node node05.scrumbled.com: Directory for OS debootstrap not found in search path


#gnt-os list
snf-image+default

#gnt-cluster version 
Software version: 2.10.7
Internode protocol: 2100000
Configuration format: 2100000
OS api version: 20
Export interface: 0
VCS version: (ganeti) version v2.10.3-27-gfcf69d1



My question, is it save to install debootstrap packages for cluster without harming to synnefo infrastructure...


Best regards,
Vladimir
Reply all
Reply to author
Forward
0 new messages