Wednesday, October 7, 2009

Basic virt-p2v Configuration

After a successful P2V conversion with virt-p2v Live CD, you might need to re-define your new Virtual Machine, to do that, copy one of the XML config file below and define your img with "virsh define config.cfg"


#virt-p2v quiet usefull program but its cfg file needs to be fixed

#This is for Physical to Full Virtualization

<domain type='xen' id='5'>

<name>Deneme1</name>

<uuid>78f732b0-320a-b9bd-749d-053b37968512</uuid>

<memory>1048576</memory>

<currentMemory>1048576</currentMemory>

<vcpu>1</vcpu>

<os>

<type>hvm</type>

<loader>/usr/lib/xen/boot/hvmloader</loader>

<boot dev='hd'/>

</os>

<features>

<acpi/>

<apic/>

<pae/>

</features>

<clock offset='utc'/>

<on_poweroff>destroy</on_poweroff>

<on_reboot>restart</on_reboot>

<on_crash>restart</on_crash>

<devices>

<emulator>/usr/lib64/xen/bin/qemu-dm</emulator>

<disk type='file' device='disk'>

<driver name='file'/>

<source file='/var/lib/xen/images/p2v-localhost_localdomain-200909291050-hda.img'/>

<target dev='hda' bus='ide'/>

</disk>

<disk type='file' device='cdrom'>

<target dev='hdc' bus='ide'/>

<readonly/>

</disk>

<interface type='bridge'>

<mac address='00:16:3e:80:bd:48'/>

<source bridge='xenbr0'/>

<script path='vif-bridge'/>

<target dev='vif5.0'/>

</interface>

<serial type='pty'>

<source path='/dev/pts/1'/>

<target port='0'/>

</serial>

<console type='pty' tty='/dev/pts/3'>

<source path='/dev/pts/3'/>

<target port='0'/>

</console>

<input type='mouse' bus='ps2'/>

<graphics type='vnc' port='5905' autoport='yes' keymap='en-us'/>

</devices>

</domain>

#This is for Physical to ParaVirtualization, Physical server should be set as Xen Kernel-ed before convertion

<domain type='xen'>

<name>vA2E-0</name>

<uuid>99f969f4-1023-e1ee-8d0f-0b016fd2b166</uuid>

<memory>4194304</memory>

<currentMemory>4194304</currentMemory>

<vcpu>2</vcpu>

<bootloader>/usr/bin/pygrub</bootloader>

<os>

<type arch='x86_64' machine='xenpv'>linux</type>

<kernel>/var/lib/xen/boot_kernel.CpFtTy</kernel>

<initrd>/var/lib/xen/boot_ramdisk.QOTH_r</initrd>

<cmdline>ro root=/dev/VolGroup00/LogVol00 console=xvc0 rhgb quiet</cmdline>

</os>

<clock offset='utc'/>

<on_poweroff>destroy</on_poweroff>

<on_reboot>restart</on_reboot>

<on_crash>restart</on_crash>

<devices>

<disk type='file' device='disk'>

<driver name='tap' type='aio'/>

<source file='/var/lib/xen/images/vA2E-0.img'/>

<target dev='xvda' bus='xen'/>

</disk>

<interface type='bridge'>

<mac address='00:16:36:4b:d5:d0'/>

<source bridge='xenbr0'/>

<script path='vif-bridge'/>

<target dev='vif49.0'/>

</interface>

<serial type='pty'>

<source path='/dev/pts/1'/>

<target port='0'/>

</serial>

<console type='pty'>

<target port='0'/>

</console>

<input type='mouse' bus='ps2'/>

<graphics type='vnc' port='5905' autoport='yes' keymap='en-us'/>

</devices>

</domain>


I hope you find it useful

Typhoon Master

No comments:

Post a Comment