Hi Mark,



For step #2, you'd typically install the smartos-vmtoools, then us the newly 
installed /lib/smartos/prepare-image script to delete logs, remove passwords, 
etc (the purge process being alluded to).




You can get from here smartos-vmtoools:





https://github.com/joyent/smartos-vmtools




For Linux VMs, the installer for the guest tools is here 
src/linux/install-tools.sh




--Christopher Horrell Manager, Solutions Engineering

Joyent Inc.

http://www.joyent.com/

On Thu, Oct 2, 2014 at 4:30 PM, Mark Creamer via smartos-discuss
<[email protected]> wrote:

> Sorry, Robert - I replied directly rather than to the group...
> I'm trying to create the custom image as Robert suggests. However, I
> haven't been able to find better details documented. In the link above,
> this is all it says about custom KVM images:
> Creating a Custom KVM Image
> The process of creating a KVM image looks like this:
>    1. Create and customize a KVM instance as you wish
>    2. Purge and ready the instance
>    3. Halt the VM: *vmadm stop <UUID>*
>    4. Snapshot the disk0 ZVol: *zfs snapshot zones/<UUID>-disk0@image*
>    5. Dump & Compress the dataset: *zfs send zones/<UUID>-disk0@image |
>    gzip > image_name.zvol.gz*
> You can now import the image locally via imgadm or transfer it to an image
> server.
> What does Item #2 mean? It might as well say "and then a miracle
> happens..." :-))
> Anyway, nothing I've tried is working, so if someone has a step-by-step
> they can share on how to take an existing KVM and turn it into an image to
> make new KVM instances from, I'd greatly appreciate it. Or maybe just tell
> me what Purge and Ready the instance means.
> Thanks!
> On Thu, Oct 2, 2014 at 4:28 PM, Mark Creamer <[email protected]> wrote:
>> I'm trying to create the custom image as Robert suggests. However, I
>> haven't been able to find better details documented. In the link above,
>> this is all it says about custom KVM images:
>>
>> Creating a Custom KVM Image
>>
>> The process of creating a KVM image looks like this:
>>
>>    1. Create and customize a KVM instance as you wish
>>    2. Purge and ready the instance
>>    3. Halt the VM: *vmadm stop <UUID>*
>>    4. Snapshot the disk0 ZVol: *zfs snapshot zones/<UUID>-disk0@image*
>>    5. Dump & Compress the dataset: *zfs send zones/<UUID>-disk0@image |
>>    gzip > image_name.zvol.gz*
>>
>> You can now import the image locally via imgadm or transfer it to an image
>> server.
>>
>>
>> What does Item #2 mean? It might as well say "and then a miracle
>> happens..." :-))
>>
>>
>> Anyway, nothing I've tried is working, so if someone has a step-by-step
>> they can share on how to take an existing KVM and turn it into an image to
>> make new KVM instances from, I'd greatly appreciate it. Or maybe just tell
>> me what Purge and Ready the instance means.
>>
>>
>> Thanks!
>>
>> On Thu, Sep 25, 2014 at 10:46 AM, Robert Mustacchi <[email protected]> wrote:
>>
>>> On 09/25/2014 06:25 AM, Mark Creamer via smartos-discuss wrote:
>>> > Hi, I have a KVM that my team wants to clone so it's easy for them to
>>> turn
>>> > it into a development instance of the original.
>>> >
>>> > I used the procedure on moving a KVM VM to another host, but of course
>>> it
>>> > still has the same UUID as the original. I have already changed other
>>> > parameters like the IP, host and alias names, etc. I wanted to check
>>> first
>>> > to see what the right way to assign it a new UUID so it's different from
>>> > the original, keeping in mind that the zfs file system is also named the
>>> > same as the original.
>>>
>>> Generally the process that folks go down here is to transform this into
>>> an image. For more information, start here:
>>> http://wiki.smartos.org/display/DOC/Managing+Images and if you have
>>> additional questions, I'm sure that the folks on the list can help,
>>> plenty have made custom images before.
>>>
>>> Robert
>>>
>>
>>
>>
>> --
>> Mark
>>
> -- 
> Mark
> -------------------------------------------
> smartos-discuss
> Archives: https://www.listbox.com/member/archive/184463/=now
> RSS Feed: https://www.listbox.com/member/archive/rss/184463/22413671-611b2189
> Modify Your Subscription: https://www.listbox.com/member/?&;
> Powered by Listbox: http://www.listbox.com


-------------------------------------------
smartos-discuss
Archives: https://www.listbox.com/member/archive/184463/=now
RSS Feed: https://www.listbox.com/member/archive/rss/184463/25769125-55cfbc00
Modify Your Subscription: 
https://www.listbox.com/member/?member_id=25769125&id_secret=25769125-7688e9fb
Powered by Listbox: http://www.listbox.com

Reply via email to