Appliance boot mode configuration
Configure the boot mode for the appliance VMs.
By default every appliance node requires the presence of an ISO file attached at boot.
Version 10.0.4.0 or later: You can configure individual VMs so that they can be booted and rebooted without an ISO being attached. Each appliance VM (node) is configured individually.
You can:
- Check the current boot mode of an appliance
- Configure an appliance for iso-ignored boot mode
- Configure an appliance for iso-required boot mode
- Revert back to iso-required boot mode by booting the appliance in rescue mode
Check the current boot mode of an appliance
The default boot mode for all appliances is iso-required
. To check the current
boot mode:
- Connect to the target appliance via SSH then switch to the root
user:
ssh apicadm@{ova appliance hostname} sudo -i
- Use
apic boot-mode
to check the current boot mode of the appliance. For example:root@ip-192-168-122-241:~# apic boot-mode INFO[0000] Log level: info INFO[0000] current boot mode is: iso-required
Configure an appliance for iso-ignored
boot mode
An appliance can be configured to use the iso-ignored
boot mode instead of the
default iso-required
. Prerequisite: The appliance must have first booted with its
configuration ISO attached and in iso-required
boot mode (default) before the boot
mode can be changed to iso-ignored
.
You can configure an appliance to use he iso-ignored
boot mode instead of the
default iso-required
.
Prerequisite: The appliance must have first booted with its configuration ISO attached and
in iso-required
boot mode (default), before you can change the boot mode to
iso-ignored
.
bootcmd
from
the ISO, then using the iso-ignored
boot mode causes the bootcmd
section being ignored or ineffective.- Connect to the target appliance via SSH then switch to the root
user:
ssh apicadm@{ova appliance hostname} sudo -i
- Edit the file
/etc/default/grub.d/50-cloudimg-settings.cfg
to ensure that theGRUB_TIMEOUT
andGRUB_RECORDFAIL_TIMEOUT
are set to the value5
. Then run the commandupdate-grub
. For example:root@ip-192-168-122-241:~# update-grub Sourcing file `/etc/default/grub' Sourcing file `/etc/default/grub.d/50-cloudimg-settings.cfg' Sourcing file `/etc/default/grub.d/init-select.cfg' Generating grub configuration file ... Found linux image: /boot/vmlinuz-5.4.0-84-generic Found initrd image: /boot/initrd.img-5.4.0-84-generic done
- Set the appliance boot mode to
iso-ignored
with the commandapic boot-mode iso-ignored
. For example:root@ip-192-168-122-241:~# apic boot-mode iso-ignored INFO[0000] Log level: info INFO[0000] current boot mode is: iso-ignored
- Shutdown the VM, and remove the CD/DVD device from the VM configuration through VSphere.
For any subsequent boot of the appliance while it remains in
iso-ignored
boot mode, any ISO file attached will be ignored, and the boot will proceed as normal, whether an ISO file is attached or not.Warning: If the appliance was booted iniso-ignored
boot mode, it is possible to change its boot mode toiso-required
. However, as stated in the prerequisites, it is not possible to immediately switch back toiso-ignored
, and the next boot of the appliance must happen with the configuration ISO attached and boot modeiso-required
.
Configure an appliance for iso-required
boot mode
The mode iso-required
is the default boot mode for all appliances. If the
appliance boot mode was changed to iso-ignored
you can revert back to
iso-required
boot mode.
If the appliance was booted in iso-ignored
boot mode, it is possible to change
its boot mode to iso-required
. However, you cannot immediately switch back to
iso-ignored
, and the next boot of the appliance must happen with the configuration
ISO attached and boot mode iso-required
. After the appliance is booted with ISO
attached in iso-required
boot mode, the boot mode can then be switched to
iso-ignored
if needed.
- Connect to the target appliance via SSH then switch to the root
user:
ssh apicadm@{ova appliance hostname} sudo -i
- Set the appliance boot mode to
iso-required
with the commandapic boot-mode iso-required
. For example:root@ip-192-168-122-241:~# apic boot-mode iso-required INFO[0000] Log level: info INFO[0000] current boot mode is: iso-required
Important: For any subsequent boot of the appliance while it remains iniso-required
boot mode, the configuration ISO file must be connected at boot and for every boot.
Revert back to iso-required
boot mode by booting the appliance in rescue
mode
When an appliance is configured with the iso-ignored
boot mode, the boot
sequence ignores any attached ISO. This means that it is not possible to influence the appliance
configuration during its boot. In case the appliance is not booting properly and the boot mode needs
to be reverted back to iso-required
, proceed as follows:
- Access to the VMware console for the Appliance, and after causing it to reboot, bring up a
console to the appliance. You can give focus to the window by clicking the mouse into it. Press the
Esc
key to access the Linux grub boot menu. For example:GNU GRUB version 2.04 *Ubuntu Advanced options for Ubuntu
- Press
e
and navigate using arrow keys to the line starting withlinux
to appendsystemd.unit=rescue.target
GNU GRUB version 2.04 . . . insmod_part_gpt insmod ext2 if [ x$feature_platform_search_hint = xy ]; then search --no-floppy --fs-uuid --set=root e46da1b8-55ao-4df9-842e-\ 8d80c3a22ffc else search --no-floppy --fs-uuid --set=root e46da1b8-55ao-4df9-842e-8\ d80c3a22ffc fi linux /boot/vmlinuz-5.4.0-84-generic root=LABEL=cloudimg-roo\ tfs ro console=tty1 console=ttyS0 net.ifnames=0 bioosdevname=0 systemd.unit\ =rescue.target initrd /boot/initrd.img-5.4.0-84-generic
- Press
Ctrl+x
to boot. - Press
Enter
to enter maintenance mode. Run the commands:
andrm -f /etc/cloud/cloud-init.disabled
echo -n "iso-required" > /usr/local/lib/appliance-config/boot-mode
[ 3.442687] systemd[1]: Mounted Kernel Debug Filesystem [ 3.444253] systemd[1]: Mounted Kernel Trace Filesystem [ 3.445680] systemd[1]: Finished Create list of static device nodes for the current kernel [ 3.446777] systemd[1]: Finished Set console scheme. [ 3.449347] EXT4-fs (sda1): re-mounted. Opts: (null) [ 3.452687] systemd[1]: Finished Remount Root and Kernel File Systems [ 3.455123] systemd[1]: Finished Load Kernel Modules. [ 3.458487] systemd[1]: Mounting FUSE Control File System... [ 3.461333] systemd[1]: Mounting Kernel Configuration File System... [ 3.462687] systemd[1]: Condition check resulted in Rebuild Hardware Database being skipped. [ 3.464498] systemd[1]: Condition check resulted in Platform Persistant Storage Archival being skipped. [ 3.466292] systemd[1]: Starting Load/Save Randome Seed... [ 3.467324] systemd[1]: Starting Apply Kernel Variables... [ 3.470531] systemd[1]: Starting Create System Users... [ 3.471847] systemd[1]: Mounted FUSE Control File System [ 3.472964] systemd[1]: Started Journal Service Press Enter for maintenance: (or press Ctrl-D to continue): root#ip-192-168-122-241:~# rm -f /etc/cloud/cloud-init.disabled root#ip-192-168-122-241:~# echo -n "iso-required" > /usr/local/lib/appliance-config/boot-mode root#ip-192-168-122-241:~#
- Reboot the appliance with correct configuration ISO attached.