Seite 1 von 1

SuSE Linux in VM übernehmen

Verfasst: 29.05.2005, 10:19
von lollobrigida
Wenn ich die Funktionsweise von P2V richtig verstanden habe, ist es hiermit möglich bestehende physische Windows Server in VMs zu überführen.
Wie mache ich dies mit bestehenden Linux-Systemen?
Gibt es hier auch eine existierende Lösung oder gar GPL-Tools?

Verfasst: 29.09.2005, 01:36
von devzero
Hallo !

Unter Linux ist das eigentlich unkomplizierter als unter Windows.

gemäss http://www.vmware.com/community/thread. ... 24&start=5 :

I do "manual Linux p2v" the following way:

1) Create a VM and install _nothing_
2) Boot the VM into Knoppix/grml or another live distro
3) create the same partition layout as it is on the source machine
4) format the partitions and mount them under /mnt/vm/partionA,B,C (so partition structure under /mnt/vm is the same as on the source system
5) set ip adress, start ssh, set root password
6) shutdown most of the services (especially databases...) on source machine to make sure, you won`t sync files which change during sync.
7) for every partition(A,B,C..) on the source-machine: rsync -av --one-file-system --numeric-ids -e ssh /partitionA,B,C... desthost:/mnt/vm/partitionA,B,C....
the --numeric-ids is important, otherwise you will run into trouble because uid`s change during rsync - e.g. user postfix has a different uid in knoppix than on the real host
8) chroot into /mnt/vm
9) re-Install bootloader - e.g. start "grub-install"
10) Turn off the source and boot into the new VM.
11) re-install network-card

I have successfully transformed an oracle-test-server into a VM with this.



Grüsse
Roland

SuSE Linux (Novell OES) in VM übernehmen

Verfasst: 31.01.2009, 10:54
von klockerh
Danke für die Anleitung - habe sie sinngemäß befolgt und war auf folgende Art erfolgreich (eigentlich ganz gemütlich, an einem Vormittag erledigt):

1. Eine neue, leere VM ("Ziel") mit dem selben Partitionslayout wie die PM erstellen.

2. Mithilfe von partimage (aus Knoppix)
a) alle Partitionen der PM (boot, swap, root) auf USB-Platte sichern.
b) alle Partitionen der VM von USB auf Ziel-VM einspielen.

3. Eine weitere virtuelle Maschine ("Hilf") mit dem selben Partitionslayout wie die PM erstellen, dort aber nur ein Minimalsystem installieren (wg. der Boot-Partition und den Hardwaretreibern).

4. Anpassung der Ziel-VM
a) boot-Partition von Hilf auf Ziel kopieren (partimage)
b) /lib/modules/`uname -r` von Hilf auf Ziel kopieren (cp -r)

Einmal neu starten - :D

PS: Die Übertragung eines nss-Pools ist etwas lästiger...

Verfasst: 31.01.2009, 15:21
von elgato319
Ich bevorzuge den Weg über Acronis bzw Ghost.
Man hat dann zwar eine gewisse Downtime, aber dafür kann ich mir auch sicher gehen das keine Datei mehr im Zugriff ist.

Verfasst: 31.01.2009, 17:13
von klockerh
elgato319 hat geschrieben:Ich bevorzuge den Weg über Acronis bzw Ghost.
Man hat dann zwar eine gewisse Downtime, aber dafür kann ich mir auch sicher gehen das keine Datei mehr im Zugriff ist.


Wenn ich in Knoppix boote (Live-CD bzw. ISO mounten) und partimage verwende ist das ja auch "kalt" geklont, oder? Zudem ist das kostenlos.

Die Downtime habe ich natürlich auch.