Commit Graph

31 Commits

Author SHA1 Message Date
Michael Marineau
1539ff334e Merge pull request #98 from marineam/image-size
Image size
2013-08-28 12:25:56 -07:00
Brandon Philips
043dfeb868 Merge pull request #94 from philips/pxe-initial
Pxe initial
2013-08-28 12:09:41 -07:00
Brandon Philips
ce445512fd fix(build_library): fixup naming for the pxe image
based on @marineam's comments fixup the naming and ensure the output
files get picked up by the build system.
2013-08-28 12:04:55 -07:00
Michael Marineau
8a488f890b fix(image_to_vm): Increase STATE in vagrant images to 16GB
Vagrant users are accustomed to much larger disk sizes so lets give it
to them. I'm leaving the others as-is since it is easier to grow than
shrink disks if anyone has a particular size they need.
2013-08-28 11:52:19 -07:00
Michael Marineau
9734ac017f feat(image_to_vm): Make disk layout configurable by VM type.
Use the smaller base format for 'raw' disk images since these will
usually be dd'd to a block device to create AMIs and what not. For
images using qcow2 and vmdk stick with the larger vm size.
2013-08-28 11:35:06 -07:00
Michael Marineau
c6bbadd6e0 feat(image_to_vm): Add 'vmware_insecure' image type.
This bundles the vagrant ssh key, vmdk, and vmx into a zip file for easy
downloading and login access via ssh.
2013-08-27 21:18:12 -07:00
Brandon Philips
a840ae036c feat(build_library): pxe support
This adds support for creating a PXE image and kernel using build_image
2013-08-27 17:33:44 -07:00
Brandon Philips
047e3e0df1 feat(build_library): put all of the partition stuff behind a flag
this lays the groundwork for supporting a cpio img which doesn't have
partitions.
2013-08-22 10:51:11 -07:00
Michael Marineau
34cfe6e07e churn(build_library): Change lots of stateful references to state.
For consistency we are using 'state' these days, not 'stateful'. While
I'm mucking around in this code it seems like a good time to switch.
2013-08-20 22:36:53 -04:00
Michael Marineau
34c324cc3a fix(build_library): Remove GPT writer scripts, call cgpt directly.
This change removes /usr/sbin/write_gpt.sh from images which we have no
use for. This allows us to drop the indirection of writing partition
tables by first writing out a script to call. Now cgpt.py can call cgpt
directly to initialize the partition layout. This opens the way for
further improvements to how disk images are created.
2013-08-20 21:30:22 -04:00
Michael Marineau
0f84e3b05f feat(image_to_vm): Add new and improved qemu wrapper script.
This one is more automagical and sets up ssh keys from ssh-agent and the
user's home directory by default. Also adds an option for setting the
ssh port so it can be something other than 2222. Script should be
sufficiently portable, tested in bash, dash, and ash.
2013-08-18 19:43:07 -04:00
Michael Marineau
b0d2775e0a fix(image_to_vm): Fix backslash in qemu README.
Go me fixing this issue in the script while adding it in the README.
2013-08-11 23:41:05 -04:00
Michael Marineau
bef5728f6e fix(image_to_vm): Cleanup qemu script, document -virtfs 2013-08-11 22:17:20 -04:00
polvi
3a1d4dbe1b Merge pull request #80 from polvi/vagrant-vmware
feat(vagrant): vmware fusion support
2013-08-06 14:01:00 -07:00
Alex Polvi
324f4d86f2 call it --format=vagrant_vmware_fusion 2013-08-06 11:14:03 -07:00
Alex Polvi
55062ec902 feat(vagrant): vmware fusion support 2013-08-06 10:58:18 -07:00
Michael Marineau
f8c0033de2 feat(image_to_vm): Add openstack image, uses oem-ami and qcow2 format. 2013-08-02 15:07:12 -04:00
Michael Marineau
c7ba8cd4a4 fix(image_to_vm): Replace qemu's config file with a script.
The recommended command using the config file was triggering a massive
memory leak in qemu because it was adding both the default virtual
hardware nic as well as the virtio nic. This could be worked around by
adding something like -net none or moving all the -net commands from the
file to the command line but eh. Clearly qemu config files are used and
tested by nobody else so lets just use a trusty script instead.
2013-08-02 14:53:08 -04:00
Michael Marineau
99982182b9 feat(image_to_vm): Switch to qcow2 as default qemu disk format.
We only really need raw images for dd'ing to block devices and this
format has been requested for some cases so lets just use it!
2013-08-02 14:53:08 -04:00
Alex Polvi
9ddb254ac1 feat(vagrant) add version requirement to the vagrantfile 2013-08-01 20:29:38 -07:00
Michael Marineau
9c88c24131 fix(image_to_vm): gzip vagrant's .box files 2013-08-01 22:42:37 -04:00
Michael Marineau
ae3202da32 fix(image_to_vm): Add VM MAC address to Vagrantfile, create box image.
Vagrant should now be good to go!
2013-08-01 19:39:12 -04:00
Michael Marineau
a2046afc40 fix(image_to_vm): Use vmdk disks for vagrant and write configs.
Vagrant will need the virtualbox ovf plus its own Vagrantfile config.
After this we will need an optional "package" step to this script to
take these files and bundle them into a .box tarball. This could also be
used to switch from .ovf+vmdk for plain virtualbox images to a bundled
.ova archive which combines the two.
2013-08-01 16:35:28 -04:00
Michael Marineau
ce01e133db fix(image_to_vm): Use vmdk+ovf for virtual box images.
Now we have a config file that can be imported into VirtualBox.
2013-08-01 14:42:04 -04:00
Michael Marineau
5e1337307a feat(image_to_vm): Basic vagrant disk image support
This just generates a vdi that includes the vagrant ssh key.
2013-08-01 00:02:33 -04:00
Michael Marineau
7c48115da6 fix(image_to_vm): Use saved version info instead of parsing directory.
Trying to include version info by adding the directory name to VM image
names didn't work and a better solution is for build_image to write out
a version.txt file. This should also fix an issue where uploading from
image_to_vm.sh didn't always go to the same location as the images
uploaded from build_image did.
2013-07-31 21:22:52 -04:00
Michael Marineau
a1a1ed830c fix(build_library): Use sparse files for disk images, no useless sudo
Enable sparse files for all dd and cp commands and replace some dd
commands that are really better off being truncate commands.

While in the neighborhood there were a number of useless sudo commands
for things that just happen to be in sbin. Call them directly instead.
2013-07-26 23:45:10 -04:00
Michael Marineau
c5cd245603 feat(image_to_vm): Add support for uploading vm images
After this I can make production AMI images available for download! :-D
2013-07-26 16:31:11 -04:00
Michael Marineau
9379ee19f0 fix(vm_image_util): Remove space before # comment in qemu config.
Last minute bug slipped in because of a line I commented out since the
current coreos kernel doesn't support virtio block devices (that change
coming soon). Qemu doesn't tolerate any spaces before # in comments.
2013-07-25 13:54:50 -04:00
Michael Marineau
df886c91e7 fix(vm_image_util): Remove tab characters. 2013-07-25 13:16:04 -04:00
Michael Marineau
033cf224f1 feat(image_to_vm): Refactor to make adding/changing vm formats easier.
The old script was heading towards spaghetti code realm. This breaks up
all the image variations such as hybrid MBR, OEM packages, etc into
configuration options and small functions that actually do the work.

All this is in the new vm_image_util.sh library but the command line
parsing and overall procedure remains in image_to_vm.sh

As part of this we gain support for putting some qemu options in a
config file as well as Xen virtual machines using pygrub and pvgrub.

Lots of generally unused options have been removed to simplify things
and keep output file names consistent.
2013-07-24 23:11:50 -04:00