VMware ESXi » History » Version 10
Corey Osman, 12/27/2011 10:32 PM
1 | 1 | Corey Osman | h1. How to Provision a VMware ESXi server using foreman |
---|---|---|---|
2 | 1 | Corey Osman | |
3 | 1 | Corey Osman | Although puppet will not run under ESX server we can still use foreman to kickstart the server using PXE. |
4 | 1 | Corey Osman | |
5 | 1 | Corey Osman | h2. Summary of what you need to do: |
6 | 1 | Corey Osman | # Copy iso contents of ESXi to your media directory |
7 | 1 | Corey Osman | # Copy the esx boot files to your tftp directory |
8 | 8 | Corey Osman | # Create a ESX Installation Medium in Foreman |
9 | 1 | Corey Osman | # Create a ESX operating system in foreman |
10 | 1 | Corey Osman | # Create a ESX partition table (optional) template |
11 | 1 | Corey Osman | # Create a ESX kickstart template in foreman |
12 | 1 | Corey Osman | # Create a ESX pxe or gpxe template for ESX in foreman |
13 | 1 | Corey Osman | |
14 | 1 | Corey Osman | |
15 | 4 | Corey Osman | h3. Copy iso contents of ESXi to your media directory (example only) |
16 | 1 | Corey Osman | <pre> |
17 | 6 | Corey Osman | mkdir /mnt/iso1 |
18 | 6 | Corey Osman | mkdir -p /var/www/html/repos/vmware/esxi4.1/ |
19 | 5 | Corey Osman | mount -o loop esxi-iso-file.iso /mnt/iso1 (example for RHEL based distros) |
20 | 4 | Corey Osman | rsync -avz /mnt/iso1/ /var/www/html/repos/vmware/esxi4.1/ |
21 | 4 | Corey Osman | </pre> |
22 | 4 | Corey Osman | |
23 | 7 | Corey Osman | h3. Copy the esx boot files to your tftp directory (must have all of these) |
24 | 4 | Corey Osman | <pre> |
25 | 4 | Corey Osman | cp /var/www/html/repos/vmware/esxi4.1/mboot.c32 /var/lib/tftpboot/boot/vmware/ |
26 | 4 | Corey Osman | cp /var/www/html/repos/vmware/esxi4.1/vmkboot.gz /var/lib/tftpboot/boot/vmware/ |
27 | 4 | Corey Osman | cp /var/www/html/repos/vmware/esxi4.1/vmkernel.gz /var/lib/tftpboot/boot/vmware/ |
28 | 4 | Corey Osman | cp /var/www/html/repos/vmware/esxi4.1/sys.vgz /var/lib/tftpboot/boot/vmware/ |
29 | 4 | Corey Osman | cp /var/www/html/repos/vmware/esxi4.1/cim.vgz /var/lib/tftpboot/boot/vmware/ |
30 | 4 | Corey Osman | cp /var/www/html/repos/vmware/esxi4.1/ienviron.vgz /var/lib/tftpboot/boot/vmware/ |
31 | 4 | Corey Osman | cp /var/www/html/repos/vmware/esxi4.1/install.vgz /var/lib/tftpboot/boot/vmware/ |
32 | 4 | Corey Osman | |
33 | 2 | Corey Osman | </pre> |
34 | 8 | Corey Osman | |
35 | 9 | Corey Osman | h3. Create the installation medium based on where you put your esx4.1 iso contents |
36 | 9 | Corey Osman | # Create new medium |
37 | 9 | Corey Osman | # vmware |
38 | 9 | Corey Osman | # path: http://192.168.1.88/repos/vmware/esxi$version/ (example only) |
39 | 9 | Corey Osman | # OS: ESXi4.1 (can define later after making operating system) |
40 | 9 | Corey Osman | |
41 | 8 | Corey Osman | h3. Create a ESX operating system in foreman (Example only) |
42 | 8 | Corey Osman | # More-->Operating Systems-->New |
43 | 8 | Corey Osman | # Name: ESXi |
44 | 8 | Corey Osman | # Major: 4 |
45 | 8 | Corey Osman | # Minor 1 |
46 | 8 | Corey Osman | # OS Family: Redhat (there is no vmware yet) |
47 | 8 | Corey Osman | # Arch: x86_64 |
48 | 8 | Corey Osman | # Choose any partition tables if you defined any (can do later) |
49 | 1 | Corey Osman | # Choose the vmware installation media (can do later) |
50 | 1 | Corey Osman | |
51 | 10 | Corey Osman | h3. Create a Partition table in Foreman (optional) |
52 | 1 | Corey Osman | # Name: esxi4.1 (name whatever you need to) |
53 | 10 | Corey Osman | # Operating System: ESXi 4.1 |
54 | 9 | Corey Osman | # Layout: (Something like the following) |
55 | 9 | Corey Osman | <pre> |
56 | 9 | Corey Osman | part '/boot' --fstype=ext3 --size=1100 --ondisk=mpx.vmhba0:C0:T0:L0 |
57 | 9 | Corey Osman | part 'none' --fstype=vmkcore --size=110 --ondisk=mpx.vmhba0:C0:T0:L0 |
58 | 9 | Corey Osman | part 'datastore1' --fstype=vmfs3 --size=9004 --grow --ondisk=mpx.vmhba0:C0:T0:L0 |
59 | 9 | Corey Osman | virtualdisk 'esxconsole' --size=8004 --onvmfs='datastore1' |
60 | 9 | Corey Osman | |
61 | 9 | Corey Osman | part 'swap' --fstype=swap --size=1000 --onvirtualdisk='esxconsole' |
62 | 9 | Corey Osman | part '/var/log' --fstype=ext3 --size=2000 --onvirtualdisk='esxconsole' |
63 | 9 | Corey Osman | part '/' --fstype=ext3 --size=5000 --grow --onvirtualdisk='esxconsole' |
64 | 1 | Corey Osman | </pre> |
65 | 10 | Corey Osman | |
66 | 10 | Corey Osman | h3. Create a ESX kickstart template in foreman |
67 | 10 | Corey Osman | h3. Create a ESX pxe or gpxe template for ESX in foreman |