Too much image copying when using vmbuilder for EC2
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
vm-builder (Ubuntu) |
Confirmed
|
Wishlist
|
Unassigned |
Bug Description
I'm using the latest lp:vmbuilder source to build EBS boot AMIs for EC2. I noticed that there is an awful lot of image file copying being done which seems unnecessary when using vmbuilder for this purpose.
1. vmbuilder installs the image files into a temporary "root" subdirectory
2. The "root" subdirectory is copied with rsync into the "target" directory, which is a loopback filesystem on a huge "root.img" temporary file.
3. The big "root.img" file is copied with "cp" from the temporary directory to a destination directory.
4. I then have to mount this image file and copy the files a fourth time onto the EBS volume in order to create an EBS boot AMI.
Ideally, three of these steps could be eliminated so that the image files are installed directly onto the EBS volume, with the path provided through an option.
Though this does not affect the functionality in a major way, the current four copies take up a good chunk of time, IO, and disk space when building AMIs on EC2.
Parts of the vmbuilder log file for reference:
2010-01-03 00:34:01,285 DEBUG : ['/usr/
2010-01-03 00:34:09,061 DEBUG : ['mount', '-o', 'loop', '/mnt/vmbuilder
[...]
2010-01-03 00:40:13,684 DEBUG : ['rsync', '-aHA', '/mnt/vmbuilder
[...]
2010-01-03 00:40:32,288 DEBUG : ['cp', '--sparse=always', '/mnt/vmbuilder
ProblemType: Bug
Architecture: i386
Date: Sun Jan 3 00:47:11 2010
DistroRelease: Ubuntu 9.10
Ec2AMI: ami-1515f67c
Ec2AMIManifest: ubuntu-
Ec2Availability
Ec2InstanceType: c1.medium
Ec2Kernel: aki-5f15f636
Ec2Ramdisk: ari-0915f660
Package: ubuntu-vm-builder (not installed)
ProcEnviron:
LANG=en_US.UTF-8
SHELL=/bin/bash
ProcVersionSign
SourcePackage: vm-builder
Tags: ec2-images
Uname: Linux 2.6.31-302-ec2 i686
Thanks for the bug report.
Regards
chuck