Debian P2V

Un article de Bulles.
Révision datée du 10 mars 2008 à 22:28 par Philippe (discussion | contribs)
(diff) ← Version précédente | view current revision (diff) | Version suivante → (diff)
Aller à : navigation, rechercher

Debian Physical to Virtual -- Brain dump; this is very basic...

Prepare

Create the Debian Virtual Machine which will receive the Physical Machine data

Code: shell

xen-create-image --hostname=...

Synchronise

Synchronize data at any time:

Code: shell

mount /dev/<path to disk image> /mnt
rsync \
       --verbose \
       --archive \
       --numeric-ids \
       --hard-links \
       --exclude=/tmp \
       --exclude=/proc \
       --exclude=/dev \
       --exclude=/sys \
       --compress \
       --rsh=ssh \
       <physical machine>:/ \
       /mnt/
umount /mnt

Note: if the --delete option is used, we need to re-add the modules from the Xen Kernel afterwards...

Migrate

  1. Shutdown all services but ssh on the source server
  2. Synchronize (as above)
  3. Free / change IPs from the source server
  4. Mount / chroot to the disk image
    • Install libc6-xen
    • Cleanup fstab
    • ...
  5. Unmount the image
  6. Start the VM
  7. Configure for pygrub