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)
Required Components
| Component | Purpose | Notes |
|---|---|---|
| cloud-init | Injects SSH keys, sets hostname, runs user-data scripts | Version 22.4 or later recommended |
| SSH server | Enables key-based remote access | openssh-server; password auth should be disabled |
| VirtIO drivers | Paravirtualized disk and network drivers for optimal performance | Built into Linux 2.6.25+; Windows requires separate installation |
| Serial console | Enables emergency console access via the Dashboard | Kernel parameter console=ttyS0 |
| DHCP client | Assigns IP address on first boot | Must use DHCP — static IPs break multi-tenant networking |
| Growroot / cloud-growpart | Expands root partition to fill allocated disk on launch | Required when flavor disk is larger than image base size |
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/hostsupdate - User-data script execution (shell scripts, Ansible, etc.)
- Network interface configuration via DHCP
Install cloud-init
- Ubuntu / Debian
- CentOS / AlmaLinux / Rocky Linux
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 This prevents brute-force attacks on instances with public IP addresses.
/etc/ssh/sshd_config and set:/etc/ssh/sshd_config
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
Disk Partitioning
Use a single root partition
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
/bootpartitions unless required by the OS - Swap partitions — use swap files instead, which cloud-init can create dynamically
GPT vs MBR partition table
GPT vs MBR partition table
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.
Filesystem recommendations
Filesystem recommendations
| Filesystem | Recommendation |
|---|---|
ext4 | Recommended for all Linux images — reliable growroot support |
xfs | Supported — requires xfs_growfs (included in cloud-utils-growpart) |
btrfs | Not recommended — growroot support varies across distributions |
ntfs | Required 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)
Console Logging
Serial console output enables troubleshooting when SSH is unavailable. Enable it by adding the serial console to the kernel command line.- GRUB 2 (most Linux distributions)
Validation
Verify your image meets all requirements before uploading to Xloud.Pre-upload checklist
Pre-upload checklist
Run this checklist on the image before capturing or uploading:
-
cloud-init --versionreturns version 22.4 or later -
cloud-init cleanhas been run to clear cached state - SSH host keys removed from
/etc/ssh/ssh_host_* -
PasswordAuthentication noset in sshd_config - Root partition uses
ext4orxfs - Serial console enabled in GRUB
- Network interface configured for DHCP
- No static IP addresses in network configuration files
- Persistent network interface rules removed
Post-launch validation
Post-launch validation
After launching an instance from the image, verify:Expected output:Also confirm SSH key injection:
Check cloud-init completed successfully
Expected result
Check injected SSH 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.