Category: Virtualization

  • Monitor VMware ESXi hardware without root (Nagios)

    Download and configure the plugin: https://exchange.nagios.org/directory/Plugins/Operating-Systems/*-Virtual-Environments/VMWare/check_esxi_hardware-2Epy/ – Create a new user in ESXi with no access privilege, you need to login to the ESXi directly to do that. – Enable SSH, and add nagios user to root group: # vi /etc/group root:x:0:root,nagios – Check from the command line, if it works ./check_esxi_hardware.py –host https://esxihost:5989 –user…

  • Could not connect to vmware console https://vcenter_address:7331/

    This usually happens from the vSphere web client while opening a console session with virtual machine. and the log (/var/log/vmware/vsphere-client/logs/vsphere_client_virgo.log) shows something like: [ERROR] Thread-42 System.err INFO:oejsh.ContextHandler:started o.e.j.w.WebApp Context{/console,file:/tmp/jetty-0.0.0.0-7331-console.war-_console-any-/webapp/},/usr/lib/vmware-vsphere-client/server/work/tmp/console-distro/webapps/console.war To fix this set the environment variable VMWARE_JAVA_HOME to proper path: – SSH to vcenter # vi /usr/lib/vmware-vsphere-client/server/wrapper/conf/wrapper.conf – Under Environment variables add: set.default.VMWARE_JAVA_HOME=/usr/java/jre-vmware – Restart…

  • Convert Linux Physical Server to VMware virtual machine

    Download and install vCenter Converter on a windows machine. http://www.vmware.com/products/converter Unfortunately this tool does not have a Linux / MAC version. vCenter Converter In case you see an error: “Permission to perform this operation was denied”, right click and run the program as Administrator. Provide the source and destination information, the source is the physical…

  • ESXi host fails with a purple diagnostic screen PSOD

    This happened while converting KVM VMs to VMware and power them on (method used: http://arunnsblog.com/2013/06/10/migrate-kvm-virtual-machines-to-vmware-esxi/) . It works for a while but then the ESXi crashes with PSOD. Version : 5.1.0-799733 There were two sort of PSOD messages observed: 1) Crashed while the VM was running VMware NOT_IMPLEMENTED bora/vmkernel/sched/memsched.c:17724 Code start: 0x41802b200000 VMK uptime: 10:19:25:27.335…

  • Migrate KVM virtual machines to VMware ESXi

    – Shutdown the KVM guest – convert the QCOW2 or RAW format to VMDK format # qemu-img convert image.img -O vmdk image.vmdk – Upload this image to datastore – Create a new virtual machine with this disk image – There might be issues with network interface mapping, fix the network mapping at /etc/udev/rules.d/70-persistent-net.rules

  • Create NAS/SAN storage with openfiler, work with VMware ESXi as shared storage

    – Download the openfiler installation ISO , download link I have downloaded the Installation ISO image (x86/64). Basically we need to create open filer as a virtual machine with say 20 GB thin provisioning, and attach another disk/datastore to the virtual machine to configure it as SAN. – Download and install  the Installation ISO image…

  • Performance issues with KVM – Redhat

    The general performance issue with KVM is due to DISK I/O – by default the Redhat KVM guest are created with x86_64 architecuture, if you installed 32 bit operating system change this to i686. <os> <type arch=’i686′ machine=’rhel5.6.0′>hvm</type> <boot dev=’hd’/> – Make sure the hypervisor used is correct in the configuration , either qemu or…

  • Converting LVM virtual machine storage to image

    To convert the LVM disk to qcow2 formatted disk image, Use lvdisplay to get the Logical volume name $ sudo lvdisplay Use qemu-img to convert to the required image format # qemu-img convert -O qcow2 /dev/mapper/lv_name <destination_file>.qcow2 eg: # qemu-img convert -O qcow2 /dev/mapper/disk1 disk1.qcow2 This will be useful to replicate the virtual machines to other…

  • IPv6 configuration for KVM guests

    It is simple and straight forward to enable IPv6 on KVM guests Configure the host machine with IPv6 Address on the bridge interface cat ifcfg-br0 IPV6INIT=yes IPV6ADDR=xxxx.xx::10 IPV6_DEFAULTGW=xxxx.xx::1 IPV6_AUTOCONF=no Configure the interface on virutal machines with ipv6 address cat ifcfg-eth0 IPV6INIT=yes IPV6ADDR=xxxx.xx::11 IPV6_DEFAULTGW=xxxx.xx::1 IPV6_AUTOCONF=no Add the the necessary firewall rules to ip6tables on the host…

  • NAT with port forwarding on Virtual Box

    You can use the host-only-adapter networking, if you require the virtual machine to be accessible only from the host machine. In this case your virtual machine will not have access to anywhere outside the host. Read more about virtual box networking at http://www.virtualbox.org/manual/ch06.html On the other hand NAT enabled interface can communicate with clients outside…

  • Convert KVM images to Virtual Box (VDI)

    The steps to convert KVM images to VirtualBox’s VDI format, ensuring cross-platform compatibility and a smoother transition. VirtualBox’s VDI (Virtual Disk Image) format comes with several advantages, making it a flexible choice for virtualization: Cross-Platform Compatibility: VDI images can run on Linux, macOS, or Windows, making them versatile and accessible. No Need for Virtualization-Enabled Processors:…

  • KVM image on LVM

    Virtualization has transformed the world of computing, offering flexibility, resource optimization, and cost-effectiveness. We’ll explore the process of converting qcow2/raw images to LVM logical volumes, giving you greater control over your virtualization resources. KVM is an excellent choice for virtualization on Linux, and when paired with LVM, it offers even more benefits. LVM allows you…

  • Virtualization with KVM under Redhat Linux, Migrate VMware virtual images to KVM

    KVM (Kernel Based Virtual Machine) stands out as a powerful, open-source solution that seamlessly integrates with Linux. It offers a cost-effective and efficient way to virtualize your systems without the need for additional licensing costs. In this guide, we’ll walk you through the process of installing KVM, migrating VMware virtual machines to KVM, creating bridge…