Skip to main content

Overview

Xloud Compute relies on image-side configuration to inject SSH keys, assign hostnames, configure network interfaces, and deliver user data at instance launch. Images that do not meet these requirements will fail to boot correctly, be unreachable over SSH, or require manual reconfiguration after launch.
Prerequisites
  • An active Xloud account with appropriate permissions
  • Access to the Xloud Dashboard (https://connect.<your-domain>) or CLI configured with credentials
  • API credentials sourced (source admin-openrc.sh)
Test compatibility using a CirrOS image first. CirrOS meets all requirements and launches in seconds, making it ideal for validating your environment before importing production images.

Required Components

ComponentPurposeNotes
cloud-initInjects SSH keys, sets hostname, runs user-data scriptsVersion 22.4 or later recommended
SSH serverEnables key-based remote accessopenssh-server; password auth should be disabled
VirtIO driversParavirtualized disk and network drivers for optimal performanceBuilt into Linux 2.6.25+; Windows requires separate installation
Serial consoleEnables emergency console access via the DashboardKernel parameter console=ttyS0
DHCP clientAssigns IP address on first bootMust use DHCP — static IPs break multi-tenant networking
Growroot / cloud-growpartExpands root partition to fill allocated disk on launchRequired when flavor disk is larger than image base size
Images missing cloud-init will not receive SSH keys at launch. The instance boots but remains inaccessible unless a password was baked into the image.

Cloud-Init Configuration

Cloud-init runs during the first boot of every new instance and handles:
  • SSH public key injection from the keypair selected at launch
  • Hostname assignment and /etc/hosts update
  • User-data script execution (shell scripts, Ansible, etc.)
  • Network interface configuration via DHCP

Install cloud-init

Install cloud-init and cloud-utils

Install on Ubuntu or Debian
apt-get update && apt-get install -y cloud-init cloud-utils cloud-initramfs-growroot

Clean the cloud-init state

Remove any cached instance data before capturing the image:
Reset cloud-init state
cloud-init clean --logs --seed
The instance data directory /var/lib/cloud/ is cleared and ready for re-initialization.

SSH Access

Xloud injects the selected keypair’s public key into the instance’s authorized keys file via cloud-init. Ensure the image is configured correctly for key-based authentication.

Disable password authentication

Edit /etc/ssh/sshd_config and set:
/etc/ssh/sshd_config
PasswordAuthentication no
PubkeyAuthentication yes
This prevents brute-force attacks on instances with public IP addresses.

Remove pre-seeded SSH host keys

Host keys are regenerated on first boot by cloud-init. Remove existing keys so every instance gets unique host keys:
Remove SSH host keys
rm -f /etc/ssh/ssh_host_*

Verify cloud-init SSH module is enabled

Confirm ssh is listed in the cc_ssh cloud-init module:
Check cloud-init configuration
grep -A 5 'cc_ssh' /etc/cloud/cloud.cfg
SSH host keys are regenerated and the instance keypair is injected on first boot.

Disk Partitioning

Use a single root partition

Xloud Compute resizes the root disk to the flavor’s allocated size at launch. A single root partition (/) is the simplest layout and works reliably with cloud-growpart.Avoid:
  • LVM (Logical Volume Manager) — growpart does not automatically extend LVM logical volumes
  • Separate /boot partitions unless required by the OS
  • Swap partitions — use swap files instead, which cloud-init can create dynamically
Both GPT and MBR partition tables are supported. GPT is recommended for disks over 2 TB. When using GPT, ensure a BIOS boot partition is present for GRUB compatibility with non-UEFI instances.
FilesystemRecommendation
ext4Recommended for all Linux images — reliable growroot support
xfsSupported — requires xfs_growfs (included in cloud-utils-growpart)
btrfsNot recommended — growroot support varies across distributions
ntfsRequired for Windows — use Cloudbase-Init for Windows images

Network Configuration

Images must be configured to obtain IP addresses via DHCP. Xloud assigns instance IP addresses through its DHCP service. Static IP configuration in the image causes network conflicts and prevents proper instance addressing.

Configure DHCP on all interfaces

Ensure the primary network interface is set to DHCP. For cloud-init-managed images, cloud-init handles network configuration automatically via the metadata service.Remove any persistent interface rules that bind MAC addresses to interface names:
Remove persistent network rules (Debian/Ubuntu)
rm -f /etc/udev/rules.d/70-persistent-net.rules

Disable network manager caching

On images using NetworkManager, clear cached connection profiles:
Remove NetworkManager connection cache
rm -f /etc/NetworkManager/system-connections/*

Console Logging

Serial console output enables troubleshooting when SSH is unavailable. Enable it by adding the serial console to the kernel command line.

Edit GRUB default configuration

Edit /etc/default/grub and add the serial console parameters:
/etc/default/grub
GRUB_CMDLINE_LINUX="console=tty0 console=ttyS0,115200n8"

Regenerate GRUB configuration

Regenerate GRUB (Debian/Ubuntu)
update-grub
Regenerate GRUB (RHEL-compatible)
grub2-mkconfig -o /boot/grub2/grub.cfg
Console output streams to both the local display and the serial port.

Validation

Verify your image meets all requirements before uploading to Xloud.

Pre-upload checklist

Run this checklist on the image before capturing or uploading:
  • cloud-init --version returns version 22.4 or later
  • cloud-init clean has been run to clear cached state
  • SSH host keys removed from /etc/ssh/ssh_host_*
  • PasswordAuthentication no set in sshd_config
  • Root partition uses ext4 or xfs
  • Serial console enabled in GRUB
  • Network interface configured for DHCP
  • No static IP addresses in network configuration files
  • Persistent network interface rules removed
After launching an instance from the image, verify:
Check cloud-init completed successfully
cloud-init status --long
Expected output:
Expected result
status: done
Also confirm SSH key injection:
Check injected SSH keys
cat ~/.ssh/authorized_keys

Next Steps

Get Cloud Images

Download pre-built images for Ubuntu, AlmaLinux, Rocky Linux, and more.

Modify Images

Customize existing images using virt-customize and guestfish.

Convert Formats

Convert VMDK, VHD, or RAW images to the recommended QCOW2 format.

Upload an Image

Upload a compatible image to the Xloud Image Service.