<ConfigRoot>
  <_type>vim.CustomizationSpecItem</_type>
  <info>
    <_type>vim.CustomizationSpecInfo</_type>
    <changeVersion>1729103208</changeVersion>
    <description>Customization Specifications for Ubuntu 22.04</description>
    <lastUpdateTime>2024-10-16T18:26:48Z</lastUpdateTime>
    <name>Ubuntu_22.04</name>
    <type>Linux</type>
  </info>
  <spec>
    <_type>vim.vm.customization.Specification</_type>
    <globalIPSettings>
      <_type>vim.vm.customization.GlobalIPSettings</_type>
    </globalIPSettings>
    <identity>
      <_type>vim.vm.customization.LinuxPrep</_type>
      <domain>test.local</domain>
      <hostName>
        <_type>vim.vm.customization.VirtualMachineNameGenerator</_type>
      </hostName>
      <hwClockUTC>false</hwClockUTC>
      <scriptText>#!/bin/bash
log=/var/log/cust_output.log
echo &quot;$(date) $0 $@&quot; &gt;&gt; ${log}
if [[ &quot;x${1}&quot; = &quot;xprecustomization&quot; ]]; then
  echo &quot;Wait for cloud-init&quot;
  sleep 10
  cloud-init status --wait &gt;&gt; ${log}
  ls -l /run/cloud-init &gt;&gt; ${log}
  echo &quot;Adding rackuser...&quot; &gt;&gt; ${log}
  useradd -m -U -s /bin/bash -c &quot;Rackspace User&quot; rackuser  &gt;&gt; ${log}
  echo &quot;rackuser ALL=(ALL) NOPASSWD:ALL&quot; &gt; /etc/sudoers.d/98-rackuser
  mkdir -p /home/rackuser/.ssh &gt;&gt; ${log}
  echo &quot;ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEiwYfYkKnhWN29iX7fW6Zyb3UeRLZU7TodHmW4lhjFj eddsa-key-20230316&quot; &gt; /home/rackuser/.ssh/authorized_keys
  chown -R rackuser:rackuser /home/rackuser/.ssh &gt;&gt; ${log}
  chmod 700 /home/rackuser/.ssh &gt;&gt; ${log}
  chmod 600 /home/rackuser/.ssh/authorized_keys &gt;&gt; ${log}
  password=$(openssl rand -base64 12)
  echo &quot;root:$password&quot; | chpasswd
  vmtoolsd --cmd &quot;info-set guestinfo.custom.password $password&quot; passwd --expire root
elif [[ &quot;x${1}&quot; = &quot;xpostcustomization&quot; ]]; then  
  echo &quot;customization complete...&quot; &gt;&gt; ${log}
fi</scriptText>
      <timeZone>US/Central</timeZone>
    </identity>
    <nicSettingMap>
      <_length>1</_length>
      <_type>vim.vm.customization.AdapterMapping[]</_type>
      <e id="0">
        <_type>vim.vm.customization.AdapterMapping</_type>
        <adapter>
          <_type>vim.vm.customization.IPSettings</_type>
          <ip>
            <_type>vim.vm.customization.UnknownIpGenerator</_type>
          </ip>
        </adapter>
      </e>
    </nicSettingMap>
    <options>
      <_type>vim.vm.customization.LinuxOptions</_type>
    </options>
  </spec>
</ConfigRoot>
