I've got Ganeti 2.5.1 installed under Debian squeeze. I've successfully created Debian squeeze VMs using ganeti-instance-debootstrap and now I'd like to install a CentOS 6 VM with it's own /boot partition. I've poured over the docs and scoured the web but I can't seem to figure out how to install a CentOS 6.x based (pvops kernel) domU from the minimal centos 6 install iso. I managed to install centos 6 into a qemu image but couldn't make ganeti-instance-image happy about using it. It complained about swap being on partition (disk) 2, which seems correct given the requirements outlined in the ganeti-instance-image README. Any pointers would be appreciated.
On Fri, Jul 20, 2012 at 04:39:49PM -0700, Kevin Brooks wrote:
> I've got Ganeti 2.5.1 installed under Debian squeeze. I've successfully > created Debian squeeze VMs using ganeti-instance-debootstrap and now I'd > like to install a CentOS 6 VM with it's own /boot partition. I've poured > over the docs and scoured the web but I can't seem to figure out how to > install a CentOS 6.x based (pvops kernel) domU from the minimal centos 6 > install iso. I managed to install centos 6 into a qemu image but couldn't > make ganeti-instance-image happy about using it. It complained about swap > being on partition (disk) 2, which seems correct given the requirements > outlined in the ganeti-instance-image README. Any pointers would be > appreciated.
You don't mention what hypervisor are you using :)
So direct installation from an ISO is not supported for xen-pvm, but
should work for xen-hvm and kvm. For xen-pvm, one can achieve something
similar to CD-booting, but it's a bit more complex - you'd have to
extract the kernel and initrd used for booting…
On Sat, Jul 21, 2012 at 09:21:05AM +0200, Iustin Pop wrote:
> On Fri, Jul 20, 2012 at 04:39:49PM -0700, Kevin Brooks wrote:
> > I've got Ganeti 2.5.1 installed under Debian squeeze. I've successfully > > created Debian squeeze VMs using ganeti-instance-debootstrap and now I'd > > like to install a CentOS 6 VM with it's own /boot partition. I've poured > > over the docs and scoured the web but I can't seem to figure out how to > > install a CentOS 6.x based (pvops kernel) domU from the minimal centos 6 > > install iso. I managed to install centos 6 into a qemu image but couldn't > > make ganeti-instance-image happy about using it. It complained about swap > > being on partition (disk) 2, which seems correct given the requirements > > outlined in the ganeti-instance-image README. Any pointers would be > > appreciated.
> You don't mention what hypervisor are you using :)
Oops, you did, but in the subject line, and missed it. Sorry!
> So direct installation from an ISO is not supported for xen-pvm, but
> should work for xen-hvm and kvm. For xen-pvm, one can achieve something
> similar to CD-booting, but it's a bit more complex - you'd have to
> extract the kernel and initrd used for booting…
So yes, for xen-pv it's a bit harder. If you can extract vmlinuz/initrd
from the CDROM, then you can set those as kernel_path and initrd_path,
and then the install should work as-is.
> then you can set those as kernel_path and initrd_path,
> and then the install should work as-is.
Yep ! Here is a quick step by step on how to that:
1. download "vmlinuz" and "initrd.img" for a pxeboot install of centos
from the mirrors and put them on the same path on all of your nodes.
For an x86 install, you can find them on
http://ftp.free.fr/mirrors/ftp.centos.org/6.3/os/i386/images/pxeboot/ 2. Create an Ganeti XEN-PV instance:<code>
gnt-instance add --debug --disk-template drbd --os-type debootstrap+default
--net 0:link=xen-br0 --disk 0:size=5G --backend-parameters memory=512
--hypervisor-parameters
kernel_path=/boot/distributions/centos/6/x86_64/vmlinuz,initrd_path=/boot/d istributions/centos/6/x86_64/initrd.img,kernel_args="console=hvc0"
--no-install --no-start --node gnt-node-1:gnt-node-2 gnt-instance-1
</code>
The important settings are the ''kernel_path'' and ''initrd_path'' as
Iustin pointed out but also the ''kernel_args'' options which tells to the
CentOS installer to use XEN PV console (aka hvc0) as the serial console.
3. Start the instance: <code>
gnt-instance start gnt-instance-1
</code>
4. connect to the instance console <code>
gnt-instance console gnt-instance-1
</code>
5. Voilà !
You should be able to proceed with a *normal* text-only CentOS
Installation. Note that anaconda (the RHEL/centos/... installer) in
text-only mode has less features then in graphical mode, like not allowing
you to specify the partitions layout (see
http://docs.redhat.com/docs/en-US/Red_Hat_Enterprise_Linux/6/html/Mig... )
NB: If you want access to the complete installer, you'll have to a
graphical Xen-PV installation: see below
For a graphical CentOS XEN-PV installation, just:
- at step 2, just add "vnc" to the kernel_args options:
kernel_args="console=hvc0 vnc" . You can also add a "vncpassword" option to
secure a bit the access to the installer iirc...
- At step 4, connect to the instance console to get the ip and port on
which anaconda is listening.
Then start a vnc client to connect to it from your desktop
@Iustin: Wish that some basic info for guest installation besides
debian was there on the wiki, , especially XEN HVM installation (Windows,
BSD*...) or XEN PV installation from CD/DVD for Linux instances.
This is really not that evident for newcomers, especially for those
choosing the Xen hypervisor :-)
>> then you can set those as kernel_path and initrd_path,
>> and then the install should work as-is.
> Yep ! Here is a quick step by step on how to that:
> 1. download "vmlinuz" and "initrd.img" for a pxeboot install of centos > from the mirrors and put them on the same path on all of your nodes.
> For an x86 install, you can find them on > http://ftp.free.fr/mirrors/ftp.centos.org/6.3/os/i386/images/pxeboot/ > 2. Create an Ganeti XEN-PV instance:<code>
> gnt-instance add --debug --disk-template drbd --os-type > debootstrap+default --net 0:link=xen-br0 --disk 0:size=5G > --backend-parameters memory=512 --hypervisor-parameters > kernel_path=/boot/distributions/centos/6/x86_64/vmlinuz,initrd_path=/boot/d istributions/centos/6/x86_64/initrd.img,kernel_args="console=hvc0" > --no-install --no-start --node gnt-node-1:gnt-node-2 gnt-instance-1
> </code> > The important settings are the ''kernel_path'' and ''initrd_path'' as > Iustin pointed out but also the ''kernel_args'' options which tells to the > CentOS installer to use XEN PV console (aka hvc0) as the serial console. > 3. Start the instance: <code>
> gnt-instance start gnt-instance-1
> </code>
> 4. connect to the instance console <code>
> gnt-instance console gnt-instance-1 > </code>
> 5. Voilà ! > You should be able to proceed with a *normal* text-only CentOS > Installation. Note that anaconda (the RHEL/centos/... installer) in > text-only mode has less features then in graphical mode, like not allowing > you to specify the partitions layout (see > http://docs.redhat.com/docs/en-US/Red_Hat_Enterprise_Linux/6/html/Mig... > ) > NB: If you want access to the complete installer, you'll have to a > graphical Xen-PV installation: see below
> For a graphical CentOS XEN-PV installation, just:
> - at step 2, just add "vnc" to the kernel_args options: > kernel_args="console=hvc0 vnc" . You can also add a "vncpassword" option to > secure a bit the access to the installer iirc...
> - At step 4, connect to the instance console to get the ip and port on > which anaconda is listening.
> Then start a vnc client to connect to it from your desktop
> @Iustin: Wish that some basic info for guest installation besides > debian was there on the wiki, , especially XEN HVM installation (Windows, > BSD*...) or XEN PV installation from CD/DVD for Linux instances. > This is really not that evident for newcomers, especially for those > choosing the Xen hypervisor :-)