Creating a snapshot from packer

25 views
Skip to first unread message

nnat...@ucsd.edu

unread,
Feb 8, 2019, 5:41:30 PM2/8/19
to Packer
I am using packer to create a bunch of images. I want to be able to launch an instance from an image and swap out its root volume to create another image. So I was thinking about stopping the instance and "snapshotting" the new root volume to create an image. I'd like to accomplish this using packer. Is there a way to create snapshots using packer? Is there a recommended approach to accomplishing this? Thanks! 

Rickard von Essen

unread,
Feb 9, 2019, 3:41:25 AM2/9/19
to packe...@googlegroups.com
I'm not sure I understand what you want but an EBS backed AMI refers snapshot so those are created when the AMI is created. Also when you launch the instance use to create the new AMI you can override any volume with launch_block_device_mappings.

But if you don't want to do any provisioning you might be better off using the cli directly. 

On Fri, Feb 8, 2019, 23:41 <nnat...@ucsd.edu wrote:
I am using packer to create a bunch of images. I want to be able to launch an instance from an image and swap out its root volume to create another image. So I was thinking about stopping the instance and "snapshotting" the new root volume to create an image. I'd like to accomplish this using packer. Is there a way to create snapshots using packer? Is there a recommended approach to accomplishing this? Thanks! 

--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
 
GitHub Issues: https://github.com/mitchellh/packer/issues
IRC: #packer-tool on Freenode
---
You received this message because you are subscribed to the Google Groups "Packer" group.
To unsubscribe from this group and stop receiving emails from it, send an email to packer-tool...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/packer-tool/abdf5976-6bf5-44be-968d-d38a07abfe7e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

nnat...@ucsd.edu

unread,
Feb 11, 2019, 5:12:10 PM2/11/19
to Packer
Is it possible to create snapshots from a volume in packer? I want to remove a volume from a stopped instance, snapshot it, and then mount an empty volume to the stopped instance and start it again. 

Rickard von Essen

unread,
Feb 12, 2019, 3:41:55 PM2/12/19
to packe...@googlegroups.com
Packer can't make a snapshot from a volume, use the cli for that. Packer was built to reproducible create images from code. A volume of a running instance makes the starting state undefined. 

--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
 
GitHub Issues: https://github.com/mitchellh/packer/issues
IRC: #packer-tool on Freenode
---
You received this message because you are subscribed to the Google Groups "Packer" group.
To unsubscribe from this group and stop receiving emails from it, send an email to packer-tool...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages