Installing an operating system from an ISO image
Find out how to install an operating system on an SNC Cloud Platform instance from an ISO image, using Debian 13 as an example, with the OpenStack CLI
Objective
Practical guide to installing an operating system from an ISO image on an SNC Cloud Platform instance, when no ready-to-use image of that system is available in the catalogue. Debian 13 is used as the example. Target audience: anyone comfortable working from the command line and with the installer of an operating system.
This guide covers the platform side of the installation: importing the ISO image, creating the volumes and the network port, starting the installer, connecting to the installed system, then optionally creating a reusable image from it. The steps of the installer itself (here the Debian installer) are not covered: refer to the documentation of the operating system — for Debian, the Debian Installation Guide. Only the points specific to the platform are mentioned.
Requirements
- The OpenStack CLI configured (see the Creating an instance and connecting to it guide for CLI installation and configuration).
- The
memberrole, at minimum, on the project. - The IP address you connect from must be whitelisted by OVHcloud — to request it, open a support ticket.
- The ISO image of the operating system, downloaded to your machine (about 800 MB for the Debian 13 netinst image).
- A security group that allows incoming SSH connections (TCP port 22): the
defaultgroup alone does not allow any incoming connection. For the procedure, see the Managing your private firewall rules section of the "Managing firewall rules and port security on networks using OpenStack CLI" guide.
Instructions
Overview
On SNC Cloud Platform, an instance can only boot from a volume. An ISO image therefore cannot be used directly as the boot source of an instance — the platform refuses it (403 ... Only volume-backed servers are allowed for flavors with zero disk).
The procedure goes through volumes: the ISO image is copied to a volume that is attached to the instance as a CD-ROM drive, and the operating system is installed on a second, blank volume. It follows these steps:
- download and check the ISO image;
- import the ISO image into Glance;
- create a volume from the ISO image (the installer) and a blank volume (the future system disk), then flag the blank volume as bootable;
- create a network port on the shared external network, to know the network settings before the installation;
- create an instance that boots on the system volume, with the installer volume attached as a CD-ROM drive;
- follow the installation through the console;
- connect to the instance;
- optionally, remove the installer volume;
- optionally, create a reusable image from the system volume.
boot_index is the order in which the instance tries to boot: 0 comes first. At the first start, the system volume is blank: the BIOS finds nothing to start from on it and goes on with the next device, the installer. Once the system is installed, the instance starts on the system volume: it does not have to be created again.
The ISO image is presented to the instance as a CD-ROM drive, and the instance starts in BIOS (legacy) mode. This method was validated with the Debian 13 netinst image: other images have not been tested.
An operating system installed from an ISO image is not a cloud image: unless you install cloud-init yourself, the key pair, the user data and the network configuration provided by OpenStack are not applied. The network and the SSH access are configured manually, as described below.
Step 1 — Downloading and checking the ISO image
Download the ISO image from the official website of the distribution (for Debian, the Debian download page), then check its integrity with the checksums published by the distribution (for Debian, see Verifying authenticity of Debian images):
The result must match the checksum published for this image. In this guide, the file is named debian-13.7.0-amd64-netinst.iso: adapt the name to the version you downloaded.
Step 2 — Importing the ISO image into Glance
The image is uploaded from your machine. --min-disk (in GB) and --min-ram (in MB) indicate the minimum resources required by the ISO image. Check that the image is active before going on:
For more details on importing and managing images, see the Managing Glance images guide.
Leave the properties of the image at their default values. Adding the hw_cdrom_bus=scsi and hw_firmware_type=uefi properties to the ISO image leaves the instance stuck in the scheduling phase.
Step 3 — Creating the volumes
iso-volumecontains a copy of the ISO image. Its size must be at least the size of the ISO image, rounded up to the next GiB: 1 GiB is enough for the Debian 13 netinst image.system-volumeis blank: it receives the installed system. Its size is the disk size of the future instance (here 20 GiB, to be adapted to your needs).
As recommended in the Managing Glance images guide, the volume is created from the image beforehand, not when the instance is created. Wait for both volumes to be available:
Then flag the system volume as bootable. Cinder never flags a blank volume as bootable, and the instance boots first on this volume: without this flag, creating the instance fails with 400 ... Block Device <id> is not bootable.
--bootable is a flag without a value: the volume is given as an argument.
Step 4 — Creating the network port
The public subnet of the shared external network has no DHCP server: the installer cannot obtain an address by itself, and you enter the network settings manually during the installation. To know them beforehand, create the network port before the instance.
A port created independently of the instance also survives its deletion (see the Managing public IPs guide). The instance created in step 5 uses this port: its IP address is known before the installation and does not change afterwards, so the network configuration entered in the installer remains valid.
Identify the shared external network of your project (its name starts with Ext-Net) and note its identifier:
Create the port, with a security group that allows incoming SSH connections:
- The security group is set on the port: the security groups specified when an instance is created do not apply to a port that already exists. A port without a security group blocks all incoming traffic, ping included.
- The IP address is assigned automatically from the pool of the network. Choosing a specific address is refused by the platform (
403 Forbidden).
Retrieve the IP address of the port and the identifier of its subnet:
Then read the settings of the subnet:
Note these 4 settings: you will need them in the installer.
Step 5 — Creating the instance with the installer
Create the instance with both volumes: the system volume first, then the installer as a CD-ROM drive:
Key points of this command:
- Both volumes already exist and are referenced with
source_type=volume. boot_index=0is onsystem-volume, attached as a disk (device_type=disk,disk_bus=virtio). While it is blank, the BIOS goes on with the next device. The volume withboot_index=0is the root device of the instance and cannot be detached: this is why it is the system volume, not the installer.boot_index=1is oniso-volume, attached as a CD-ROM drive (device_type=cdrom,disk_bus=sata): this is the device the installer starts from.delete_on_termination=false: the volumes are kept when the instance is deleted. This is essential forsystem-volume, which will contain the installed system.--portattaches the port created in step 4.--block-deviceexpectskey=valuepairs separated by commas, not a JSON structure.
Wait for the instance to reach the ACTIVE status:
Step 6 — Following the installation through the console
From a machine whose IP address is whitelisted, get the console URL and open it in a browser (or use the Console tab of the instance in Horizon):
The boot menu of the installer appears. Follow the installation as described in the documentation of the operating system. Points specific to the platform:
- Network: choose the manual network configuration and enter the settings noted in step 4 (IP address, netmask, gateway, DNS server). The default values proposed by the installer, the netmask in particular, may not match your subnet.
- Installation disk: the installer offers a single disk, the system volume (
/dev/vda, 20 GiB here). The installer volume appears as a CD-ROM drive, not as a disk. - Additional packages: the step that configures apt to install additional packages from the installation medium fails (
An attempt to configure apt to install additional packages from the media failed). Acknowledge the message to continue: this step can be skipped, and the packages are downloaded from the network mirror. - SSH server: to connect with SSH afterwards, select the SSH server in the software selection, or install
openssh-serveronce the system is installed.
The URL of the console is temporary. If the connection fails or the session is closed (Failed to connect to server, Display output is not active), request a new URL with the same command: the installer keeps running.
When the installer indicates that the installation is complete, continue: the instance restarts on the installed system, as the system volume is its first boot device. Nothing else is needed on the platform side. Go on with step 7.
Step 7 — Connecting to the instance
Once the instance has restarted on the installed system, connect with SSH to the IP address of the port (step 4), with the user created during the installation:
If the connection fails, check that the SSH server is installed in the system and that the security group of the port allows TCP port 22. To add a security group to the port:
Then set up key authentication by copying your public key to the instance:
The OpenStack key pair is not applied to a system installed from an ISO image: install your public key as shown above. Once key authentication works, you can disable password authentication in the SSH server configuration (PasswordAuthentication no).
If you plan to create a reusable image from this system (step 9), also install cloud-init in the system. cloud-init applies the configuration provided by OpenStack (key pair, user data, network configuration) to the instances created from the image. Installing it is not enough: the system must also be prepared before the image is created, as described in step 9. On Debian, from the instance, as root:
net-tools provides the route command, which cloud-init uses to set the default route when the network is managed by ifupdown. The installer does not install it, and without it the instance has no default route.
Step 8 — Removing the installer (optional)
Once the system works, the installer volume is no longer needed: the instance starts on the system volume with or without it. A SATA CD-ROM drive cannot be detached from a running instance. To remove the installer volume, stop the instance first, detach iso-volume, then start the instance again:
Once the instance is SHUTOFF, detach the volume and wait for it to be available again:
Start the instance again, then delete what is no longer needed. The volumes are billed as long as they exist, attached or not:
Keep the image if you plan to install other instances from the same ISO image.
Step 9 — Creating a reusable image from the system volume (optional)
system-volume now holds an installed system: you can turn it into a Glance image to create other instances from this system without going through the installer again. This step follows the method of the Backing up and cloning an instance guide: a snapshot of the system volume is turned into a temporary volume, which is then uploaded as an image. Only system-volume is used: this step does not depend on step 8, but it requires cloud-init and net-tools to be installed in the system (see step 7) and the network configuration of the installer to be removed from it (see below).
Before creating the image, prepare the system. The installer wrote a static network configuration (IP address, gateway, DNS server) to the system disk, so the image contains it: an instance created from the image would keep the address entered in the installer instead of its own port's address. The port assigns the IP address on the OpenStack side, but it is cloud-init that applies it in the system. From the instance, as root:
-
Check that cloud-init and net-tools are installed and that cloud-init is enabled (step 7).
-
Remove the static network configuration written by the installer, without deleting the files that cloud-init needs. On Debian with ifupdown, edit
/etc/network/interfaces: delete the interface stanza written by the installer (theallow-hotplugorautoline and theiface … inet staticblock with its address, gateway and DNS settings), and keep thesource /etc/network/interfaces.d/*line and thelostanza. cloud-init writes its own configuration to/etc/network/interfaces.d/50-cloud-init, which is read only through thatsourceline: if you delete the whole file, or leave the installer's stanza next to cloud-init's, the instance comes up without network. If your system uses another network backend (for example/etc/netplan/), identify the files used by your system before changing anything. -
Optionally, clean the cloud-init state and logs of the source instance before the snapshot:
Once the system is prepared, stop the instance to guarantee data consistency: a snapshot of a volume in use is crash-consistent, but not application-consistent. The volume stays in use as long as it is attached to the instance, even a stopped one: the snapshot therefore requires --force.
Wait for the snapshot to be available. The next operations do not involve the instance: you can start it again.
Create a temporary volume from the snapshot, and wait for it to be available:
Upload this volume as an image. Depending on the volume size, creating the image can take some time:
Check that the image is active:
Once the image is active, delete the temporary volume first, then the snapshot:
system-volume remains the system disk of instance. The image debian-13-custom is private: it is only visible in your project. To share it with another project, see the Managing Glance images guide.
To create an instance from this image, follow the Backing up and cloning an instance guide, which also describes the Horizon procedure.
The "Backing up and cloning an instance" guide states that cloud-init reinstalls the network configuration when the new instance starts: this only works if the system is prepared before the image is created (see above). Without this preparation, the image contains the static network configuration entered in the installer, and an instance created from it keeps the old address instead of the settings of its own port, which can cut its network: open its console and adapt the network configuration of the system to the settings of its port, which you find as in step 4.
Known pitfalls (troubleshooting)
Go further
Creating an instance and connecting to it — configuring the OpenStack CLI, connecting to an instance.
Managing Glance images — importing, checking and deleting images, creating volumes from images.
Managing public IPs — independent ports, keeping the same public IP across instances.
Backing up and cloning an instance — backing up the installed instance: the method of step 9 in detail (including Horizon), and creating an instance from an image.
Debian documentation: Debian Installation Guide, Getting Debian, Verifying authenticity of Debian images.
For training or technical assistance implementing our solutions, contact your sales representative or visit our Professional Services page to request a quote and have your project analysed by our experts.
Join our community of users.