[Go] virt-builder, to trivially create various Linux distribution guest images

Source: Internet
Author: User
Tags random seed

http://kashyapc.com/2014/01/27/virt-builder-to-trivially-create-various-linux-distribution-guest-images/

I frequently use, part of the Libguestfs-tools package, as part of virt-builder my work flow.

Rich has extensively documented it, still I felt it's worth pointing out again of its sheer simplicity.

For instance, if you need to create a Fedora guest of size 100G, and of qcow2 format, it's as trivial as (no need for R Oot login):

virt-builder fedora-20--format qcow2--size 100G [   1.0] downloading:http://libguestfs.org/download/builder/fedora-20.xz##################################### ##################################  100.0%[131.0] Planning how to build this image[131.0] uncompressing[139.0] Resi Zing (using Virt-resize) to expand, the disk to 100.0g[220.0] Opening the new disk[225.0] Setting a random seed[225.0] S etting random root password [did you mean to use--root-password?] Setting random password of root to n4kkqjztgdfjjqjj[225.0] finishing Offoutput:fedora-20.qcow2output size:100.0goutput Format:qcow2total usable space:97.7g free      space:97.0g (99%)

Then, import the just created image:

Virt-install--name guest-hyp--ram 8192--vcpus=4--disk   path=/home/test/vmimages/fedora-20.qcow2,format=qcow2, Cache=none   --import

IT provides a serial console for login.

You could also create several other distribution Variants–debian, etc

Http://libguestfs.org/virt-builder.1.html

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.