Page 1 of 2 12 LastLast
Results 1 to 10 of 19

Thread: Moving a vm from vmware to kvm.

  1. #1
    Join Date
    Jul 2020
    Posts
    22

    Default Moving a vm from vmware to kvm.

    I'm looking to move a windows virtual machine in vmware's format to kvm as I'm so tired of kernel updates breaking vmware. I've read some internet article that state you have to convert the disk, I just wanted to see if anyone here has done this and the easiest way to achieve this would be. It's a windows 10 image. The following url is what I'm looking at doing! Has anybody taken this route or is there another way that's better.

    https://stafwag.github.io/blog/blog/...achine-to-kvm/

    Another question is, can I create a subvolume for my virtual machines off of / and turn off cow since I'm reading it's bad for performance? I wanted to use just one drive and TW has the entire drive so I'd like to just create a subvolume.

  2. #2
    Join Date
    Aug 2010
    Location
    Chicago suburbs
    Posts
    14,260
    Blog Entries
    3

    Default Re: Moving a vm from vmware to kvm.

    I'm not using any windows VM, so I don't know for sure what would work.

    If it were me, I would probably download the "clonezilla live" CD (or iso). Then I would boot the VMware system from that, and see if I can make a backup to an external drive. The next step would be to create a KVM machine with suitable parameters, and boot that to the "clonezilla live" iso. And then see if I can restore from the backup.
    openSUSE Leap 15.2; KDE Plasma 5.18.5;

  3. #3
    Join Date
    Sep 2012
    Posts
    5,849

    Default Re: Moving a vm from vmware to kvm.

    Quote Originally Posted by Neal View Post
    I've read some internet article that state you have to convert the disk... It's a windows 10 image.
    Converting disk image format is trivial. The real problem is potentially different underlying hardware.

    Make sure you know current configuration, what devices are used to access boot disk. You will need to use the same hardware in definition of QEMU VM. In the worst case you may need to migrate Windows to some standard adapter first, common to VMware and QEMU. Same is likely true for video, reset to standard VGA until you migrated and installed suitable QEMU drivers.

  4. #4
    Join Date
    Jun 2008
    Location
    San Diego, Ca, USA
    Posts
    12,574
    Blog Entries
    2

    Default Re: Moving a vm from vmware to kvm.

    Check first whether your current disk format is supported by your new virtualization.
    If it is, then copy the diskfile and try to create a virtual machine using it.

    If the current disk format is not supported or you just want to change to something else, then do a search "convert ..... to ..." and run the utility. If you're not sure whether you found the right utility, post here and ask first. BTW - It's why I generally build my Production machines to use the "raw" disk format, although it might perform a little less than whatever the recommended might be, it's universally recognized by all virtualization.

    Recommendations before converting...
    - Consolidate your diskfile into one file. For this reason I always create my diskfiles as a single file instead of multiple files which is often the default (typically 2GB files which presumably is for deploying on 32bit file systems).
    - optimize your working physical disks first, a highly fragmented file on an HDD can take much longer than a disk where the files have been compacted and defragmented.
    - Prepare your diskfile by zero-ing out the empty space in the diskfile and compact it before converting.

    Ordinarily, your old system should run just fine in new virtualization, no matter the virtualization the virtualized hardware is known and embedded in the kernel nowadays. But if you do run into a problem then a number of imaging backup apps might fix the problem... Those apps are often created with the ability to restore to dissimilar hardware.

    TSU
    Beginner Wiki Quickstart - https://en.opensuse.org/User:Tsu2/Quickstart_Wiki
    Solved a problem recently? Create a wiki page for future personal reference!
    Learn something new?
    Attended a computing event?
    Post and Share!

  5. #5
    Join Date
    Jul 2020
    Posts
    22

    Default Re: Moving a vm from vmware to kvm.

    Quote Originally Posted by tsu2 View Post
    Check first whether your current disk format is supported by your new virtualization.
    If it is, then copy the diskfile and try to create a virtual machine using it.

    If the current disk format is not supported or you just want to change to something else, then do a search "convert ..... to ..." and run the utility. If you're not sure whether you found the right utility, post here and ask first. BTW - It's why I generally build my Production machines to use the "raw" disk format, although it might perform a little less than whatever the recommended might be, it's universally recognized by all virtualization.

    Recommendations before converting...
    - Consolidate your diskfile into one file. For this reason I always create my diskfiles as a single file instead of multiple files which is often the default (typically 2GB files which presumably is for deploying on 32bit file systems).
    - optimize your working physical disks first, a highly fragmented file on an HDD can take much longer than a disk where the files have been compacted and defragmented.
    - Prepare your diskfile by zero-ing out the empty space in the diskfile and compact it before converting.

    Ordinarily, your old system should run just fine in new virtualization, no matter the virtualization the virtualized hardware is known and embedded in the kernel nowadays. But if you do run into a problem then a number of imaging backup apps might fix the problem... Those apps are often created with the ability to restore to dissimilar hardware.

    TSU
    Thanks, it's just a windows 10 image that I was using under vmware on arch...and it's a single vmware virtual disk file. I'm just tired of every time a new kernel is installed vmware might or might not be able to compile a new driver so instead of all those headaches I'm going to try kvm with virt-manager for a replacement.


  6. #6
    Join Date
    Jun 2008
    Location
    San Diego, Ca, USA
    Posts
    12,574
    Blog Entries
    2

    Default Re: Moving a vm from vmware to kvm.

    Quote Originally Posted by Neal View Post
    Thanks, it's just a windows 10 image that I was using under vmware on arch...and it's a single vmware virtual disk file. I'm just tired of every time a new kernel is installed vmware might or might not be able to compile a new driver so instead of all those headaches I'm going to try kvm with virt-manager for a replacement.
    Once installed, ordinarily you shouldn't need to update again (with certain exceptions).
    1. Is why Tumbleweed is not recommended as a Production virtualization platform. And if home Users want to avoid major changes all the time, LEAP should be preferred over Tumbleweed.
    2. Verify that whatever app you've installed that requires kernel modules builds the modules with DKMS, it's a special package that should ordinarily auto update the kernel modules automatically when a new kernel is installed. Some apps like Virtualbox have recently started to include DKMS in its package dependencies or provide it as part of the installation, but ordinarily you have to add it yourself and usually it's as easy as just searching "dkms" and making sure the package is installed on your machine when you initially install or build your kernel modules.

    TSU
    Beginner Wiki Quickstart - https://en.opensuse.org/User:Tsu2/Quickstart_Wiki
    Solved a problem recently? Create a wiki page for future personal reference!
    Learn something new?
    Attended a computing event?
    Post and Share!

  7. #7
    Join Date
    Jun 2008
    Location
    Podunk
    Posts
    29,364
    Blog Entries
    15

    Default Re: Moving a vm from vmware to kvm.

    Hi
    AFAIK, QEMU will run the image without any conversion required.... else just use;

    Code:
    qemu-img convert -O qcow2 <image>.vmdk <image>.qcow2
    I'd also ensure it's on an xfs partition somewhere and just use the virt-manager to add as a storage pool.

    I have qemu here working a treat under Tumbleweed, never misses a beat after a kernel upgrade...
    Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890)
    SUSE SLE, openSUSE Leap/Tumbleweed (x86_64) | GNOME DE
    If you find this post helpful and are logged into the web interface,
    please show your appreciation and click on the star below... Thanks!

  8. #8

    Default Re: Moving a vm from vmware to kvm.

    Quote Originally Posted by malcolmlewis View Post
    Hi
    AFAIK, QEMU will run the image without any conversion required.... else just use;

    Code:
    qemu-img convert -O qcow2 <image>.vmdk <image>.qcow2
    I'd also ensure it's on an xfs partition somewhere and just use the virt-manager to add as a storage pool.

    I have qemu here working a treat under Tumbleweed, never misses a beat after a kernel upgrade...
    How does qemu compare to vb for feature set, e.g., usb 3 support?

  9. #9
    Join Date
    Jun 2008
    Location
    San Diego, Ca, USA
    Posts
    12,574
    Blog Entries
    2

    Default Re: Moving a vm from vmware to kvm.

    Quote Originally Posted by tanker_bob View Post
    How does qemu compare to vb for feature set, e.g., usb 3 support?
    Since qemu was absorbed into KVM, for most purposes including device I/O like USB, just running KVM would be your best solution.
    For special uses, primarily hardware platform compatibility like running on a different architecture than the x86 family like ARM, SPARC, i286, etc then qemu can provide a full emulation mode.

    I don't know if things have changed, but if you intend to manage with libvirt's vm-manager, it requires a decision to manage all your machines the same way... ie you need to choose KVM or QEMU. Don't know if you can make any exceptions by handcrafting the machine's config file.

    So,
    Best to nail down your requirements before exploring... unless you're just curious and have the time to explore.

    TSU
    Beginner Wiki Quickstart - https://en.opensuse.org/User:Tsu2/Quickstart_Wiki
    Solved a problem recently? Create a wiki page for future personal reference!
    Learn something new?
    Attended a computing event?
    Post and Share!

  10. #10
    Join Date
    Jun 2008
    Location
    Podunk
    Posts
    29,364
    Blog Entries
    15

    Default Re: Moving a vm from vmware to kvm.

    Quote Originally Posted by tanker_bob View Post
    How does qemu compare to vb for feature set, e.g., usb 3 support?
    Hi
    What user Tsu2 says I have special requirements, gpu and sata pass-through (well and USB...) I see no reason KVM and virt-manager won't do what you need... Nothing stopping you from using both, eg to spin up a live USB image to try out..
    Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890)
    SUSE SLE, openSUSE Leap/Tumbleweed (x86_64) | GNOME DE
    If you find this post helpful and are logged into the web interface,
    please show your appreciation and click on the star below... Thanks!

Page 1 of 2 12 LastLast

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •