Previous Topic: How to Create and Attach Volume Streams to hoop, nbd, and md DevicesNext Topic: How to Download from FTP Server Directly to Grid Controller


How to Create Fedora 10 64 bit Appliance in AppLogic 3.1

The following procedure was used to produce a Fedora paravirtualized appliance on AppLogic Version 3.1. Fedora is an open source, freely available, version from the RedHat code base intended for personal use.

The releases used for this exercise were:

Procedure

  1. Download Fedora 10 64-bit ISO file into /vol/_impex directory of the grid controller.
  2. Go to /vol/_impex directory and run iso2class command shown below.

    IMPORTANT: specify mem=1G and cpu=1.0 – without it (especially memory) OS install will fail and hang indefinitely on boot loader install)

    When asked, specify OS – Linux 64bit (Selection 11).

  3. Name the application Fedora10x64bit (as shown previously) or equivalent. It should start correctly. This application contains the appliance on which Fedora will be installed. Do not hit ENTER now, but proceed to next step.
  4. Right-click Fedora10x64bit application you created and select Configure to open application configuration window.
  5. In application>configuration dialog click Security tab, in the Name box, specify the user that you used to log in to Applogic UI, click Add. In the Name column, specify the same user, in the Access column, specify full. Click OK.
  6. Click on application name in Applications tab, in application editor click on appliance, from Appliance menu select Login (graphic) – this should open graphic console of an appliance, from which we can start OS install.
  7. In graphical console the installation will offer to test the media. Click on Skip if you are confident your file is sound, or OK to test your install files.
  8. Click Next.
  9. For language, select English; click Next.
  10. For keyboard, select US English; click Next.
  11. Click Yes to create standard, default partitions.
  12. In Hostname box delete localhost.localdomain and type iso2class; click Next.
  13. Select time zone (or accept default); click Next
  14. Specify and confirm root password; click Next
  15. From dropdown select "Create custom layout"; click Next
  16. Click New

    From dropdown select mount point "/", make sure File System Type is "ext3", specify size 2000, make sure"Fixed size" is checked, check "Force to be a primary partition"; click OK

  17. Click New
  18. From dropdown select mount point "/usr", make sure File System Type is "ext3", specify size 4000, make sure "Fixed size" is checked, check "Force to be a primary partition"; click OK
  19. Partitions should be defined as specified; click Next
  20. Click Yes
  21. Click "Write changes to disk"
  22. Click "Change device"
  23. Make sure Master Boot Record is selected as install location for boot loader – that should be default; click OK, then click Next
  24. Verify that "Customize later" is selected (should be by default); click Next
  25. OS install should start…..
  26. …and continue. Once OS installaation is complete, graphical console window will become blank. When it happens, close graphical console and close application editor. Return to ssh session from which you ran iso2class command to create the appliance.
  27. That ssh session should be waiting now for you to press Enter – so press ENTER, then type "Y" and press ENTER again. Application should stop and start successfully.
  28. Press ENTER, then type "Y" and press ENTER again. Application should stop successfully. Before answering the prompt marked in blue, open new ssh session to grid controller….
  29. In that new ssh session on grid controller run the command marked in red. "Fedora10x64bit" in that command is the name of my application, so replace it with name of your application. This command should start the filer and should give you the filer prompt.
  30. This needs to be done only for 64 bit version – run command marked in red to copy 32 bit shared library rpm file to the boot volume of the appliance. Verify file got copied as specified.
  31. Type "exit" – this should stop the filer (verify from Applogic UI Applications tab that filer stopped) and return you to grid controller prompt.
  32. Now return to the first ssh session – it should wait on the prompt as below – answer "2" to that prompt. This should start the application and prompt you whether you want to run hvm2pv – do not answer this prompt yet, but continue to the next step.
  33. Highlight Fedora application in Applogic UI, click "Login (ssh)" in toolbar – this should open ssh session to Fedora appliance. Type in root password specified earlier during OS install. Type rpm command to install glibc-2 rpm package – 1st command in red. Then verify that rpm gor installed – 2nd command in red. Then type "exit" and press ENTER.
  34. Return to ssh session and answer "1" to run hvm2pv. Application should stop and hvm2pv utility should be called.

    After running hvm2pv graphical console for Fedora 10 64bit appliance cannot be opened.

  35. Answer "Y" to say that pre-requisite software is installed – application volumes should be copied and new application with name "hvm2pv_<your_application_name>_<some_number>" should start successfully.
  36. Since we install 64 bit Fedora, answer "Y" to the prompt to confirm that this is 64 bit system. It may take long time before displaying prompt about setting new root password….APK should get installed.
  37. Answer "Y" and press ENTER to the prompt marked in red, but after that do not press any key to the prompt in blue. Instead go to next step.
  38. Now we need to login to the appliance inside application created earlier by hvm2pv utility: right-click on the application created by hvm2pv utility (its name is hvm2pv_<your_application_name>_<some_number>) and click Configure.
  39. In Security tab specify owner (user that you use to login to Applogic UI), click Add – specify the same user in Name column and specify Access "full". Then click OK.
  40. Highlight hvm2pv _<your_application_name>_<some_number> and from toolbar click Login (ssh) button – this should ssh you into the appliance created by hvm2pv utility inside hvm2pv_<your_application_name>_<some_number> application
  41. From that appliance shell execute first command below. Then execute second command below – since rpms are already installed, rpm files can be removed:
    ROOT_MOUNT=/mnt/vol/hdc1
    rm -fv $ROOT_MOUNT/root/*rpm
    
  42. Run commands listed below (marked in red in screenshot)
    sed -i 's#\(/usr[[:blank:]]\+ext3[[:blank:]]\+defaults\)\([[:blank:]]\+\)[[:digit :]]\([[:blank:]]\+\)[[:digit:]]#\1,ro\20\30#g' $ROOT_MOUNT/etc/fstab
    sed -i $ROOT_MOUNT/boot/grub/menu.lst -e 's/ quiet/ quiet xen_emul_unplug=never/'
    sed -i $ROOT_MOUNT/etc/sysconfig/selinux -e 's/^SELINUX=.*$/SELINUX=disabled/'
    mount -o bind /dev/ $ROOT_MOUNT/dev/
    mount -o bind /sys/ $ROOT_MOUNT/sys/
    mount -o bind /proc/ $ROOT_MOUNT/proc/
    
  43. Run all commands below. After hitting ENTER after OEF in red-marked section it shoule give output like in screenshot. It should succeeed:
    chroot  $ROOT_MOUNT grub -batch -no-floppy << EOF
    device (hd0) /dev/hdc
    root (hd0,0)
    setup (hd0)
    quit
    EOF
    
  44. Type command in red and specify and confirm new root password. Then type exit and hit ENTER – ssh window should close.
  45. Return to grid controller ssh session, from which you ran iso2class command. This ssh session should wait at prompt in red – hit ENTER. Hvm2pv application should stop, volumes should get copied. Press ENTER on blue prompt.
  46. Fedora application should start successfully in PV mode, then it should stop and start successfully in HVM mode and then stop. Answer "Y" to the prompt to delete original boot volume. You should see message that hvm2pv utility completed and that resulting appliance is a managed appliance.
  47. Execute command in red to start Fedora application – it should start successfully
  48. Highlight Fedora application in Applogic UI, click Login (ssh) from toolbar – this should open root session to Fedora appliance without need to specify root password.