Open main menu
Home
Random
Log in
Settings
About Sugar Labs
Disclaimers
Sugar Labs
Search
Changes
← Older edit
Newer edit →
Sysadmin/Migrate virtual machine
(view source)
Revision as of 18:13, 14 January 2012
226 bytes added
,
18:13, 14 January 2012
no edit summary
Line 1:
Line 1:
=== How to migrate a file-based guest to LVM (online method) ===
=== How to migrate a file-based guest to LVM (online method) ===
−
* First,
create
the
logical volume
and
attach it to the running VM
:
+
* First,
take a copy of
the
kernel
and
initrd
:
treehouse# scp VMNAME:/boot/{vmlinuz,initrd}-2.6.31-22-server /srv/vm/kernel/ubuntu/
treehouse# scp VMNAME:/boot/{vmlinuz,initrd}-2.6.31-22-server /srv/vm/kernel/ubuntu/
+
+
* Then, create the logical volume and attach it to the running VM:
+
treehouse# virsh vol-create-as treehouse VMNAME-root 10G
treehouse# virsh vol-create-as treehouse VMNAME-root 10G
treehouse# virsh attach-disk VMNAME /dev/treehouse/VMNAME-root vdc
treehouse# virsh attach-disk VMNAME /dev/treehouse/VMNAME-root vdc
Line 45:
Line 48:
=== How to migrate a file-based guest to LVM (offline method) ===
=== How to migrate a file-based guest to LVM (offline method) ===
+
+
This method works by taking down the virtual machine during the migration and mounting the
+
partition inside the hard drive image. Mounting qcow2 files require a fancier method.
* Determine the offset of the root partition within the raw disk image:
* Determine the offset of the root partition within the raw disk image:
Bernie
Bureaucrats
,
Check users
,
Administrators
1,784
edits