Converting vmware vmdk images to kvm qcow2 images
Red hat certifications are one of the most demanding in the IT industry. I wanted to get started with planning working towards getting RHCE certified. While preparing for RHCE certification one of the recommended book is Red Hat RHCSA/RHCE 7 Cert Guide: Red Hat Enterprise Linux 7 (EX200 and EX300). I had brought this book on amazon, it comes with lab guides and vm images that can be used to try the practicals listed in the book.
The vm images shipped were of extension .vmdk native to vmware. On my current laptop fedora is running as a primary os, I had to convert the images from .vmdk to .qcow2 format. When booted from the converted images I ran into booting issues, also the vm’s had predefined network settings custom gateway set, when booted from kvm it was fetching ip from the dhcp rather than taking the network settings from configuration files.
qemu-img convert -f qcow2 -O qcow2 server1.vmdk server1.qcow2
qemu-img convert -f raw -O qcow2 server1.img server1.qcow2
sudo rm /etc/udev/rules.d/70-persistent.rules
NetworkManager has to be disabled/masked as it caused conflict with network service:
sudo systemctl mask NetworkManager
sudo systemctl restart network
virsh net-list
virsh net-destroy cipher-nat2
virsh net-edit cipher-nat2
virsh net-start cipher-nat2
After this the vm’s imported will have the intended network configuration and can be used with kvm hypervisor.
Related Articles
Converting vmware vmdk images to kvm qcow2 images
Red hat certifications are one of the most demanding in the IT industry, I wanted to get started with planning working towards getting RHCE certified.
No internet on kvm guests.
After setting up bridge network on network interface enp9s0, kvm guests had issues with accessing ssh, internet.
Virt-manager error on fedora 26
virt-manager is a graphical tool to manage KVM VMs on a host, due to some dependency or reinstall of libvirt can cause virt-manager to show ImportError: No module named libvirt.