How to switch from VMware vmdk to the disk format that can be started by KVM

Source: Internet
Author: User
Tags vmware server

The VMware system consists of two disks in raw format: the old boot diskand the second one. It is Windows 2000 Server Guest OS.

    1. Create empty new boot image (use dd ).
    2. Boot stand alone OS from any other disk with old boot disk and new boot image connected (that is at least 3 disks ).
    3. Sign up, make partition and format the new disk (do not make volume ).
    4. Xcopy/E/C/R/h/k/O/x/y old_boot_disk: \ new_boot_disk :\
    5. Copy boot. ini from new boot disk to the second one (that is not boot disk ).
    6. Edit boot. ini on the second disk to boot from RDISK (1)
    7. Swap disks: New <-> second.
    8. Boot setup from Cd and go on repair procedure (after licence agreement) for the new boot disk.
    9. Fdisk new boot image and toggle boot flag.
    10. Swap disks back: Second <-> New.
    11. Boot from the new disk.
    12. Remove VMware Tools and devices.
    13. Reboot and be happy.

That's all.

P. s. to swap disks and edit boot. INI (items 5, 6, 7, 10) shocould be excludedif the boot disk is named C:, that is right in most cases. those items arefor strange case, when boot disk is D: and second one is C :.

 

Starting at v0.12, qemu-KVM has native support to VMware's Disk Images V6 (seems to be compatible with V7, used by VMware Server ). so VMware images can cocould be run with qemu-KVM without any modification (Make backups and do it at your own risks though !).

Look at your vmx configuration file:

    • Scsi0: 0. filename ="Zimbra-000001.vmdk"
    • UUID. BIOS ="56 4D 3f 3D 32 80 5B f2-94 31 21 C9 B2 C3 93 B9"
    • Ethernet0.generatedaddress ="00: 0C: 29: C3: 93: B9"

And then build the command-line:

KVM-drive file =Zimbra-000001.vmdk, Boot = on \
-Net Nic, macaddr =00: 0C: 29: C3: 93: B9-NetTap\
-UUID564d3f3d-3280-5bf2-9431-21c9b2c393b9

The UUID is optional, but might be useful for applications using it for validation (I. e. Windows), and the MAC address as well.

Second way cocould be to convert the disk image:

 
KVM-IMG convert-oQcow2 Zimbra-000001.vmdk Zimbra. qcow2

1. Install KVM, that is, yum install kvmkvm-kmod

 


2. Use the qemu-IMG command to convert the format:
Qemu-IMG convert-O qcow2 political and legal commission system. vmdkdisk. qcow2
Convert disk to qcow2 format (uppercase O)


3. Use the KVM command to start the disk:
KVM-M 512-drive file = disk. qcow2, boot = on-netnic
-M specifies the memory size and-net specifies the NIC.
There are many parameters for the KVM command. You can use mankvm to add the required parameters.


4. if an error occurs when running the KVM command on our system, run the following command:
Ln-S/usr/libexec/qemu-KVM/usr/bin/KVM

 

Http://www.linux-kvm.org/page/How_To_Migrate_From_Vmware_To_KVM

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.