PowerVC supports using cloud-init for image activation on AIX and Power Linux VMs. This page contains troubleshooting tips for cloud-init.
The deployed VM does not boot or does not ping
Issues that relate to VMs not booting or not pinging after a deploy are covered on this page: Troubleshooting when a VM using cloud-init does not ping or boot
Deployed VMs on HMC or Novalink managed systems stay in ACTIVATING state for 20 minutes and DLPAR/RMC state never becomes active
The cloud-init RPMs that are included with PowerVC 1.2.3 and later contain optional cloud-init modules for resetting RMC/RSCT tooling as well as reconfiguring the bootlist. It is recommended that these modules be enabled when using cloud-init on Linux on Power. See the PowerVC Knowledge Center for more information: http://www-01.ibm.com/support/knowledgecenter/SSXK2N_1.2.3/com.ibm.powervc.standard.help.doc/powervc_install_cloudinit_hmc.html
If you are using the cloud-init RPMs that come with PowerVC 1.2.2 or earlier then cloud-init doesn't reset or configure RMC/RSCT on PowerVM. If you want or need DLPAR/RMC working on VMs using cloud-init for activation, you should pass a script or cloud config data that runs the correct commands to reconfigure and restart RSCT tooling. A script to do this is attached to this page.
The user may need to stop the firewalld service on RHEL guestOS in order to get RMC to work.
How to get cloud-init to run again on a VM
See Developing Custom Cloud-Init Modules for the best techniques for this.
How to rescue a locked out SLES VM.
If you have installed cloud-init and either rebooted the capture source or captured and deployed without modifying the default /etc/cloud/cloud.cfg file, the root user ID will be locked out of the VM. Here's how you rescue the VM.
1. Capture the "bricked" VM.
2. If this is PowerVM you may need to run the following two commands on the PowerVC management server to remove the configuration strategy from the image. This is not necessary on PowerKVM:
powervc-get-token
Use the resulting token in the X-Auth-Token header in the following command.
The following command also requires you to put the image UUID after /images. This can be found in the image details view in the PowerVC GUI.
curl -X 'PATCH' -v -H "X-Auth-Token:689cc841481d4631bbf2df9e153652fa" -H "User-Agent: powervc-httpclient" -H "Content-Type: application/openstack-images-v2.1-json-patch" http://localhost:9292/v2/images/88c35e92-70f2-429f-9fac-c1ff3f48d4a0 -d '[ { "op": "remove", "path": "/configuration_strategy"}]'
With the appropriate auth-token and image ID.
3. Deploy the image with the following for activation input / user-data:
#cloud-config
users:
- name: root
lock_passwd: False
plain_text_passwd: passw0rd2
#PowerVC#Infra#troubleshooting