libvirt- Create virtual machine with text console only interface

2019-05-27 1 min read Linux Vurtualization
virt-install is an amazing tool to create VMs. If you have created a config file (Kickstart file – ks.cfg), then its only one line un-attended install. If you are using this on remote host with ssh and unluckily cannot export display – what do you do. Do a non-graphical install. There are only minor changes in the command to tell the installer that there is no graphics available and it is amazing, is it not 🙂 Continue reading

vagrant box to libvirtd (QEMU) VM

2018-03-26 1 min read Fedora Vurtualization
Like ova images, you can use box images as well with Qemu. After all, both have the disk images, so here is the script to do that. Just put the script somewhere in your path and run with ova or box image name : #!/bin/bash - #=============================================================================== # # FILE: ova2vm.sh # # USAGE: ./ova2vm.sh # # DESCRIPTION: # # OPTIONS: --- # REQUIREMENTS: --- # BUGS: --- # NOTES: --- # AUTHOR: Amit Agarwal (aka), # ORGANIZATION: Mobileum # CREATED: 12/28/2017 13:59 # Last modified: Sun Mar 11, 2018 12:01PM # REVISION: --- #=============================================================================== set -o nounset # Treat unset variables as an error dest='/mnt/Backup/VM' ORIG=${PWD} if [[ $# == 0 ]] then echo " Continue reading

Fix display size on libvirt/Qemu guest

2017-05-22 2 min read Learning Vurtualization
Lot of times I find myself of VM that does not correctly resize the screen display and that is literally nuisance. So, here is quick and dirty fix for this. First you need to find out information about your display with following command: xrandr -q And you will see output like this: Screen 0: minimum 320 x 200, current 1920 x 1080, maximum 8192 x 8192 Virtual-0 connected primary 1920×1080+0+0 0mm x 0mm Continue reading

Install virtual machines in one line

2016-07-25 1 min read Vurtualization
To install a VM from command line, you can use the following command. Change the required parameters as need but you need to change at-least CDROM iso image and disk-path. virt-install \ -n myVM \ --description "Test VM" \ --os-type=Linux \ --os-variant=centos7 \ --ram=2048 \ --vcpus=2 \ --disk path=./myVM.img,bus=virtio,size=10 \ --graphics none \ --cdrom <Image installtion CDROM>.iso \ --net user

virsh – show ip address of all running VMs

2016-02-01 1 min read Fedora Learning Vurtualization
If you are using the libvirt and associated tools, then you must be aware about virt-manager. However this being a GUI tools, it is not possible to always use this. “virsh” is a good option for this. To start with, if you need to know all the VMs all the running VMs, then you can use (to only view the names): virsh list --name Extending this to make it more useful is the case if you need to know the IP address for the running VMs. Continue reading
Older posts