Sturbi's Home

  • Gallery
  • Modellflug
  • Datenschutz
  • Impressum

Blog

  • Allgemein (8)
    • Sprüche (6)
  • Computer (24)
    • Linux (16)
      • Nagios (5)
      • Nginx (4)
      • Postfix (3)
      • Subversion (1)
    • VMware (3)
    • Windows (8)
      • Powershell (7)
  • Fotografie (24)
  • Reise (7)
    • Hawaii (4)
    • Irland (1)
Wenn du etwas so machst,
wie du es seit zehn Jahren gemacht hast,
dann sind die Chancen groß,
daß du es falsch machst.

Charles F. Kettering amerikanischer Ingenieur * 29.08.1876, † 25.11.1958

Foreman VMware Cloud-Init

9. Oktober 2019 by Sturbi Kategorie: Linux, VMware

/etc/cloud/cloud.cfg

cloud_init_modules:
 - bootcmd

cloud_config_modules:
 - runcmd

cloud_final_modules:
 - scripts-per-once
 - scripts-per-boot
 - scripts-per-instance
 - scripts-user
 - resolv-conf
 - ca-certs
 - yum-add-repo
 - write-files
 - users-groups
 - package-update-upgrade-install
 - runcmd
 - puppet
 - phone-home

system_info:
  distro: rhel
  paths:
    cloud_dir: /var/lib/cloud
    templates_dir: /etc/cloud/templates
  ssh_svcname: sshd

# vim:syntax=yaml

#cloud-config
hostname: <%= @host.name %>
fqdn: <%= @host %>
manage_etc_hosts: true
users:
  - name: root
    ssh-authorized-keys:
      - ssh-ed25519 AAAA.....Vw4L0 sturbi@sturbi.de
      - ssh-rsa AAAAB3N....ji1pU4v foreman-proxy@foreman.sturbi.de

yum_repos:
    puppet6:
        baseurl: http://yum.puppetlabs.com/puppet/el/7/x86_64/
        enabled: true
        gpgcheck: false
        name: Puppet 6

package_update: true
package_upgrade: true

packages:
    - vim
    - tmux
    - mailx

package_reboot_if_required: true

<% if @host.puppetmaster -%>

packages:
    - puppet-agent

puppet:
    conf_file: '/etc/puppetlabs/puppet/puppet.conf'
    ssl_dir: '/opt/puppetlabs/puppet/ssl/'
    conf:
        agent:
            server: "<%= @host.puppetmaster %>"
            certname: "<%= @host.name %>"
        ca_cert: |
            -------BEGIN CERTIFICATE-------
            MIICIjAN.......ZwjH8CAwEAAQ==
            -------END CERTIFICATE-------

<% end %>

phone_home:
  url: <%= foreman_url('built') %>
  post: []
  tries: 10

# Template for VMWare customization via open-vm-tools
identity:
  LinuxPrep:
    domain: <%= @host.domain %>
    hostName: <%= @host.shortname %>
    hwClockUTC: true
    timeZone: 'Europe/Berlin'

globalIPSettings:
  dnsSuffixList: [<%= @host.domain %>]
  <%- @host.interfaces.each do |interface| -%>
  <%- next unless interface.subnet -%>
  dnsServerList: [<%= interface.subnet.dns_primary %>, <%= interface.subnet.dns_secondary %>]
  <%- end -%>

nicSettingMap:
<%- @host.interfaces.each do |interface| -%>
<%- next unless interface.subnet -%>
  - adapter:
      dnsDomain: <%= interface.domain %>
      dnsServerList: [<%= interface.subnet.dns_primary %>, <%= interface.subnet.dns_secondary %>]
      gateway: [<%= interface.subnet.gateway %>]
      ip: <%= interface.ip %>
      subnetMask: <%= interface.subnet.mask %>
<%- end -%>

VMware Certificate Automatation Tool Pitfalls

30. Juli 2013 by Sturbi Kategorie: VMware

I guess, these errors are specific to german installation of vSphere 5.1U1a

first error: the username

No mather what the example in the ssl-environment.bat say, usernames are EVER written like „admin@system-Domain“  and „administrator@domain.local“. Names like „DOMAIN\User“ will not work and produce strange authentication errors.

second error: „Cannot reload the vCenter Server SSL certificates. The certificate might not be unique.“

I wonder how this error can raise on a fresh server, installed with „Simple Install“ (Build 1064983) and certificate requests generate by the script.
After hours of surfing the Web, I found this: http://communities.vmware.com/thread/446747?start=0&tstart=0

Open C:\ProgramData\VMware\VMware VirtualCenter\LS_ServiceID.prop and copy the line to clipboard.
Open C:\ProgramData\VMware\VMware VirtualCenter\vpxd.cfg and search for the line containing „<serviceId>vCenterService</serviceId>“ (line 50 on my file)
Replace „vCenterService“ with the GUID from clipboard like „{16B7163E-CCEA-47E3-891E-B2BFEEBEEB1F}:5“ (note the number at the end not missing „:5“ !)
Close and restart vCenter Service (can take up to 10 minutes to finish)

Now You should be abble to replace the vCenter Server Certificate.

ESX Fallstricke

20. Juli 2010 by Sturbi Kategorie: VMware

Vor mir lag ein 19″ NoName Dualprozessor, 16GB Ram und 16x 1TB SATA Disks. Die richtige Machine um ESX 4 zu installieren.
Raidcontroller war ein Areca ARC-1160.
Also 2 Disks Raid 0 fürs System, 12 Disks Raid Level5 und 2 HotSpare.
CD Einlegen, ESX Setup starten und benutzerdefinierten Treiber laden.
Beim Auswählen des Datenträgers fürs VMFS auswählen … warum kann ich den 11 TB Datenträger nicht auswählen?
Schon nach wenigen Minuten die Antwort, ESX kann leider nur 2 TB Datenträger ansprechen … also nochmal die Raid’s neu einrichten.
5×3 Disks Raid 5 und 2 HotSpare, alle Disks ~1,9TB. Wieder die CD rein, Custom Treiber laden und erstmal alles auf das erste Raid installieren.
Installation macht und tut und … BUMS …
„Errno 1 Operation Not Permitted /mnt/sysimage/boot“
Also wieder Google befragt, dieses mal etwas länger bis ich http://communities.vmware.com/thread/272494 fand.
Nochmal den älteren Treiber herunterladen und wieder das Setup starten, custom Treiber laden …

Endlich läuft der ESX, also mal das VMFS Volume über die restlichen Raid’s erweitern. Mit 11 TB genug Platz um den Exchange mit allen Datenträgern zu schlucken.

Auf dem Exchange den VMWare Converter gestartet, Migration auf den ESX ausgewählt und … warum sieht der Converter den einen Datenträger mit 1,1 TB Grösse nicht?
Wieder Google befragen, aha, der Converter kann nur maximal 920GB große Disks lesen!
Datenträgerverwaltung aufgerufen und das Volume auf 820GB verkleinert, aber er wollte sie einfach nicht.
Na gut, man kann den Inhalt ja auch manuell im Nachhinein kopieren.

Irgendwann lief dann das Convert auch mit turboschnellen 30 MB pro Sekunde … bevor der Converter es ausgerechnet hat, hat die präzise Schätzung ergeben, das man schnell mal auf den Abbrechen Knopf drückt und das Projekt auf unbestimmte Zeit verschiebt …

6 Stunden Installationsorgie, Erkältung und Reuma im Ellenbogen von der Klimaanlage …

© 2021 · Sturbi's Home