KVM V2V

最後更新: 2017-06-13

 


ESXi 2 KVM

 

Enable virtio

# 看看系統是否支持 virtio

find / -name "virtio_blk*"

/lib/modules/2.6.32-642.15.1.el6.i686/kernel/drivers/block/virtio_blk.ko
...

# 在 /etc/modprobe 加入

virtio_balloon
virtio_net
virtio_blk

# rebuild initrd.*

update-initramfs -u

dracut [OPTION]... <image>  <kernel-version>

 


KVM 2 ESXi

 

Linux

qemu-img convert -p -f qcow2 -O vmdk -o compat6 centos7.qcow2 centos7-new.vmdk

wget -O centos7-new.vmdk http://Source-IP

vmkfstools -i centos7-new.vmdk -d thin centos7.vmdk

centos7.vmdk
centos7-flat.vmdk

open the newly created vmdk file in vi and
change the line ddb.adapterType from ide to "lsilogic"

# The Disk Data Base
#DDB

# ddb.adapterType = "ide"
ddb.adapterType = "lsilogic"

Windows (Windows 2008 and Windows 7 )

建立 VM 有 SAS 先.

 * 勿用 sysprep !! 否則 MSSQL 會有問題

It have the LSI SAS driver installed by default, but they require a registry key to activate it:

Confirm that the target machine has lsi_sas.sys present in the C:\Windows\System32\Drivers directory.

This should be included by default during the installation of Windows.

    Power on a working Windows 2008 or Windows 7 virtual machine.

    regedit -> right-click Export:

    Export HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LSI_SAS

    Import the registry keys from step 4 into the source system to be converted.

# 主要是這 Value 不同
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\LSI_SAS]
"Start"=dword:00000000

    Note: Before making any registry modifications, ensure that you have a current and valid backup of the registry and the virtual machine.

    Restart the source system to complete installation.

 

Example: Server 2008R2 V2V

SRC(10.0.0.1)   -->   DST(10.0.0.2)

shutdown SRC & take snapshot

Poweron SRC, backup lsi_sas & load lsi_sas.reg in SRC

resize partation with systemrescuecd

export mbr.bin

scp mbr.bin to DST

reboot SRC for check disk

load mbr.bin & reboot

clonezilla vda, vdb

set dest. nic ip

附加檔案大小
lsi_sas.reg1.78 KB

Creative Commons license icon Creative Commons license icon