Here is a simple kickstart snippet that I use to Identify virtual machines base on their
MAC address:
set $mac_address = $getVar('$mac_address', None)
#if $mac_address
#set $mac_prefix = $mac_address[0:8]
#set $my_prefix = $mac_prefix.lower()
#if $my_prefix == "00:0c:29" or $my_prefix == "00:05:69" or $my_prefix
== "00:50:56" or $my_prefix == "00:16:3e"
#set global $isvm = 1
#end if
#end if
The snippet sets a variable, isvm and which I pass as a global variable, thus it is
accessible to all other snippets and the kickstart pre/post install scripts. So you can
use this var to key how your snippets or pre/post installs function.
My kickstart config looks something like this:
## Regional Settings
SNIPPET::regionalize
# ROOT PASSWORD
rootpw --iscrypted blach
# INSTALLATION OPTIONS
install
nfs --server $nfs_server --dir $nfs_distro_root/$distro --opts=tcp
reboot
text
# PARTITION CLEARING INFORMATION
clearpart --all --initlabel
# Network information
SNIPPET::networkIT
# SYSTEM AUTHORIZATION INFORMATION
authconfig --enableshadow --enablemd5 --enablecache
# DO NOT CONFIGURE XWindows
skipx
# FIREWALL and SELINUX ONFIGURATION
firewall --disabled
selinux --disabled
# TURN OFF INSTALL KEY REQUEST
key --skip
# SYSTEM BOOTLOADER CONFIGURATION
bootloader --location=mbr --md5pass=$1$WtRV9ECC$3/C0izWipK8hQKZisIjbO0
# Partitioning
SNIPPET::isVM <=== am I a vm? If so configure the disk according. We have XEN (guest
and server) ESX, VMware workstation, and virtualbox
SNIPPET::partitionIT
## RPM Configuration
SNIPPET::rpmLIST
# Post Install
SNIPPET::postINSTALL
Hope this helps!
Cheers,
Joseph Boyer Jr.
Liquidnet Holdings, Inc.
E joseph.boyer(a)liquidnet.com
T +1 646.660.8352
C +1 646.284.8394
-----Original Message-----
From: cobbler-bounces(a)lists.fedorahosted.org
[mailto:cobbler-bounces@lists.fedorahosted.org] On Behalf Of Rob Crittenden
Sent: Tuesday, October 28, 2008 2:51 PM
To: cobbler mailing list
Subject: Re: VMWare / Cobbler Work flow
Aaron Lippold wrote:
Hello,
I was hoping some of the folks working the VMWare Cobbler integration
could chat a little on the general work flow for creating VMWare
target profiles and how a development team would collaborate on
developing them. I have a team now working to develop a set of
profiles targeted at VMWare as the host and was hoping the list could
help just start the team.
The wiki seems a little sparse on what is supported, how to utilize
what is supported and what the development road map is.
Thanks,
Aaron
I worked on the VMWare Workstation support a bit and the thing that is
going to stand in your way whether using Server or Workstation is the
MAC address. In order to do a PXE boot, cobbler needs to do the MAC
assignment in the profile so it can write the proper PXE config file.
Cobbler is currently hardcoded to use the Xen MAC address range which
will not work with VMWare. If you try to pass a non-VMWare address space
it will ignore it and generate its own meaning that the PXE boot will
fail (because it can't find the config file).
On my system I simply replaced a function in the cobbler code but this
is hardly portable.
I'm not sure what kind of profile configuration you are looking to do. I
didn't mess around with custom variables in the ks files but I'm
assuming those will work the same as with any of the other virt types.
The vmx file for VMWare is a bit hardcoded presently, limiting you to
configuring just 1 disk, available RAM, the MAC address and system name
(as far as VMWare is concerned).
Workstation has a few more options but for example, it assumes you are
only installing Linux and picks the most generic setting it can.
I've fiddled with it about as much as I'm going to. It works ok for me
and I can live with the current idiosyncrasies.
rob
_______________________________________________
cobbler mailing list
cobbler(a)lists.fedorahosted.org
https://fedorahosted.org/mailman/listinfo/cobbler