Customizing a QNX Azure Virtual Machine
This section describes how to customize your cloud target.
- user accounts, groups, and permissions (e.g., root access for SSH)
- storage, partitions, and files
- boot process
Create an image of a VM in the portalin 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.
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.
- In superuser mode, open /etc/ssh/sshd_config.
- Find the line
PermitRootLogin no
and change it toPermitRootLogin yes
. - Save the configuration file.
- Restart the SSH service to reload the configuration file.
- Confirm that you have root access for SSH.
Managing storage, partitions, and files
- adding storage volumes
- creating and formating partitions
- transferring files
# 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.
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.
# 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 a type 178 partition in sdb1:
fdisk /dev/sdb1 add -t178
-
Reboot the target:
shutdown
-
Confirm the addition of sdb1t178:
ls /dev
-
Format sdb1t178:
mkqnx6fs /dev/sdb1t178
-
Mount sdb1t178
to your desired pathname:
The mounted path is made available for use (e.g., transferring files).mount /dev/sdb1t178 /pathname
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.
Configuring the boot process
-
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 need to run during boot. For details on using the SLM, go to the slm entry in the Utilities Reference.