Some checks failed
Test / test (push) Has been cancelled
Co-authored-by: Cursor <cursoragent@cursor.com>
5.6 KiB
5.6 KiB
Troubleshooting VM 9000 Creation - I/O Errors
Error Summary
The VM creation failed with multiple I/O errors when reading from the source image:
qemu-img: error while reading at byte 130023424: Input/output error- Transfer stopped at ~23% (138.0 MiB of 597.2 MiB)
Root Causes
- Corrupted source image file - The uploaded image may be damaged
- Disk I/O issues on Proxmox host - Storage problems on the Proxmox node
- File location mismatch - File may be in wrong location or format
- Incomplete upload - File transfer may have been interrupted
Diagnostic Steps
1. Check File Integrity on Proxmox Host
SSH into your Proxmox host and run:
# Check if file exists and its size
ls -lh /var/lib/vz/import/ubuntu-24.04-server-cloudimg-amd64.img.raw
ls -lh /var/lib/vz/template/iso/ubuntu-24.04-server-cloudimg-amd64.img
# Check file integrity (if file is readable)
file /var/lib/vz/import/ubuntu-24.04-server-cloudimg-amd64.img.raw
file /var/lib/vz/template/iso/ubuntu-24.04-server-cloudimg-amd64.img
# Try to read file metadata
qemu-img info /var/lib/vz/import/ubuntu-24.04-server-cloudimg-amd64.img.raw 2>&1
qemu-img info /var/lib/vz/template/iso/ubuntu-24.04-server-cloudimg-amd64.img 2>&1
2. Check Disk Health
# Check disk space
df -h /var/lib/vz
# Check for disk errors
dmesg | grep -i error | tail -20
dmesg | grep -i "i/o error" | tail -20
# Check storage pool health
pvesm status
lvdisplay | grep -A 10 "pve"
3. Verify File Checksum (if original available)
If you have the original file, compare checksums:
# On your local machine (if you have the original)
sha256sum ubuntu-24.04-server-cloudimg-amd64.img
# On Proxmox host
sha256sum /var/lib/vz/import/ubuntu-24.04-server-cloudimg-amd64.img.raw
sha256sum /var/lib/vz/template/iso/ubuntu-24.04-server-cloudimg-amd64.img
Quick Fix Script
Automated fix (recommended):
./scripts/fix-corrupted-image.sh
This script will:
- Verify your local image (or download if missing)
- Remove corrupted files on Proxmox host
- Upload a fresh copy via SCP
- Verify the uploaded image
Solutions
Solution 1: Re-upload the Image (Recommended)
- Delete the corrupted file (on Proxmox host):
rm -f /var/lib/vz/import/ubuntu-24.04-server-cloudimg-amd64.img.raw
rm -f /var/lib/vz/template/iso/ubuntu-24.04-server-cloudimg-amd64.img
- Re-download the image (on your local machine):
cd /home/intlc/projects/loc_az_hci
./scripts/download-ubuntu-cloud-image.sh 24.04
-
Upload via Proxmox Web UI:
- Go to: Datacenter → local → Content → Upload
- Select:
downloads/ubuntu-24.04-server-cloudimg-amd64.img - Wait for upload to complete
- Verify file appears in storage
-
Verify upload (on Proxmox host):
qemu-img info /var/lib/vz/template/iso/ubuntu-24.04-server-cloudimg-amd64.img
- Retry VM creation using the steps in
CREATE_VM_9000_STEPS.md
Solution 2: Use API/CLI to Upload (Alternative)
If Web UI upload fails, use command line:
# On Proxmox host, copy file to correct location
scp ubuntu-24.04-server-cloudimg-amd64.img root@<proxmox-ip>:/var/lib/vz/template/iso/
# Or use Proxmox API (from local machine with API access)
# See scripts/create-template-via-api.sh
Solution 3: Download Directly on Proxmox Host
# SSH into Proxmox host
cd /var/lib/vz/template/iso
# Download directly
wget https://cloud-images.ubuntu.com/releases/24.04/release/ubuntu-24.04-server-cloudimg-amd64.img
# Verify
qemu-img info ubuntu-24.04-server-cloudimg-amd64.img
Solution 4: Use Different Storage Location
If local storage has issues, try a different storage:
- Check available storage:
pvesm status
-
Upload to different storage (e.g.,
local-lvmor NFS) -
Create VM using different storage in the Disks tab
Solution 5: Check and Fix Storage Issues
If disk I/O errors persist:
# Check LVM status
vgdisplay
lvdisplay
# Check for filesystem errors
fsck -n /dev/pve/root # Dry run, don't fix yet
# If errors found, schedule filesystem check on next reboot
touch /forcefsck
reboot
Prevention
- Always verify uploads: Check file size and integrity after upload
- Use checksums: Compare SHA256 checksums before and after upload
- Monitor disk health: Regularly check
dmesgfor I/O errors - Use reliable storage: Prefer local-lvm or NFS over local if available
Alternative: Create VM from ISO Instead
If cloud image continues to fail, use ISO installation method:
- Download Ubuntu Server ISO
- Upload ISO to Proxmox
- Create VM with ISO attached
- Install Ubuntu manually
- Configure Cloud-Init
- Convert to template
See scripts/create-vms-from-iso.sh for automation.
Next Steps After Fix
Once the image is successfully uploaded and verified:
- Follow
CREATE_VM_9000_STEPS.mdto create VM 9000 - Configure Cloud-Init settings
- Convert to template
- Verify template works by cloning a test VM
Verification Scripts
After fixing the issue, verify everything is working:
# Verify image integrity on Proxmox host
./scripts/verify-proxmox-image.sh
# Or manually check (SSH into Proxmox)
qemu-img info /var/lib/vz/template/iso/ubuntu-24.04-server-cloudimg-amd64.img
Related Files
CREATE_VM_9000_STEPS.md- Main creation stepsscripts/fix-corrupted-image.sh- Automated fix script (use this first!)scripts/verify-proxmox-image.sh- Image verification scriptscripts/download-ubuntu-cloud-image.sh- Download scriptscripts/create-proxmox-template.sh- Template creation scriptdocs/runbooks/proxmox-operations.md- General Proxmox operations