Topic
6 replies Latest Post - ‏2013-03-05T12:48:33Z by SystemAdmin
aelfner
aelfner
47 Posts
ACCEPTED ANSWER

Pinned topic can't get images to work (KVM)

‏2013-03-01T02:51:41Z |
SCP 2.1, all in Workstation 9 VMs, runs fine, but building and activating images has been problematic.

Building RHEL6.1 without LVM as instructed, fails at end of package load w/Anaconda error.
Converted VMDK starts, is pingable, but cannot SSH.
Captured clone of webservice KVM also starts, pingable, but cannot SSH.
Would be useful to access VNC consoles, but get prompted for password, and even if built with supplied password, it never accepts it.
Fedora 18 also won't load.

Can someone provide an EXACT recipe for building something that should work and/or provide a means to access a useable console or revealing log entries.

Thanks!
Updated on 2013-03-05T12:48:33Z at 2013-03-05T12:48:33Z by SystemAdmin
  • SystemAdmin
    SystemAdmin
    92 Posts
    ACCEPTED ANSWER

    Re: can't get images to work (KVM)

    ‏2013-03-01T12:16:38Z  in response to aelfner
    The instructions for building virtual machine templates are documented in the InfoCenter and do work (I use them all the time). From what you have described it looks as if you have missed a few steps in the creation process..

    • The Anaconda error means the install didn't complete successfully. What was the exact error message?
    • Is the converted VMDK from the broken install? If so, its not surprising SSH didn't start
    • The captured clone may have the firewall active which would block traffic on incoming ports 1-1024. Log in via the console and run "service iptables stop" to see if that resolves the issue
    • If you are deploying the VM through SCP, the VNC password is randomly generated (as documented in the InfoCenter). You can find it with the "iaas-describe-instances" command
    • I don't know about Fedora 18, however it is likely a configuration issue

    If you can provide more information on the Anaconda error I can investigate further. For the other issues please check the points above.
    • aelfner
      aelfner
      47 Posts
      ACCEPTED ANSWER

      Re: can't get images to work (KVM)

      ‏2013-03-02T00:09:58Z  in response to SystemAdmin
      Stuart - thanks as always.

      Attached is a monolithic set of screen shots showing the build and Anaconda error (this wiki only allows 1 attachment). The first screen shows the script run to create the VM - I think it looks like the Infocenter version (I am trying to follow the Infocenter). As mentioned, this only occurs when specifying against LVM, as instructed, so perhaps I did that incorrectly.

      None of my attempts are from the broken install since the build does not result in an artifact suitable for install.

      The captured clone has no VNC information listed in iaas-describe-images, so I can't see what's going on there.

      I am pleased to learn of the randomly generated VNC password on 'regular' images, and how to determine what it is. So I bow my head in RTFM shame, but with a meek defense that this is not mentioned in the installation section covering image build, which ends with how to register the image. Rather, it's in the reference section on the CLI, pointed to from the administering vms section. I tend not to attempt to administer things I have not yet built, but I acknowledge many manuals are not best read in sequential order :)
      • SystemAdmin
        SystemAdmin
        92 Posts
        ACCEPTED ANSWER

        Re: can't get images to work (KVM)

        ‏2013-03-03T22:59:20Z  in response to aelfner
        Using Fedora (especially version 18) is going to cause you a number of issues... Firstly, the reason why the system doesn't appear to load after a reboot is most likely due to the graphical grub bootloader not working under KVM. You can disable this, however its easier to build it on another system (if you really need to use Fedora). You also have plymouth trying to provide a graphical splash which may not be compatible (again, it can be disabled if required).

        Secondly, Fedora now uses SystemD which may not work as expected with older software. Finally, a graphical interface (X) is presented by default which requires supported graphical hardware. If your template is being used on multiple hypervisors this may cause issues. You can disable the GUI easy enough, however that may not be what you are after.

        The VNC option is for when you use the KVM hypervisor, as is external to the virtual machine image. It allows you (as an administrator) to view the virtual console of a provisioned virtual machine (its documented more on the InfoCenter). Note: It's not for templates, only for provisioned vm's. If you want a VNC server within the image you will need to configure that yourself (though it does seem as if TigerVNC is already installed by default).

        Anyhow, as for using Fedora 18, it is possible. I successfully created a template (using VMware Workstation) and imported the disk into HSLT. While the creation is slightly different from a hypervisor perspective, the HSLT steps for compatibility are still the same. Once it was installed and booted within VMWS I changed the grub configuration so that it was just text-based, along with changing the system runlevel to 3 (to prevent the GUI from loading). The ifup-eth file also had to be modified so that the hostname was taken from DHCP. If you want to make the template compatible with all of the HSLT hypervisors you will need to add the "biosdevname=0" option to the bootline and also ensure you use the initramfs file and not the initrd (otherwise it will fail to boot). After that it was just the HSLT changes as documented. The images works with KVM/ESXi/Hyper-V/Xen.

        FYI, the SSH service doesnt appear to be activated by default, I had to do it manually.
        • aelfner
          aelfner
          47 Posts
          ACCEPTED ANSWER

          Re: can't get images to work (KVM)

          ‏2013-03-04T15:05:10Z  in response to SystemAdmin
          I should have been more clear. The Anaconda error is from installing RHEL 6.1. Fedora was something I tried when that failed, trying to just build something that worked. Not really interested in Fedora.

          I get the Anaconda error building RHEL6.1 either through virt-install or in Workstation, and only when I specify using a regular disk instead of LVM.
          • aelfner
            aelfner
            47 Posts
            ACCEPTED ANSWER

            Re: can't get images to work (KVM)

            ‏2013-03-05T03:10:51Z  in response to aelfner
            So I determined the error was because I did not define a swap partition. I'm certain I read somewhere in the Infocenter to not define swap and ignore the warning about it. In any case, that was the issue.
            • SystemAdmin
              SystemAdmin
              92 Posts
              ACCEPTED ANSWER

              Re: can't get images to work (KVM)

              ‏2013-03-05T12:48:33Z  in response to aelfner
              Correct.. For HSLT compatibility you add a line in the fstab (the LABEL=HSLTSWAP line).

              Out of curiosity, how much RAM did you allocate your VM when you were performing the installation? I have seen RedHat/CentOS fail silently in the background before because there wasn't enough RAM to build a new initrd. The installer still looked as if everything was ok however the system would never boot.

              If you aren't using 2GB already, it may be worth trying with that setting for the installation process.