Creating a new KVM server on a headless machine. One of the things any good sysadmin dogg wants to do is setup some virtual servers. Red Hat Bugzilla – Bug 741217 KVM guest install fails with libvirtError: cannot send monitor command '
![]() ![]() Who wants to actually stand in front of a server to do that?! What if the machine is headless (no monitor attached)? Well, as long as we have SSH access to the machine, we can do everything from the dogghouse! The first thing you want is to start with a nice server with a good OS installed. I’m starting with the Cent. OS 6 operating system, and a newer Dell Poweredge server. Obviously the more powerful the hardware, the better, but you will want something that supports full hardware virtualization, which is important for security, stability, and speed, among other things. We’ll use the yum groupinstall command to get our necessary package groups, then install the bridge software separately, make sure everything is up to date, and finally restart the server so that we have the latest kernel running. With putty, you can use a command like this: putty. L 5. 90. 0: 1. 27. L 5. 90. 1: 1. 27. This will forward two ports for us, 5. VNC connections. There are a lot of different ways to configure network bridges, but we’re going to keep this one simple. Run 'virt-viewer --help' to see a full list of available command line options Domain installation still in progress. You can reconnect to the console to complete the installation process. Let’s say our machine has two physical network interfaces, eth. We’re going to assume that both interfaces are connected to the same network (so we can’t bridge them together), that we will use eth. IP address. So, just create a separate bridge for each physical interface, br. Start by configuring eth. DEVICE=. Be careful when remotely making changes to your active network connection; a misconfiguration could make you unable to connect! Next, lets configure eth. DEVICE=! We can just edit the bridge scripts, so open the files and configure them already! Bridge device br. DEVICE=br. 0. TYPE=Bridge. Bridge device br. DEVICE=br. 1. TYPE=Bridge. Restart the network services again, and we’re ready to go! Check that our bridge devices exist with the following command: bash# brctl show. STP enabled interfaces. This shows us that br. Ok, so now that we have our host correctly configured, we need an OS to install! You can use a disk drive with the OS installation, install from something provided on the network, or go get a . OS, and install from there. We’ll just use an . Take a look at the following command: bash# virt- install - n newbawx - -vcpus=1 - f /home/vm/newbawx - s 6. Fedora- 1. 5- x. 86. You can reconnect to. First we use the virt- install command to create a new virutal machine named newbawx. We give it a hard drive size of 6. GB (- s 6. 0), 2. GB of RAM (- r 2. Fedora 1. 5 . iso as a virtual CD drive to install from (- c /tmp/Fedora- 1. Don’t forget the - -vnc option to enable VNC access to the guest console. Notice that the os- variant is fedora. Fedora! After the virt- install command is run, we can optionally set the VM to automatically start with the host server: bash# virsh autostart newbawx. Domain newbawx marked as autostarted. Next, fire up your favorite VNC client and connect to 1. You will be greeted with the installation walkthrough for your guest OS! Also, if you wanted to delete and remove a virtual machine named newbawx: bash# virsh destroy newbawx. XML files containing your virtual machine settings are located in /etc/libvirt/qemu/. But how to get to the guest's console? I'm trying to install a fully virtualized guest (Fedora 1. It goes without errors, and without a tangible result . I'd like to know how to do a text- only installation. So, here's what I've done: # virt- install \. FE - -ram=7. 56 - -vcpus=1 \. FE. img - -network bridge: br. Fedora- 1. 4- x. 86. As I understand after googling for a couple of days, I should see the guest's output from the text installation, but nothing happens. If I reconnect with virsh, I see this: Domain installation still in progress. You can reconnect to.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
October 2016
Categories |