vmbuilder: Creates mostly empty EC2 images on 64-bit
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
vm-builder (Ubuntu) |
Invalid
|
Undecided
|
Unassigned |
Bug Description
I'm using vmbuilder on 32-bit and 64-bit EC2 instances with identical arguments except for --arch, --kernel, and --ramdisk. The 32-bit EC2 images are created fine, but the 64-bit images are practically empty except for a few /var directories.
I have tracked this down to the extra mount which is performed by vmbuilder when run on the 64-bit instance to generate a 64-bit image:
2009-12-07 07:58:23,638 INFO : Mounting target filesystems
2009-12-07 07:58:23,638 DEBUG : Mounting /
2009-12-07 07:58:23,639 DEBUG : ['mount', '-o', 'loop', '/mnt/vmbuilder
2009-12-07 07:58:23,719 DEBUG : Creating /var/run in root filesystem
2009-12-07 07:58:23,720 DEBUG : Creating /var/lock in root filesystem
2009-12-07 07:58:23,720 DEBUG : Mounting /
2009-12-07 07:58:23,720 DEBUG : ['mount', '-o', 'loop', '/mnt/vmbuilder
2009-12-07 07:58:23,728 DEBUG : Creating /var/run in root filesystem
2009-12-07 07:58:23,729 DEBUG : Creating /var/lock in root filesystem
2009-12-07 07:58:23,730 DEBUG : Mounting /mnt
2009-12-07 07:58:23,730 DEBUG : ['mount', '-o', 'loop', '/mnt/vmbuilder
2009-12-07 07:58:23,739 INFO : Installing guest operating system. This might take some time...
The first mount of / is for the "root.img" file which is eventually used to create the actual EC2 image. Unfortunately, the second mount of "root_.img" on top of / causes everything to be written to "root_.img" which is never used to create the bundle.
Here is the ec2-bundle-image command which shows that it is looking for the system files in "root.img", and not "root_.img" (which is where they were placed because of the second mount above):
2009-12-07 08:03:29,471 DEBUG : ['ec2-bundle-
This problem is currently making it impossible for me to generate 64-bit EC2 images.
Here is the vmbuilder command I am running. It works on 32-bit with only the obvious slight modifications:
sudo vmbuilder/vmbuilder xen ubuntu \
--suite=karmic \
--arch=amd64 \
--dest=
--tmp=/mnt \
--ec2 \
--ec2-
--manifest=
--lock-user \
--component
--part=
--ec2-bundle \
--ec2-upload \
--ec2-register \
--ec2-
--ec2-
--ec2-
--ec2-
--ec2-key=$pk \
--ec2-
--ec2-
--ec2-
--ec2-
--install-
--ppa=
--addpkg=runurl \
--addpkg=
--addpkg=vim \
--addpkg=zip \
--addpkg=unzip \
--addpkg=
--addpkg=sox \
--addpkg=
--addpkg=
--addpkg=
--addpkg=
--addpkg=
--addpkg=
--addpkg=
--addpkg=
--addpkg=
--execscrip
--debug
ProblemType: Bug
Architecture: amd64
Date: Mon Dec 7 10:04:29 2009
DistroRelease: Ubuntu 9.10
Ec2AMI: ami-ab15f6c2
Ec2AMIManifest: ubuntu-
Ec2Availability
Ec2InstanceType: c1.xlarge
Ec2Kernel: aki-fd15f694
Ec2Ramdisk: ari-c515f6ac
Package: python-vm-builder 0.11.3-0ubuntu1
PackageArchitec
ProcEnviron:
LANG=en_US.UTF-8
SHELL=/bin/bash
ProcVersionSign
SourcePackage: vm-builder
Tags: ec2-images
Uname: Linux 2.6.31-302-ec2 x86_64
No sooner entered as a bug than I think I've tracked this down to an invalid "part" file I was using:
root 10240 a1
root 2048 a1
/mnt 1 b
Note the extra "root" entry.
I don't know if this can be used to create validation code to prevent other people from making this dumb mistake, but I'm marking this bug invalid now.