9 Replies Latest reply: Sep 25, 2014 10:16 AM by Difladermaus RSS

    OVM 3.3.1 & kickstart


      New to OVM.  I've only installed 3.2.7 and 3.2.8.  With 3.3.1 you can no longer custom partition the hard drive during install, but support says you can via kickstart.  We have used kickstart to create our VMs prior to moving to OVM so I am familiar with making a kickstart file, however I'm not having much luck figuring out how to invoke it. On a linux install you get to the install prompt and can type something like linux ip=a.b.c.d gateway=a.b.c.1 netmask= dns=a.b.c.f ks=http://<FQDN>/<path>/ks.cfg ks.device=eth0.  I can get to the "boot" prompt on the OVMS install (F2 when the disc starts loading?) but it doesn't like this syntax.  I feel like I'm missing something obvious but i'm just not figuring it out on my own.


      Appreciate any direction you all can point me in!

        • 1. Re: OVM 3.3.1 & kickstart

          I have not yet used OVM kickstaring with a kickstart file, but I'd assume that it will just work as any other Linux PXE configs. Where did you get the kickstart file from?

          • 2. Re: OVM 3.3.1 & kickstart

            I started installing OVM Server, then took the anaconda-ks.cfg file and made tweaks to it for partitioning and networking.  The issue I have is when I boot from the CD rom, I get the boot: prompt.  If you hit enter it installs.  There's supposed to be a way to use this prompt to specify additional parameters.    I found one doc that says it goes something like mboot.c32 xen.gz <XEN PARAMETERS> --- vmlinuz <KERNEL PARAMETERS> --- initrd.img but I haven't been able to make that work yet either.  Here is what I have tried for anyone who has experience with this.
            mboot.c32 xen.gz --- vmlinuz -x "ks=http://<server>/<path>/ovm331-ks.cfg ks.device=em3 ip=a.b.c.d gateway=a.b.c.1 netmask= nameserver=a.b.c.f" --- initrd.img

            • 3. Re: OVM 3.3.1 & kickstart

              Well, my default config looks like this for regular OS installs and for OVM - but note, that I am only using kickstart to feed the raw iso to my OVM servers. I never created a kickstart file for them, but it should be most similar to the regular kickstarts:


              LABEL OEL6u4

                      MENU LABEL OEL6u4

                      KERNEL images/OEL/x86_64/6.4/vmlinuz

                      APPEND initrd=images/OEL/x86_64/6.4/initrd.img ksdevice=eth0 ks= ramdisk_size=100000


              LABEL OVM_327

                      MENU LABEL OracleVM 3.2.7

                      kernel memdisk

                      append iso initrd=images/OVMS_327.iso raw


              I think the difference here was, that the OVM ISOs do not contain a regular setup but some kind of simple boot, such as that there's no vmlinuz available.

              • 4. Re: OVM 3.3.1 & kickstart

                I'm still missing something.  You say that is your default config.  Where do you put that config?

                • 5. Re: OVM 3.3.1 & kickstart

                  It depends on how you have setup your kickstart server. My default conf file is in /var/lib/tftpboot/pxelinux.cfg/default.

                  Didn't you say, that you are already had used kickstart before?

                  • 6. Re: OVM 3.3.1 & kickstart

                    Yes, we use kickstart every day.  We do not however use PXE boot.  Why do people keep conflating the two?  PXE boot is a way to initiate a bare metal install.  It is used by Windows and many other OSes.  Kickstart is the "answers" to the installation questions along with pre and post configuration for an automated install of Linux. They can work hand in hand, but they don't need to.  We mount the iso boot file to the server, boot from the virtual DVD and then type in the info to get kickstart going.  you can kickstart from a local image if you have your kickstart file on the install media.  Kickstart does not require network access.  It is common to configure network access to get to your network hosted kickstart file, and one way to configure your network automatically is with dhcp, one half of PXE boot.  The other part points to where your initial boot environment will come from.  For us that is the virtual DVD and we specify the network information on the install line, passing it to anaconda.  Why don't we use dhcp and tftp?  well we're in a secure environment and my management and my customer's security dept say we can't.

                    To invoke Kickstart, you specify a Kickstart file in the installation media boot options with the parameter ks. To change this parameter at boot time you have to press Tab in the first installation menu, where the installer asks whether it's going to be a graphical or text-mode installation. You can then edit the boot options and add a Kickstart parameter.


                    boot:  vmlinuz initrd=initrd.img ks=http://someserver.domain.com/path/ks.cfg  ip=  gateway=  netmask= dns=


                    that's all that's needed to initiate the anaconda kickstart and if you list the network location by ip , you don't need to specify dns either. 

                    • 7. Re: OVM 3.3.1 & kickstart
                      Bjoern Rost

                      You may be confusing two things here. Why would you want to modify partition layout for the OVS install? That is the virtualization host, not the guest VMs. I really just install it as is and then run with it.


                      For actually installing guests via kickstart, here is what I do (it took a while and trial/error to get the syntax right):


                      - create a new VM in ovm manager

                      - select linux_pvm

                      - add virtual nic

                      - add virtual disk(s)

                      - in the "Boot Order" tab select PXE and Disk (with PXE on top)

                      - in the "network boot path" field (slightly different name in 3.2) enter a string similar to this one:


                      {code}--kernel=images/pxeboot/vmlinuz --ramdisk=images/pxeboot/initrd.img --args="ksdevice=eth0 network bootproto=static ip= netmask= gateway= dns= hostname=kickstartvm.portrix.net ks=http://yourreposerver/yum/kickstart_puppet.cfg" 'http://yourreposerver/yum/65iso/' btrfs{code}


                      I think you may leave out the btrfs parameter, but we use it as the root fs for our VMs. The 65iso dir should contain the UEK-enabled boot iso and the rest goes into your kickstart file. Is this what you were looking for?

                      • 8. Re: OVM 3.3.1 & kickstart

                        I guess that the OP wants to modify the partition layout to gain more space for a local repository. In the end, this seems to be the reason Oracle did introduce this, as states in the 3.3 docs. Naturally this would mostly apply to configurations, where no cluster infrastructure is in place…

                        • 9. Re: OVM 3.3.1 & kickstart

                          Just stumbled across this and thought I 'd way in.


                          Changes from 3.2.8 to 3.3.1 do not change the process of kickstarting a PVM virtual machine in Oracle VM.


                          The simplest way without the need for dhcp or pxe environment setup is to move the Network (3.2.8) or PXE (3.3.1) to first in the boot order list and enter boot args in the Network Boot Path:

                          I use the following;

                          --args ks=http://ip.of.http.server/stage/kickstart/6u5-09252014.cfg http://ip.of.http.server/stage/mount/ol6



                          /stage/kickstart/6u5-09252014.cfg - is path to my kickstart file (see below)

                          /stage/mount/ol6 - is where my iso is mounted /var/www/html/stage/ISO/OL_6U5_x86_64.iso on /var/www/html/stage/mount/ol6 type iso9660 (rw,loop=/dev/loop0)


                          Kickstart file example

                          # cat /var/www/html/stage/kickstart/6u5-09252014.cfg

                          # Kickstart file automatically generated by anaconda.





                          url --url=http://ip.of.http.server/stage/mount/ol6/

                          lang en_US.UTF-8

                          keyboard us

                          network --onboot yes --device eth0 --bootproto static --ip xxx.xxx.xxx.xxx --netmask xxx.xxx.xxx.xxx --gateway xxx.xxx.xxx.xxx --noipv6 --hostname myvmname

                          rootpw  --iscrypted $6$r1lmBOQJ2ivQ3/ZK$F16an0RFI5uF7/hk.hBLDOimktTWI0IPMAdk1P9hFlKeYzLu0gPcBsj227/caysY4muTWqHKYfh9zQaPWM.jN1

                          firewall --disabled

                          authconfig --enableshadow --passalgo=sha512

                          selinux --disabled

                          timezone --utc America/New_York

                          bootloader --location=mbr --driveorder=xvda --append="crashkernel=auto rhgb"

                          # The following is the partition information you requested

                          # Note that any partitions you deleted are not expressed

                          # here so unless you clear all partitions first, this is

                          # not guaranteed to work

                          clearpart  --all --drives=xvda

                          zerombr yes

                          part /boot --fstype=ext4 --asprimary --size=500 --ondisk xvda

                          part pv.root --asprimary --size=1 --grow --ondisk xvda


                          volgroup vg00 --pesize=4096 pv.root

                          logvol /home --fstype=ext4 --name=home --vgname=vg00 --size=10240

                          logvol / --fstype=ext4 --name=root --vgname=vg00 --size=12288

                          logvol swap --name=swap00 --vgname=vg00 --size=520

                          logvol /tmp --fstype=ext4 --name=tmp --vgname=vg00 --size=10240

                          logvol /u02 --fstype=ext4 --name=u02 --vgname=vg00 --size=6144


                          repo --name="UEK3 kernel repo"  --baseurl=http://ip.of.http.server/stage/mount/ol6/UEK3/ --cost=1000



































                          %post --log=/root/kickstart-post.log

                          cd /root

                          wget http://ip.of.http.server/stage/scripts/linux_setup.tar




                          This process has worked great for many customers. I keep the kickstart clean and perform the rest of the system configuration using a script. I have been using the same script for OVM, VMware and physical host builds. I tend to stay away from templates in VMware and OVM and use scripting to make build processes repeatable.


                          I will be working on posting a white paper on this.