New on LowEndTalk? Please Register and read our Community Rules.
All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
Converting VMWare to KVM
Hello guys,
Anyone tried to convert VMWare to KVM VPS? I have a VMWare template for a VOIP system, which I want to run on a KVM VPS. It is running CentOS. The developer has refused to provide installation script, so it's either this or getting a VMWare VPS somewhere.
I tried to do direct disk-to-disk migration, but I was not even able to get it to boot to convert the drivers (which is expected I guess).
I also tried virt-v2v tool, suggested on Redhat articles, but that failed as well when running qemu (prelimininary steps).
Anyone has any other suggestions on how to approach this?
Comments
Are you running any particular control panel on the target KVM node or just plain KVM?
On the target node I have Virtualizor with KVM module. Do I need just plain KVM?
I converted linux based server for a customer that migrated to me a few years ago, have you tried info on the virtualizor site for VMDK / VHD ?
https://www.virtualizor.com/docs/faq/create-vps-with-vmdk-vhd/
Unfortunately not a viable option, as my VMWare template has multiple .vmdk files.
May I ask what VOIP system you're running?
The one, this thread is about, is the free MOR version by Kolmisoft. Otherwise, I was running MagnusBilling.
I did it many times. You need the qemu-img tool. Then:
qemu-img convert guest.vmdk guest-s001.vmdk guest-s002.vmdk guest-s003.vmdk guest-s004.vmdk guest-s005.vmdk guest.qcow2
Or, if you need a .raw img:
for i in *.vmdk; do qemu-img convert -f vmdk $i -O raw $i.raw; done
cat *.raw > tmpImage.raw
qemu-img convert tmpImage.raw finalImage.qcow2
Have you tried clonezilla? Disk to image?
Yes.
I'll try that now.
I am trying first method and second file in the row(obviously replaced names properly) got detected as invalid argument.
Try to add -p -f vmdk -O qcow2
I think VMWare can convert several vmdk files into one vmdk file, which can be used with qemu.
I read somewhere that qemu-img can look for extra disks in the folder and I needed to specify only first one. I managed to convert it this way to an .img file and dd-ed the resulting disk into a VPS's existing disk as per Virtualizor instructions and booted into recovery console (dracut-initqueue timeout) with a warning that it was unable to find the VPS's partitions. I'll see what I can make of this later. Thanks for the tips, so far.
@Radi
Try https://www.starwindsoftware.com/starwind-v2v-converter. I didn't have luck P2V for bare metal Windows on ESXi, but I suspect you'll have better luck with centos.
Tried it, no luck. Same situation as converting with qemu-img.
CSM/MBR vs EFI/GPT?
Lastly, long way around, boot it up in VMWare. Install Veeam agent. Restore on KVM host.
A method that works everywhere:
1) Run the VMWare machine in rescue mode, using, for example, systemrescuecd.
2) Start a network with a public IP.
3) Install rsync (but I assume it already exists in systemrescuecd).
4) Mount your VMWare machine disk in /mnt
5) Start your KVM machine in rescue mode
6) Start a network with a public IP.
7) Mount your KVM machine's disk in /mnt
8) Install rsync.
9) Run rsync with the parameters to copy files from VMWare to the KVM machine.
10) Check that rsync copied your files correctly.
11) Unmount the KVM drive and run fsck -a on it.
12) Reboot the KVM machine and watch the boot process via VNC.
For Linux based machines the above instructions should work.
Easy to fix: sudo dracut --regenerate-all --force
https://linuxconfig.org/how-to-build-an-initramfs-using-dracut-on-linux for more info.
Command not found in the emergency shell. blkid is unable to detect the disk at all.
https://access.redhat.com/solutions/1282013
I guess, I'll be looking for a VMWare VPS to host this thing. Any VMWare providers, feel free to post offers here.
LF: 4 GB RAM, 50 GB Disk, 1 IPv4, Reasonable amount of bandwidth (100 Mbps port is also fine), Option to bring my own .vmdk file for the disk storage(if no, also fine - i'll just rsync from my VMWare player host).
@Mods can make this a request thread or if it is not allowed, I'll make a new one.
Check out GleSYS, www.glesys.com (their VMWare line is more expensive than their KVM line though, but they're very stable).
NVM .. €61.71. They're much much much cheaper when it comes to KVM.
@Radi Check Aruba Cloud. With Cloud Pro they give you vSphere access and you can import your own VM. If you give me a link to download this virtual machine, I will take a look at it.
Edit: If I were you, I would just download Vmware Workstation, import the machine there and then export it to .ova. Then I would ask a provider to import such a machine for me (even on KVM).
Edit 2: I have just successfully imported the machine into Proxmox.
Firstly, I wouldn't use this system because sharing a virtual machine by transferring all its files instead of using the export option is very unprofessional. You can see that the person who created this virtual machine did not know what the creation of such a machine was about. Still the Centos ISO is connected to the cdroom. Everything is packed in RAR! Really? Who is still using RAR?
You need to do:
1. Import the machine into Vmware Workstation
2. Use the export to ovf option but change the file extension to ova.
3. Unpack everything because ova is just a compressed tar. There will be one vmdk file in it.
4. Import your vmdk file to your server.
You can also skip steps 3 and 4 and import ova immediately if your system can do so.
If you want, I can send you the .ova or the .vmdk file itself, just write if you need it from the M4_10cc or MOR10cc machine.
I've done something similar before: use VMware vdiskmanager to combine the vmdks into a single one and then you can convert it with qemu-img.
https://cloudopszone.com/how-to-merge-multiple-vmdks-into-single-vmdk/