Customizing a QNX Azure VM

Updated: May 23, 2025

This section describes how to customize your cloud target.

The QNX Image Filesystem (IFS) generates the QNX cloud target; this root IFS should remain unaltered. However, you can manage and configure the following components: To save a copy of your configured target, refer to “Create an image of a VM in the portal” in the Azure documentation: https://learn.microsoft.com/en-us/azure/virtual-machines/capture-image-portal.

Managing user accounts, groups, and permissions

You can control user or group access of the target and enable root access for SSH.

Managing other accounts

If you're in the admin account, then you can control the target's user or group access. For details on managing other accounts, go to the Managing User Accounts chapter in the QNX User's Guide.

Enabling root access for SSH
You can allow root access for SSH. To allow root access for SSH, edit the sshd configuration file of the target:
  1. In superuser mode, open /etc/ssh/sshd_config.
  2. Find the line PermitRootLogin no and change it to PermitRootLogin yes.
  3. Save the configuration file.
  4. Restart the SSH service to reload the configuration file.
  5. Confirm that you have root access for SSH.

Managing storage, partitions, and files

You can perform the following storage management tasks:
  • adding storage volumes
  • creating and formating partitions
  • transferring files
Initially, there is one SDB storage device (sdb0) associated with the target. To view the target's devices, run ls /dev on the target. Here's an example output of the ls /dev command:
# ls /dev
bpf           pci           ptyp4         slog          ttyp0         tymem
console       pf            ptyp5         slog2         ttyp1         urandom
io-sock       pfil          ptyp6         socket        ttyp2         zero
mem           pipe          ptyp7         stderr        ttyp3
mqueue        ptyp0         random        stdin         ttyp4
null          ptyp1         sem           stdout        ttyp5
sdb0          ptyp2         ser1          text          ttyp6
sdb0t178      ptyp3         shmem         tty           ttyp7
The partition /dev/sdb0t178 is a system partition union mounted at / (slash). This small partition should only be for the system libraries and binaries, not for application-level libraries and binaries.
CAUTION:
Don't change the permissions of the directories under /dev/sdb0t178. Otherwise, you'll disable login capabilities for all system users including yourself.
Add storage volumes

You can add larger volumes for application-level libraries and binaries. To attach a volume to the target, refer to “Use the portal to attach a data disk to a Linux VM” in the Azure documentation: https://learn.microsoft.com/en-us/azure/virtual-machines/linux/attach-disk-portal.

After you attach the volume to the target, reboot the target by running shutdown.
Note: The target reboot may take a while for baremetal targets. We recommend adding more storage when you launch a new baremetal target.
After the target reboots, the attached volume appears as the next SDB device sdbN, where N is the next available number (e.g., sdb1) followed by the partition type. In the following example, note the addition of sdb1t179:
# ls /dev
bpf           sdb1          ptyp2         ser1          text          ttyp6
console       sdb1t179      ptyp3         shmem         tty           ttyp7
io-sock       pci           ptyp4         slog          ttyp0         tymem
mem           pf            ptyp5         slog2         ttyp1         urandom
mqueue        pfil          ptyp6         socket        ttyp2         zero
null          pipe          ptyp7         stderr        ttyp3
sdb0          ptyp0         random        stdin         ttyp4
sdb0t178      ptyp1         sem           stdout        ttyp5
Create and format your partitions
You can partition your volume to organize your storage. To partition a volume (e.g., sdb1), run the following commands:
  1. Create a type 178 partition in sdb1:
    fdisk /dev/sdb1 add -t178
  2. Reboot the target:
    shutdown
  3. Confirm the addition of sdb1t178:
    ls /dev
  4. Format sdb1t178:
    mkqnx6fs /dev/sdb1t178
  5. Mount sdb1t178 to your desired pathname:
    mount /dev/sdb1t178 /pathname
    The mounted path is made available for use (e.g., transferring files).
Transfer files

You can transfer files between the host and the mounted storage of the target using the Momentics IDE or the scp utility. For details on using SCP, go to the scp entry in the QNX Utilities Reference.

Configure the boot process

You can either configure the boot process using a startup script or SLM configuration file:
  • startup script

    The boot process looks for the startup script (i.e., /var/start_script.sh) that IFS executes, and then integrates the script code.

  • System Launch and Monitor (SLM) configuration file

    The SLM uses its configuration file (i.e., /etc/slm/slm.conf) to start and manage any custom components that needs to run during boot. For details on using the SLM, go to the slm entry in the Utilities Reference.

By using either the start_script.sh or the SLM, you can launch custom software management tools to perform management tasks such as starting customer-specific processes for lifecycle management.