我需要将一些生产虚拟机从 Xen 4.2 迁移到 Citrix Xen 7.1。我对 Xen 经验很少。虚拟机磁盘是 LVM,请参阅以下信息。
一种可能的解决方案可能是执行以下操作,但我不确定:
qemu-img convert /dev/myvg/mylv -O vmdk myvolume.vmdk
有人知道迁移这些 Xen vm 的最佳方法吗?
信息:
xx-vm1:~ # xl info
host : xx-vm1
release : 3.0.76-0.11-xen
version : #1 SMP Fri Jun 14 08:21:43 UTC 2013 (ccab990)
machine : x86_64
nr_cpus : 4
max_cpu_id : 7
nr_nodes : 1
cores_per_socket : 2
threads_per_core : 2
cpu_mhz : 2992
hw_caps : bfebfbff:20100800:00000000:00000180:0000e4bd:00000000:00000001:00000000
virt_caps : hvm
total_memory : 16378
free_memory : 5988
sharing_freed_memory : 0
sharing_used_memory : 0
free_cpus : 0
xen_major : 4
xen_minor : 2
xen_extra : .2_04-0.7.5
xen_caps : xen-3.0-x86_64 xen-3.0-x86_32p hvm-3.0-x86_32 hvm-3.0-x86_32p hvm-3.0-x86_64
xen_scheduler : credit
xen_pagesize : 4096
platform_params : virt_start=0xffff800000000000
xen_changeset : 26064
xen_commandline : vga=mode-0x31a dom0_max_vcpus=2 dom0_vcpus_pin dom0_mem=2048M
cc_compiler : gcc (SUSE Linux) 4.3.4 [gcc-4_3-branch revision 152973]
cc_compile_by : abuild
cc_compile_domain :
cc_compile_date : Fri Jun 14 12:22:34 UTC 2013
xend_config_format : 4
..
xx-vm1:~ # virsh dumpxml xx-zcm
<domain type='xen' id='2'>
<name>xx-zcm</name>
<uuid>5e29bcc9-0dc8-6487-9577-e60b3a0a6497</uuid>
<description>None</description>
<memory unit='KiB'>4194304</memory>
<currentMemory unit='KiB'>4194304</currentMemory>
<vcpu placement='static'>2</vcpu>
<bootloader>/usr/bin/pygrub</bootloader>
<bootloader_args>-q</bootloader_args>
<os>
<type>linux</type>
<cmdline> </cmdline>
</os>
<clock offset='utc' adjustment='reset'/>
<on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot>
<on_crash>destroy</on_crash>
<devices>
<emulator>/usr/lib/xen/bin/qemu-dm</emulator>
<disk type='block' device='disk'>
<driver name='phy'/>
<source dev='/dev/disk/by-id/scsi-32027001378a8a714'/>
<target dev='xvda' bus='xen'/>
</disk>
<disk type='file' device='cdrom'>
<driver name='file'/>
<source file='/install/SLES-11-SP3-DVD-x86_64-GM-DVD1.iso'/>
<target dev='xvdb' bus='xen'/>
<readonly/>
</disk>
<interface type='bridge'>
<mac address='00:16:3e:36:ec:44'/>
<source bridge='br0.104'/>
<script path='/etc/xen/scripts/vif-bridge'/>
<target dev='vif2.0'/>
</interface>
<console type='pty' tty='/dev/pts/2'>
<source path='/dev/pts/2'/>
<target type='xen' port='0'/>
</console>
<input type='mouse' bus='xen'/>
<graphics type='vnc' port='5900' autoport='yes' keymap='en-us'/>
</devices>
</domain>
..
xx-vm1:~ # vgdisplay
--- Volume group ---
VG Name GW
System ID
Format lvm2
Metadata Areas 1
Metadata Sequence No 2
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 1
Open LV 0
Max PV 0
Cur PV 1
Act PV 1
VG Size 249.97 GiB
PE Size 32.00 MiB
Total PE 7999
Alloc PE / Size 7999 / 249.97 GiB
Free PE / Size 0 / 0
VG UUID wiLucJ-CEwG-PXyd-nLpw-Jygb-NYAG-9c8FCG
--- Volume group ---
VG Name xx-ns
System ID
Format lvm2
Metadata Areas 1
Metadata Sequence No 2
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 1
Open LV 0
Max PV 0
Cur PV 1
Act PV 1
VG Size 55.00 GiB
PE Size 4.00 MiB
Total PE 14079
Alloc PE / Size 14079 / 55.00 GiB
Free PE / Size 0 / 0
VG UUID hVxpBm-tXPD-bo7a-CPZz-zREz-44SO-OkGnfR
..
xx-vm1:~ # lvdisplay
--- Logical volume ---
LV Name /dev/GW/GW
VG Name GW
LV UUID KvZ6BU-2oJH-Secu-HvRA-LbcW-I8Og-8y1803
LV Write Access read/write
LV Creation host, time xx-smtp, 2014-07-23 18:47:18 -0700
LV Status NOT available
LV Size 249.97 GiB
Current LE 7999
Segments 1
Allocation inherit
Read ahead sectors auto
--- Logical volume ---
LV Name /dev/xx-ns/data
VG Name xx-ns
LV UUID lR1ctY-5gg2-gwlR-PUyC-xJVe-SH6M-sIc0Bq
LV Write Access read/write
LV Creation host, time xx-vm1, 2018-05-09 12:42:01 -0700
LV Status NOT available
LV Size 55.00 GiB
Current LE 14079
Segments 1
Allocation inherit
Read ahead sectors auto