ML
    • Recent
    • Categories
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    KVM Templates

    Scheduled Pinned Locked Moved IT Discussion
    16 Posts 5 Posters 1.3k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • black3dynamiteB
      black3dynamite
      last edited by

      Here's an example of creating templates.
      https://dnaeon.github.io/creating-a-template-for-kvm-virtual-machines/

      1 Reply Last reply Reply Quote 0
      • stacksofplatesS
        stacksofplates
        last edited by

        There's a couple ways. You could either create the VM manually and do your setup and then clone it later, or use virt-builder to pull in pre-built images. I usually go for virt-builder. The images are smaller and have things preset for KVM (like console access on ttyS0).

        Just as a side note, one cool thing you can do with your templates is inject updated packages. Just do virt-customize --update --selinux-relabel on your template and it will update the packages inside and relabel SELinux (obv only use if it's a RHEL based VM).

        A Emad RE 2 Replies Last reply Reply Quote 3
        • A
          Alex Sage @stacksofplates
          last edited by

          @stacksofplates Interesting. Can you tell me more about this?

          stacksofplatesS 1 Reply Last reply Reply Quote 0
          • Emad RE
            Emad R @stacksofplates
            last edited by Emad R

            @stacksofplates

            Is there web portal repo for virt-builder ?

            And ever heard of RawHide VM? WTF is that ?

            black3dynamiteB 1 Reply Last reply Reply Quote 0
            • black3dynamiteB
              black3dynamite @Emad R
              last edited by

              @emad-r said in KVM Templates:

              @stacksofplates

              Is there web portal repo for virt-builder ?

              http://builder.libguestfs.org/

              Emad RE 1 Reply Last reply Reply Quote 1
              • Emad RE
                Emad R @black3dynamite
                last edited by

                @black3dynamite said in KVM Templates:

                @emad-r said in KVM Templates:

                @stacksofplates

                Is there web portal repo for virt-builder ?

                http://builder.libguestfs.org/

                Very nice thanks.

                1 Reply Last reply Reply Quote 0
                • stacksofplatesS
                  stacksofplates @Alex Sage
                  last edited by

                  @aaronstuder said in KVM Templates:

                  @stacksofplates Interesting. Can you tell me more about this?

                  Which part?

                  A 1 Reply Last reply Reply Quote 0
                  • A
                    Alex Sage @stacksofplates
                    last edited by

                    @stacksofplates building templates using virt-builder

                    stacksofplatesS 1 Reply Last reply Reply Quote 0
                    • stacksofplatesS
                      stacksofplates @Alex Sage
                      last edited by

                      @aaronstuder said in KVM Templates:

                      @stacksofplates building templates using virt-builder

                      Oh. It's pretty simple. virt-builder --list gives you a list of images you can use.

                      0_1518740996335_virtlist.png

                      Then just create your template with virt-builder <os> --format <format> imagename.format

                      0_1518741052670_virt-buidler.png

                      Then you can use virt-customize to inject packages, create users, set passwords, etc. Then just clone that for your template.

                      black3dynamiteB 2 Replies Last reply Reply Quote 1
                      • stacksofplatesS
                        stacksofplates
                        last edited by

                        After a specific amount of time, it will download a new image and cache it when running virt-builder. I forget what the amount of time is though.

                        1 Reply Last reply Reply Quote 0
                        • black3dynamiteB
                          black3dynamite @stacksofplates
                          last edited by

                          @stacksofplates That's cool, virt-customize has an option to copy files or directories into the image.

                          stacksofplatesS 1 Reply Last reply Reply Quote 0
                          • stacksofplatesS
                            stacksofplates @black3dynamite
                            last edited by

                            @black3dynamite said in KVM Templates:

                            @stacksofplates That's cool, virt-customize has an option to copy files or directories into the image.

                            Ya, libguestfs has a bunch of cool tools.

                            1 Reply Last reply Reply Quote 1
                            • black3dynamiteB
                              black3dynamite @stacksofplates
                              last edited by

                              @stacksofplates said in KVM Templates:

                              @aaronstuder said in KVM Templates:

                              @stacksofplates building templates using virt-builder

                              Oh. It's pretty simple. virt-builder --list gives you a list of images you can use.

                              0_1518740996335_virtlist.png

                              Then just create your template with virt-builder <os> --format <format> imagename.format

                              0_1518741052670_virt-buidler.png

                              Then you can use virt-customize to inject packages, create users, set passwords, etc. Then just clone that for your template.

                              Is it necessary to add --selinux-relabel when downloading the VM?

                              stacksofplatesS 1 Reply Last reply Reply Quote 0
                              • stacksofplatesS
                                stacksofplates @black3dynamite
                                last edited by stacksofplates

                                @black3dynamite said in KVM Templates:

                                @stacksofplates said in KVM Templates:

                                @aaronstuder said in KVM Templates:

                                @stacksofplates building templates using virt-builder

                                Oh. It's pretty simple. virt-builder --list gives you a list of images you can use.

                                0_1518740996335_virtlist.png

                                Then just create your template with virt-builder <os> --format <format> imagename.format

                                0_1518741052670_virt-buidler.png

                                Then you can use virt-customize to inject packages, create users, set passwords, etc. Then just clone that for your template.

                                Is it necessary to add --selinux-relabel when downloading the VM?

                                No. That’s all in the image. Only when updating the packages with libguestfstools

                                1 Reply Last reply Reply Quote 0
                                • 1 / 1
                                • First post
                                  Last post