Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have installed Ganeti on Centos 6.3 with DRBD and have added couple of nodes. However, now I am facing next challenge of installing a Centos Guest/Instance on top of it. I tried using ganeti-instance-image but it does not appear to have ISO install. I tried the steps given https://code.osuosl.org/projects/ganeti-image/wiki/HOWTO_-_Ganeti_Instance_Image but did not work for me.

I know there is extensive documentation in ganeti page but most of them are for xen/Debian destro. The default debootstrap is also designed for Default debian instance install. If anyone could help me with working steps (idiot's guide) of installing an Centos Instance from

  • ISO image
  • Importing an existing qemu image file (qcow2/img/raw)
  • Installing Centos using instance-image project.

So far I have been using KVM/DRBD for my Virtual machine management.

share|improve this question

2 Answers 2

up vote 2 down vote accepted

Answering my own Question.The answer to my question was understanding and using Ganeti OS templates/Bootstraps. Ganeti provides a default bootstrap to install Debian based Instances/Virtual machine. It could be modified to install any type of OS. There are already such instance-images available that could be used to install other destros such as CentOS/RHEL and Windows.

  1. debootstrap -- For Debian
  2. Instance-image -- For all Linux
  3. Linux-image/Raw-image -- It worked for me to get CentOS 6 VM install.

Install Linux-image. Remember to install the packages and ISO images across all the nodes in same location.

wget http://sourceforge.net/projects/ganeti-os-defs/files/ganeti-os-defs-1.1.1.tgz/download
tar -zxvf ganeti-os-defs-1.1.1.tgz -C /src/ganeti/os/
cd linux-image/

edit environment.sh path of ISO rescue image Modify cluster settings

Verify the install

gnt-os list

Installing from ISO Image

Create an instance image

gnt-instance add -t drbd -o linux-image+default -s 10g -n node1:node2 --no-start --no-install  -B vcpus=2,memory=1024M -H kvm:vnc_bind_address=0.0.0.0 vm1.net

Install OS

gnt-instance start -H boot_order=cdrom,cdrom_image_path=/usr/local/iso/CentOS-6.3-x86_64-minimal.iso vm1.net

Get the VNC Access

gnt-instance info --all  | grep network

You may have to restart the Instances from Ganeti as it may not pick up up the grub.

Importing existing Qemu-image to DRBD based Ganeti

Sharing the steps mentioned at https://groups.google.com/forum/?fromgroups=#!topic/ganeti/YH_5pM8rAvc

Convert the Image

Get the image size

qemu-img convert dsl.qcow2 -O raw dsl.qcow2

qemu-img info dsl.raw
image: dsl.raw
file format: raw
virtual size: 8.0G (8589934592 bytes)
disk size: 1.5G

Create a DRBD image

gnt-instance add -t drbd -o linux-image+default -s 8g -n gkvm01.net:gkvm02.net -H --no-start --no-install -B vcpus=2,memory=1024M -H kvm:vnc_bind_address=0.0.0.0 dsl.net


gnt-instance activate-disks dsl.net
dd if=dsl.raw of=/dev/drbd1

gnt-instance deactivate-disks dsl.net

gnt-instace start dsl.net
share|improve this answer

I'm the maintainer for ganeti-instance-image and I'm sorry to hear you've been having problems getting it to work.

  1. Are you referring to how to get an initial image created and setup from an ISO image?
  2. Are you wanting to import from a qemu image into a Ganeti lvm/drbd storage type? If so there's a couple of tools with Ganeti such as the ovf-converter which helps with that.
  3. The idea is once you have a base install like you want (which you install manually), you shutdown the vm and then create either a tarball, qemu image, or filesystem dump which you then use for deploying CentOS.

I hope to fix the documentation soon.

share|improve this answer
    
Thanks for responding. We can a total Centos shop and want to install OS from ISO image, also want to import existing qemu-image. I tried my best to follow the documentation but it did not work for me. May be I am missing something. However, later I learned about os-defs project it allowed me to do simple install using ISO. –  chandank Jan 14 '13 at 22:21

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.