[Users] Making v2v easier?

Amedeo Salvati amedeo at oscert.net
Sun Jan 19 15:34:47 UTC 2014


Il 19/01/2014 06:55, Blaster ha scritto:
> On Jan 18, 2014, at 2:25 AM, Amedeo Salvati <amedeo at oscert.net> wrote:
>
>> regarding virtio drivers, on linux, and if your kernel support them, you can recreate / regenerate initram f.s., and then you can boot your vm linux coming from vmware with virtio drivers... same process when doing p2v or v2p
>>
> Do you have a good tutorial on this?  I was wondering if this would be a needed step when doing a P2V.  It would be nice if the virtio drivers were included by default.
>
>
>
no I haven't any tutorial... but it's not so complicated; if your 
physical host has recent kernel they have support for virtio drivers (I 
don't remember from which exactly  rhel version virtio was included, but 
probably was rhel5.4, and on ubuntu 10.04 also was included)

the only things to pay attention is to regenerate initramfs for the new 
virtual env, because when you installed a physical machine, it detected 
what drivers they could use to boot (for example on hp DL|BL it could be 
cciss driver, and so initram f.s. on those hosts has cciss.ko module to 
properly access to hp smart array disks)

so you can check your current initramfs of physical host, if has virtio 
drivers by simply decompress it:

mkdir /tmp/initram
cp -p /boot/initramfs-2.6.32-431.el6.x86_64.img /tmp/initram/ <--- use 
your current kernel version
cd /tmp/initram/
mv initramfs-2.6.32-431.el6.x86_64.img 
initramfs-2.6.32-431.el6.x86_64.img.gz
gunzip initramfs-2.6.32-431.el6.x86_64.img.gz
cpio -idv < ./initramfs-2.6.32-431.el6.x86_64.img

now you can check if there are virtio drivers by:
find /tmp/initram/lib/modules/2.6.32-431.el6.x86_64 -name '*virtio*'
/tmp/initram/lib/modules/2.6.32-431.el6.x86_64/kernel/drivers/virtio
/tmp/initram/lib/modules/2.6.32-431.el6.x86_64/kernel/drivers/virtio/virtio.ko
/tmp/initram/lib/modules/2.6.32-431.el6.x86_64/kernel/drivers/virtio/virtio_ring.ko
/tmp/initram/lib/modules/2.6.32-431.el6.x86_64/kernel/drivers/virtio/virtio_pci.ko
/tmp/initram/lib/modules/2.6.32-431.el6.x86_64/kernel/drivers/scsi/virtio_scsi.ko
/tmp/initram/lib/modules/2.6.32-431.el6.x86_64/kernel/drivers/block/virtio_blk.ko


if there aren't you must regenerate it by using:
dracut on rhel6
mkinitramfs on debian/ubuntu
mkinitrd on rhel5, suse and gentoo

HTH

p.s. if I remember I've rebuilded initram f.s. only on rhel4|5 on p2v 
and v2p, and obviously for virtio drivers and cciss driver (v2p)

-- 
Amedeo Salvati
RHC{DS,E,VA} - LPIC-3 - UCP - NCLA 11
email: amedeo at oscert.net
email: amedeo at linux.com
http://plugcomputing.it/redhatcert.php
http://plugcomputing.it/lpicert.php




More information about the Users mailing list