Exploring KVM - Day 1 / by Eddie Jennings

Finally!  I had some time today to start tinkering with the KVM Hypervisor on Fedora 26 server.  There were successes and failures tonight, which I expect to have many of both during this journey.

First impresion:  I WAS ABLE TO CONNECT WITH THE HYPERVISOR MANAGER IN UNDER 30 SECONDS!  Now, this may seem trivial, but trust me, it's not.  Here is the exact procedure I followed to connect to my KVM server.  On my Korora 25 laptop:

  1. Run dnf install virt-manager
  2. Open the Virtual Machine Manager
  3. Click File > Add Connection and input the appropriate information

That's it!  That's all!  Hyper-V is not as kind.  Granted it's much easier to connect to your Hyper-V server with Hyper-V manager if both the client and server are part of a domain; however, if you aren't, then it's a giant pain in the ass.  It's less of a pain if you're already aware of resources like this.  If not, then you get to work on some Google-fu.

Also, I must mention that in order to manage Hyper-V, I have to sit at my Project 1999 computer (Windows machine).  I can manage KVM from the comfort of my old recliner with my Korora 25 laptop.

Unfortunately, this is where the successes begin to end for today.  First I realized that despite having two 2 TB drives in RAID 1 on my lab server, df -h showed that root was mounted on 15 GB of space.  I suspected there would be learning via yak shaving with this project, and here's the first step.  I need to create more space.  After digging through some lvm man pages and seeing useful information from lvdisplay, I tried this command with success:  lvextend -L 500G -r /dev/fedora/root (from the LV path information from the lvdisplay command).  There's probably a better way to do this, as tonight was my first time ever messing with volume sizes outside of the OS Installation GUI.

Now that I have enough space, I used sftp to get my Fedora 26 Workstation ISO to my KVM server, and I'm ready to make me a shiny new VM.  I used the Virtual Machine Manager GUI to setup the VM (functionality is similar to Hyper-V).  I start the VM, a console window appears, and I'm eagerly awaiting the installation GUI.  Instead I'm met with an OpenSSH box asking for my credentials for the KVM server.   This seems odd since I'm already connected to my KVM server; thus, I was able to configure a new VM, but I thought "whatever, maybe it's ust a KVM thing that requires me to authenticate again to view the console of a VM."  Well, after 10 tries of feeding it 100% correct credentials (as in I put my credential in a text document, copy / paste into the terminal when making an ssh connection to my KVM server and it worked with no problem, yet this dialogue box won't accept it), I close the dialog box.  So now I hav a VM that's running, but no way for me to access the console.  After closing and reopening the Virtua Machine Manager, if I were to try to connect to the console, I'm not met with the authentication dialogue, bur rather a "Connecting to the graphical console guest" message that never times or errors out.

Despite this failure to successfully connect to the console of a VM, today was a success both with finally getting around to touching KVM, but also a success in figuring out how to extend a LVM volume.  What's next?  Fix the above problem of course.  I'm tired now, but I'll take to the Google to see if I'm doing something wrong to cause me to not be able to access the console.