Page 2 of 2 FirstFirst 12
Results 11 to 19 of 19

Thread: Moving a vm from vmware to kvm.

  1. #11
    Join Date
    Jul 2020
    Posts
    22

    Default Re: Moving a vm from vmware to kvm.

    Just reporting back...I followed the link in the original post I made and it worked fine. I had split files so I used vmware tools to merge them into one vmdk file and then converted that into a qcow2 and imported it via virt-manger. It booted right up! The only issue I ran into was when I installed the virto drivers as shown in the howto. The fedora virt drivers installed just fine but changing the disk from sata to virto would cause it to blue screen. The solution was to use bcdedit like the following and it worked like a charm. Just reporting back for documentation purposes.

    https://superuser.com/questions/1057...disk-to-virtio


    1. Open an elevated command prompt and set the VM to boot into safe mode by typing
      bcdedit /set {current} safeboot minimal
    2. shut-down the VM and change the boot device type to virtio.
    3. boot the VM. It will enter in safe mode.
      Note: In Safe mode all boot-start drivers will be enabled and loaded, including the virtio driver. Since there is now a miniport installed to use it, the kernel will now make it part of the drivers that are to be loaded on boot and not disable it again.
    4. in the booted VM reset the bcdedit settings to allow the machine to boot into the Normal mode by typing (in elevated command prompt again):
      bcdedit /deletevalue {current} safeboot
    5. Done.

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

    Default Re: Moving a vm from vmware to kvm.

    Quote Originally Posted by Neal View Post
    Just reporting back...I followed the link in the original post I made and it worked fine. I had split files so I used vmware tools to merge them into one vmdk file and then converted that into a qcow2 and imported it via virt-manger. It booted right up! The only issue I ran into was when I installed the virto drivers as shown in the howto. The fedora virt drivers installed just fine but changing the disk from sata to virto would cause it to blue screen. The solution was to use bcdedit like the following and it worked like a charm. Just reporting back for documentation purposes.

    https://superuser.com/questions/1057...disk-to-virtio


    1. Open an elevated command prompt and set the VM to boot into safe mode by typing
      bcdedit /set {current} safeboot minimal
    2. shut-down the VM and change the boot device type to virtio.
    3. boot the VM. It will enter in safe mode.
      Note: In Safe mode all boot-start drivers will be enabled and loaded, including the virtio driver. Since there is now a miniport installed to use it, the kernel will now make it part of the drivers that are to be loaded on boot and not disable it again.
    4. in the booted VM reset the bcdedit settings to allow the machine to boot into the Normal mode by typing (in elevated command prompt again):
      bcdedit /deletevalue {current} safeboot
    5. Done.
    Your need to edit the Windows bootloader suggests that your Fedora does not boot from the same GRUB2 as your openSUSE.
    Instead, your system appears to boot into GRUB2 (Tumbleweed), then chainloads into BCD (Windows) then into GRUB2) Fedora.
    If it's working, I wouldn't advise modifying your boot sequence but if you run into problems in the future, you could probably make an entry in your openSUSE GRUB2 to boot directly to Fedora.

    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!

  3. #13
    Join Date
    Jun 2008
    Location
    San Diego, Ca, USA
    Posts
    12,586
    Blog Entries
    2

    Default Re: Moving a vm from vmware to kvm.

    Regarding the virtio drivers for a Windows Guest on KVM,
    The Fedora ISO you seem to have used looks like a good option and of course can work because installing Fedora built virtio drivers in Windows has nothing to do with what is happening on the openSUSE HostOS although there are a few things you can or should do (I'll provide links below).

    First, if someone didn't install virtio drivers from a Fedora build, you can clone the drivers from Github (into your Windows)
    The problem with using the Github drivers is that they are unsigned (by Microsoft) which will throw up repeated warnings.
    So, I recommend using the Fedora ISO instead which at least is signed by RHEL..
    https://www.linux-kvm.org/page/Windo...wnload_Drivers
    https://github.com/virtio-win/kvm-guest-drivers-windows


    https://docs.fedoraproject.org/en-US...ers/index.html
    https://fedorapeople.org/groups/virt...virtio-win.iso


    On your HostOS, there are a number of ways you can expose virtio to the Guest...
    For just the disk you can rely on the reference link in the @OP original post but there can be much more...
    For common settings, search "virtio" in the following document
    https://doc.opensuse.org/documentati...qemu-host.html

    For a more extensive description of virtio settings which includes everything in the above documentan (search "virtio" in the document)
    https://doc.opensuse.org/documentati...tml/book.virt/

    HTH,
    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!

  4. #14
    Join Date
    Jun 2008
    Location
    Podunk
    Posts
    29,373
    Blog Entries
    15

    Default Re: Moving a vm from vmware to kvm.

    Quote Originally Posted by tsu2 View Post
    Regarding the virtio drivers for a Windows Guest on KVM,
    The Fedora ISO you seem to have used looks like a good option and of course can work because installing Fedora built virtio drivers in Windows has nothing to do with what is happening on the openSUSE HostOS although there are a few things you can or should do (I'll provide links below).

    First, if someone didn't install virtio drivers from a Fedora build, you can clone the drivers from Github (into your Windows)
    The problem with using the Github drivers is that they are unsigned (by Microsoft) which will throw up repeated warnings.
    So, I recommend using the Fedora ISO instead which at least is signed by RHEL..
    https://www.linux-kvm.org/page/Windo...wnload_Drivers
    https://github.com/virtio-win/kvm-guest-drivers-windows


    https://docs.fedoraproject.org/en-US...ers/index.html
    https://fedorapeople.org/groups/virt...virtio-win.iso


    On your HostOS, there are a number of ways you can expose virtio to the Guest...
    For just the disk you can rely on the reference link in the @OP original post but there can be much more...
    For common settings, search "virtio" in the following document
    https://doc.opensuse.org/documentati...qemu-host.html

    For a more extensive description of virtio settings which includes everything in the above documentan (search "virtio" in the document)
    https://doc.opensuse.org/documentati...tml/book.virt/

    HTH,
    TSU
    Hi
    Before I switched to SATA pass through, the fedora drivers worked fine for windows, just need to select at install. I had a spare PCIe mini slot on my motherboard so just used that for a 4 port SATA controller now windows sits on a 60GB SSD
    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!

  5. #15
    Join Date
    Jul 2020
    Posts
    22

    Default Re: Moving a vm from vmware to kvm.

    Quote Originally Posted by tsu2 View Post
    Your need to edit the Windows bootloader suggests that your Fedora does not boot from the same GRUB2 as your openSUSE.
    Instead, your system appears to boot into GRUB2 (Tumbleweed), then chainloads into BCD (Windows) then into GRUB2) Fedora.
    If it's working, I wouldn't advise modifying your boot sequence but if you run into problems in the future, you could probably make an entry in your openSUSE GRUB2 to boot directly to Fedora.

    TSU

    I'm not sure what you're talking about, it's a window 10 vm that was converted from Vmware to kvm. Vmware used the sata driver so that's how windows was installed and now I wanted to use the virtio on kvm in place of the sata driver from which it was originally installed to use. Anyways...no chain loading anything I'm booting a windows vm from kvm.


  6. #16

    Default Re: Moving a vm from vmware to kvm.

    I'm not sure what the issue is. When I migrated my Win10 VM from VMWare to VirtualBox, I kept the vmdk format. I initially kept the vmdk format in KVM and carefully matched the VM's hardware characteristics to its VB setup. I had to combine all the snapshots and multi-parts (used the 2GB pieces format before) into one base disk file with a VB utility, but after that it all worked fine. I ended up converting the vmdk format to KVM's qcow2 using qemu-img as described earlier in this thread. That went perfectly and that's the VM disk that I'm using now. No boot issues along the way, other than KVM not reading the 2GB-each multi-part format from VB, which was easily fixed by combining them all together with the VB utility. Be sure to select the newest VB snapshot when combining.

  7. #17
    Join Date
    Sep 2012
    Posts
    5,853

    Default Re: Moving a vm from vmware to kvm.

    Quote Originally Posted by tanker_bob View Post
    I initially kept the vmdk format in KVM and carefully matched the VM's hardware characteristics to its VB setup.
    One obvious difference is that hard disk identification changes - different vendor, different product. I think, it is enough to invalidate Windows activation. E.g. QEMU hard disks have "QEMU HARDDISK" as vendor/device. Did you also emulate original HDD inquiry information?

    Also overall system information is changed (different system vendor, BIOS version, ACPI tables etc). E.g. on QEMU it returns DMI: QEMU Standard PC, while on VMware it is obviously something entirely different.

    Both motherboard and hard disk change definitely will result in activation error.

  8. #18
    Join Date
    Jan 2018
    Location
    Canada
    Posts
    152

    Default Re: Moving a vm from vmware to kvm.

    I had two oem licensed w10 pro virtualbox vm's. One started as a licensed Windows 7 vm, the other as a Windows 8 vm. They were both upgraded through promotions at the time to w10. I just converted both to KVM and the licenses were reported as invalid, and I was given the choice to buy activations or repair them. I chose repair, that my hardware had changed and when logged into my MS account I was able to select the appropriate existing license and they are now licensed under KVM. I don't know if it had any effect in the end, but when I set the KVM vm up, I used my VB machine uuid for the KVM uuid.

    I was surprised this reactivation worked, given that they were both oem licenses and not eligible for moving to new "hardware".

  9. #19

    Default Re: Moving a vm from vmware to kvm.

    Quote Originally Posted by arvidjaar View Post
    One obvious difference is that hard disk identification changes - different vendor, different product. I think, it is enough to invalidate Windows activation. E.g. QEMU hard disks have "QEMU HARDDISK" as vendor/device. Did you also emulate original HDD inquiry information?

    Also overall system information is changed (different system vendor, BIOS version, ACPI tables etc). E.g. on QEMU it returns DMI: QEMU Standard PC, while on VMware it is obviously something entirely different.

    Both motherboard and hard disk change definitely will result in activation error.
    Yes, the activation would be lost. I lost the activation on my VM when I moved from VMWare to VirtualBox several years ago, so it wasn't a player going to KVM. I have moved several times since I initially installed Win10 in the VM, and cannot find the original disk or its codes, so it is what it is. The VM works fine, so no worries. I'm not going to pay MS twice for the same thing because of their activation nonsense. I paid for it once and that's good enough.

Page 2 of 2 FirstFirst 12

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
  •