Sysprep for Linux as a Windows alternative

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
1
down vote

favorite












I want to know if exists an alternative to Sysprep for Linux. I'm working on VM using VMware and I want to clone that machine to create new ones based on this template. And I want to try to make a VM clear as possible.







share|improve this question





















  • Can you elaborate what you expect from a "sysprep for Linux"? In ancient times, Windows needed clean hardware-specific settings. Linux can be copied from one disk to another and is good to go. The only thing you probably want to do is changing the hostname and SSH key (if present). There is not much more to do.
    – Hermann
    Jul 11 at 18:38











  • @Hermann: Windows 10 still needs sysprep so I don't know what you mean by "In ancient times"
    – Jesse_b
    Jul 11 at 20:24






  • 1




    Sysprep isn't really the approach you take w/ Linux. We use packer to build images of Linux systems which we then store in VMWare, Openstack, AWS, and Azure. When we boot these boxes they start up clean.
    – slm♦
    Jul 11 at 20:57










  • Related - superuser.com/questions/463013/… & this access.redhat.com/documentation/en-us/red_hat_enterprise_linux/….
    – slm♦
    Jul 11 at 20:58














up vote
1
down vote

favorite












I want to know if exists an alternative to Sysprep for Linux. I'm working on VM using VMware and I want to clone that machine to create new ones based on this template. And I want to try to make a VM clear as possible.







share|improve this question





















  • Can you elaborate what you expect from a "sysprep for Linux"? In ancient times, Windows needed clean hardware-specific settings. Linux can be copied from one disk to another and is good to go. The only thing you probably want to do is changing the hostname and SSH key (if present). There is not much more to do.
    – Hermann
    Jul 11 at 18:38











  • @Hermann: Windows 10 still needs sysprep so I don't know what you mean by "In ancient times"
    – Jesse_b
    Jul 11 at 20:24






  • 1




    Sysprep isn't really the approach you take w/ Linux. We use packer to build images of Linux systems which we then store in VMWare, Openstack, AWS, and Azure. When we boot these boxes they start up clean.
    – slm♦
    Jul 11 at 20:57










  • Related - superuser.com/questions/463013/… & this access.redhat.com/documentation/en-us/red_hat_enterprise_linux/….
    – slm♦
    Jul 11 at 20:58












up vote
1
down vote

favorite









up vote
1
down vote

favorite











I want to know if exists an alternative to Sysprep for Linux. I'm working on VM using VMware and I want to clone that machine to create new ones based on this template. And I want to try to make a VM clear as possible.







share|improve this question













I want to know if exists an alternative to Sysprep for Linux. I'm working on VM using VMware and I want to clone that machine to create new ones based on this template. And I want to try to make a VM clear as possible.









share|improve this question












share|improve this question




share|improve this question








edited Jul 11 at 21:02









slm♦

233k65479651




233k65479651









asked Jul 11 at 18:31









vicdeveloper

63119




63119











  • Can you elaborate what you expect from a "sysprep for Linux"? In ancient times, Windows needed clean hardware-specific settings. Linux can be copied from one disk to another and is good to go. The only thing you probably want to do is changing the hostname and SSH key (if present). There is not much more to do.
    – Hermann
    Jul 11 at 18:38











  • @Hermann: Windows 10 still needs sysprep so I don't know what you mean by "In ancient times"
    – Jesse_b
    Jul 11 at 20:24






  • 1




    Sysprep isn't really the approach you take w/ Linux. We use packer to build images of Linux systems which we then store in VMWare, Openstack, AWS, and Azure. When we boot these boxes they start up clean.
    – slm♦
    Jul 11 at 20:57










  • Related - superuser.com/questions/463013/… & this access.redhat.com/documentation/en-us/red_hat_enterprise_linux/….
    – slm♦
    Jul 11 at 20:58
















  • Can you elaborate what you expect from a "sysprep for Linux"? In ancient times, Windows needed clean hardware-specific settings. Linux can be copied from one disk to another and is good to go. The only thing you probably want to do is changing the hostname and SSH key (if present). There is not much more to do.
    – Hermann
    Jul 11 at 18:38











  • @Hermann: Windows 10 still needs sysprep so I don't know what you mean by "In ancient times"
    – Jesse_b
    Jul 11 at 20:24






  • 1




    Sysprep isn't really the approach you take w/ Linux. We use packer to build images of Linux systems which we then store in VMWare, Openstack, AWS, and Azure. When we boot these boxes they start up clean.
    – slm♦
    Jul 11 at 20:57










  • Related - superuser.com/questions/463013/… & this access.redhat.com/documentation/en-us/red_hat_enterprise_linux/….
    – slm♦
    Jul 11 at 20:58















Can you elaborate what you expect from a "sysprep for Linux"? In ancient times, Windows needed clean hardware-specific settings. Linux can be copied from one disk to another and is good to go. The only thing you probably want to do is changing the hostname and SSH key (if present). There is not much more to do.
– Hermann
Jul 11 at 18:38





Can you elaborate what you expect from a "sysprep for Linux"? In ancient times, Windows needed clean hardware-specific settings. Linux can be copied from one disk to another and is good to go. The only thing you probably want to do is changing the hostname and SSH key (if present). There is not much more to do.
– Hermann
Jul 11 at 18:38













@Hermann: Windows 10 still needs sysprep so I don't know what you mean by "In ancient times"
– Jesse_b
Jul 11 at 20:24




@Hermann: Windows 10 still needs sysprep so I don't know what you mean by "In ancient times"
– Jesse_b
Jul 11 at 20:24




1




1




Sysprep isn't really the approach you take w/ Linux. We use packer to build images of Linux systems which we then store in VMWare, Openstack, AWS, and Azure. When we boot these boxes they start up clean.
– slm♦
Jul 11 at 20:57




Sysprep isn't really the approach you take w/ Linux. We use packer to build images of Linux systems which we then store in VMWare, Openstack, AWS, and Azure. When we boot these boxes they start up clean.
– slm♦
Jul 11 at 20:57












Related - superuser.com/questions/463013/… & this access.redhat.com/documentation/en-us/red_hat_enterprise_linux/….
– slm♦
Jul 11 at 20:58




Related - superuser.com/questions/463013/… & this access.redhat.com/documentation/en-us/red_hat_enterprise_linux/….
– slm♦
Jul 11 at 20:58










1 Answer
1






active

oldest

votes

















up vote
0
down vote













According to the Redhat website there's virt-sysprep which does similar things that Sysprep does under Windows.




The virt-sysprep command-line tool can be used to reset or unconfigure a guest virtual machine so that clones can be made from it. This process involves removing SSH host keys, removing persistent network MAC configuration, and removing user accounts. Virt-sysprep can also customize a virtual machine, for instance by adding SSH keys, users or logos. Each step can be enabled or disabled as required.




In the linked man page they show things like this:



--append-line '/etc/hosts:10.0.0.1 foo'
--append-line '/etc/hosts:10.0.0.2 bar'


And this:



--commands-from-file FILENAME (see customize below)


Which would then use this file as input:



delete /some/file
install some-package
password some-user:password:its-new-password


References



  • 22.11. VIRT-SYSPREP: RESETTING VIRTUAL MACHINE SETTINGS





share|improve this answer





















    Your Answer







    StackExchange.ready(function()
    var channelOptions =
    tags: "".split(" "),
    id: "106"
    ;
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function()
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled)
    StackExchange.using("snippets", function()
    createEditor();
    );

    else
    createEditor();

    );

    function createEditor()
    StackExchange.prepareEditor(
    heartbeatType: 'answer',
    convertImagesToLinks: false,
    noModals: false,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: null,
    bindNavPrevention: true,
    postfix: "",
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    );



    );








     

    draft saved


    draft discarded


















    StackExchange.ready(
    function ()
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f454762%2fsysprep-for-linux-as-a-windows-alternative%23new-answer', 'question_page');

    );

    Post as a guest






























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes








    up vote
    0
    down vote













    According to the Redhat website there's virt-sysprep which does similar things that Sysprep does under Windows.




    The virt-sysprep command-line tool can be used to reset or unconfigure a guest virtual machine so that clones can be made from it. This process involves removing SSH host keys, removing persistent network MAC configuration, and removing user accounts. Virt-sysprep can also customize a virtual machine, for instance by adding SSH keys, users or logos. Each step can be enabled or disabled as required.




    In the linked man page they show things like this:



    --append-line '/etc/hosts:10.0.0.1 foo'
    --append-line '/etc/hosts:10.0.0.2 bar'


    And this:



    --commands-from-file FILENAME (see customize below)


    Which would then use this file as input:



    delete /some/file
    install some-package
    password some-user:password:its-new-password


    References



    • 22.11. VIRT-SYSPREP: RESETTING VIRTUAL MACHINE SETTINGS





    share|improve this answer

























      up vote
      0
      down vote













      According to the Redhat website there's virt-sysprep which does similar things that Sysprep does under Windows.




      The virt-sysprep command-line tool can be used to reset or unconfigure a guest virtual machine so that clones can be made from it. This process involves removing SSH host keys, removing persistent network MAC configuration, and removing user accounts. Virt-sysprep can also customize a virtual machine, for instance by adding SSH keys, users or logos. Each step can be enabled or disabled as required.




      In the linked man page they show things like this:



      --append-line '/etc/hosts:10.0.0.1 foo'
      --append-line '/etc/hosts:10.0.0.2 bar'


      And this:



      --commands-from-file FILENAME (see customize below)


      Which would then use this file as input:



      delete /some/file
      install some-package
      password some-user:password:its-new-password


      References



      • 22.11. VIRT-SYSPREP: RESETTING VIRTUAL MACHINE SETTINGS





      share|improve this answer























        up vote
        0
        down vote










        up vote
        0
        down vote









        According to the Redhat website there's virt-sysprep which does similar things that Sysprep does under Windows.




        The virt-sysprep command-line tool can be used to reset or unconfigure a guest virtual machine so that clones can be made from it. This process involves removing SSH host keys, removing persistent network MAC configuration, and removing user accounts. Virt-sysprep can also customize a virtual machine, for instance by adding SSH keys, users or logos. Each step can be enabled or disabled as required.




        In the linked man page they show things like this:



        --append-line '/etc/hosts:10.0.0.1 foo'
        --append-line '/etc/hosts:10.0.0.2 bar'


        And this:



        --commands-from-file FILENAME (see customize below)


        Which would then use this file as input:



        delete /some/file
        install some-package
        password some-user:password:its-new-password


        References



        • 22.11. VIRT-SYSPREP: RESETTING VIRTUAL MACHINE SETTINGS





        share|improve this answer













        According to the Redhat website there's virt-sysprep which does similar things that Sysprep does under Windows.




        The virt-sysprep command-line tool can be used to reset or unconfigure a guest virtual machine so that clones can be made from it. This process involves removing SSH host keys, removing persistent network MAC configuration, and removing user accounts. Virt-sysprep can also customize a virtual machine, for instance by adding SSH keys, users or logos. Each step can be enabled or disabled as required.




        In the linked man page they show things like this:



        --append-line '/etc/hosts:10.0.0.1 foo'
        --append-line '/etc/hosts:10.0.0.2 bar'


        And this:



        --commands-from-file FILENAME (see customize below)


        Which would then use this file as input:



        delete /some/file
        install some-package
        password some-user:password:its-new-password


        References



        • 22.11. VIRT-SYSPREP: RESETTING VIRTUAL MACHINE SETTINGS






        share|improve this answer













        share|improve this answer



        share|improve this answer











        answered Jul 11 at 20:59









        slm♦

        233k65479651




        233k65479651






















             

            draft saved


            draft discarded


























             


            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f454762%2fsysprep-for-linux-as-a-windows-alternative%23new-answer', 'question_page');

            );

            Post as a guest













































































            Popular posts from this blog

            How to check contact read email or not when send email to Individual?

            Bahrain

            Postfix configuration issue with fips on centos 7; mailgun relay