Things to keep in mind to change after cloning a Ubuntu server vm












0















I have a Ubuntu 12.04 server running on an vmware workstation 8.
Due to my time limitations I can not afford to install new servers so I decided that I must make 10 clones of it with the exact same configuration.
What must I keep in mind to change besides the IP address, mac address and the hostname so that I don't cause any conflicts between the servers after that?










share|improve this question





























    0















    I have a Ubuntu 12.04 server running on an vmware workstation 8.
    Due to my time limitations I can not afford to install new servers so I decided that I must make 10 clones of it with the exact same configuration.
    What must I keep in mind to change besides the IP address, mac address and the hostname so that I don't cause any conflicts between the servers after that?










    share|improve this question



























      0












      0








      0








      I have a Ubuntu 12.04 server running on an vmware workstation 8.
      Due to my time limitations I can not afford to install new servers so I decided that I must make 10 clones of it with the exact same configuration.
      What must I keep in mind to change besides the IP address, mac address and the hostname so that I don't cause any conflicts between the servers after that?










      share|improve this question
















      I have a Ubuntu 12.04 server running on an vmware workstation 8.
      Due to my time limitations I can not afford to install new servers so I decided that I must make 10 clones of it with the exact same configuration.
      What must I keep in mind to change besides the IP address, mac address and the hostname so that I don't cause any conflicts between the servers after that?







      vmware






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Dec 21 '13 at 16:00









      Braiam

      52.3k20137222




      52.3k20137222










      asked Nov 28 '13 at 20:50









      SpiritSpirit

      120128




      120128






















          3 Answers
          3






          active

          oldest

          votes


















          1














          If you're making 10 clones of an existing server you're still in the trade-off where spending a few hours now, deconstructing its setup and scripting it with Puppet/Chef/Juju/etc and setting up maintenance and monitoring is easily going to offset the time you would spend manually chasing around after servers running individual package updates and wondering what went wrong when a service drops off.



          It's really boring sysop stuff... But as I say, it'll pay for itself within a couple of months and by the end of next year you'll either be thanking me for suggesting it or cursing yourself for ignoring it. IMO that applies when you're dealing with any more than two computers. It doesn't take that long to get this stuff set up.



          But IP address and hostnames are the big two. If you're running network-provisioning services like a DHCP, that's going to cause issues but assuming these are clients, you're probably not going to see any more problems immediately.






          share|improve this answer
























          • Thank you for the reply. They are all tiny webservers with 1G of RAM and will be used by students and they all have static IP addresses. The thing is that the first one is already set up and I don't want to set it up all over again, as I am a Cisco admin and only occasional Linux user - 50% of the stuff I do on a linux machine is by goggling it first on how it's done :) - you get the idea. The initial Apache setup was painful enough so I just want to spare myself the time.

            – Spirit
            Nov 28 '13 at 21:35





















          0














          Yikes, yes IP addresses and hostnames are obvious. However, please be sure you delete /root/.ssh so those VMs don't have your SSH keys to get back into your main server. Same thing if you create that main server VM as your personal server -- remote user accounts that don't need to be on the server.



          Since time is important, is space important? How about a new server,. give student logins to it and have them SSH to their own lightweight container where they can't affect your server. See man -k lxc. FYI, Docker was started using a simple linux container tool called "lxc".



          (1) create brand new Ubuntu or CentOS server; and (2) use Linux Container (lxc "lxc create {servername} -t ubuntu" on your Ubuntu VM. It will let you easily create 10 containers that can be logged into.



          "Oli" raised good point about scripting. See many of the tutorials on digital ocean on using Ansible to create a LXC lab with web servers and database servers. They have both Apache and Nginx versions of the tutorials if you need web server.



          Good luck!



          Larry






          share|improve this answer































            0














            And if it is Ubuntu 18.04 using DHCP and netplan (or you may want to do it anyway), just spent a while trying to figure our why my clone with different MAC addresses got the same ip from a dhcp server...



            You have to change /etc/machine-id to give it a unique name by using



            sudo systemd-machine-id-setup





            share|improve this answer























              Your Answer








              StackExchange.ready(function() {
              var channelOptions = {
              tags: "".split(" "),
              id: "89"
              };
              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',
              autoActivateHeartbeat: false,
              convertImagesToLinks: true,
              noModals: true,
              showLowRepImageUploadWarning: true,
              reputationToPostImages: 10,
              bindNavPrevention: true,
              postfix: "",
              imageUploader: {
              brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
              contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
              allowUrls: true
              },
              onDemand: true,
              discardSelector: ".discard-answer"
              ,immediatelyShowMarkdownHelp:true
              });


              }
              });














              draft saved

              draft discarded


















              StackExchange.ready(
              function () {
              StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f383518%2fthings-to-keep-in-mind-to-change-after-cloning-a-ubuntu-server-vm%23new-answer', 'question_page');
              }
              );

              Post as a guest















              Required, but never shown

























              3 Answers
              3






              active

              oldest

              votes








              3 Answers
              3






              active

              oldest

              votes









              active

              oldest

              votes






              active

              oldest

              votes









              1














              If you're making 10 clones of an existing server you're still in the trade-off where spending a few hours now, deconstructing its setup and scripting it with Puppet/Chef/Juju/etc and setting up maintenance and monitoring is easily going to offset the time you would spend manually chasing around after servers running individual package updates and wondering what went wrong when a service drops off.



              It's really boring sysop stuff... But as I say, it'll pay for itself within a couple of months and by the end of next year you'll either be thanking me for suggesting it or cursing yourself for ignoring it. IMO that applies when you're dealing with any more than two computers. It doesn't take that long to get this stuff set up.



              But IP address and hostnames are the big two. If you're running network-provisioning services like a DHCP, that's going to cause issues but assuming these are clients, you're probably not going to see any more problems immediately.






              share|improve this answer
























              • Thank you for the reply. They are all tiny webservers with 1G of RAM and will be used by students and they all have static IP addresses. The thing is that the first one is already set up and I don't want to set it up all over again, as I am a Cisco admin and only occasional Linux user - 50% of the stuff I do on a linux machine is by goggling it first on how it's done :) - you get the idea. The initial Apache setup was painful enough so I just want to spare myself the time.

                – Spirit
                Nov 28 '13 at 21:35


















              1














              If you're making 10 clones of an existing server you're still in the trade-off where spending a few hours now, deconstructing its setup and scripting it with Puppet/Chef/Juju/etc and setting up maintenance and monitoring is easily going to offset the time you would spend manually chasing around after servers running individual package updates and wondering what went wrong when a service drops off.



              It's really boring sysop stuff... But as I say, it'll pay for itself within a couple of months and by the end of next year you'll either be thanking me for suggesting it or cursing yourself for ignoring it. IMO that applies when you're dealing with any more than two computers. It doesn't take that long to get this stuff set up.



              But IP address and hostnames are the big two. If you're running network-provisioning services like a DHCP, that's going to cause issues but assuming these are clients, you're probably not going to see any more problems immediately.






              share|improve this answer
























              • Thank you for the reply. They are all tiny webservers with 1G of RAM and will be used by students and they all have static IP addresses. The thing is that the first one is already set up and I don't want to set it up all over again, as I am a Cisco admin and only occasional Linux user - 50% of the stuff I do on a linux machine is by goggling it first on how it's done :) - you get the idea. The initial Apache setup was painful enough so I just want to spare myself the time.

                – Spirit
                Nov 28 '13 at 21:35
















              1












              1








              1







              If you're making 10 clones of an existing server you're still in the trade-off where spending a few hours now, deconstructing its setup and scripting it with Puppet/Chef/Juju/etc and setting up maintenance and monitoring is easily going to offset the time you would spend manually chasing around after servers running individual package updates and wondering what went wrong when a service drops off.



              It's really boring sysop stuff... But as I say, it'll pay for itself within a couple of months and by the end of next year you'll either be thanking me for suggesting it or cursing yourself for ignoring it. IMO that applies when you're dealing with any more than two computers. It doesn't take that long to get this stuff set up.



              But IP address and hostnames are the big two. If you're running network-provisioning services like a DHCP, that's going to cause issues but assuming these are clients, you're probably not going to see any more problems immediately.






              share|improve this answer













              If you're making 10 clones of an existing server you're still in the trade-off where spending a few hours now, deconstructing its setup and scripting it with Puppet/Chef/Juju/etc and setting up maintenance and monitoring is easily going to offset the time you would spend manually chasing around after servers running individual package updates and wondering what went wrong when a service drops off.



              It's really boring sysop stuff... But as I say, it'll pay for itself within a couple of months and by the end of next year you'll either be thanking me for suggesting it or cursing yourself for ignoring it. IMO that applies when you're dealing with any more than two computers. It doesn't take that long to get this stuff set up.



              But IP address and hostnames are the big two. If you're running network-provisioning services like a DHCP, that's going to cause issues but assuming these are clients, you're probably not going to see any more problems immediately.







              share|improve this answer












              share|improve this answer



              share|improve this answer










              answered Nov 28 '13 at 21:14









              OliOli

              223k89565765




              223k89565765













              • Thank you for the reply. They are all tiny webservers with 1G of RAM and will be used by students and they all have static IP addresses. The thing is that the first one is already set up and I don't want to set it up all over again, as I am a Cisco admin and only occasional Linux user - 50% of the stuff I do on a linux machine is by goggling it first on how it's done :) - you get the idea. The initial Apache setup was painful enough so I just want to spare myself the time.

                – Spirit
                Nov 28 '13 at 21:35





















              • Thank you for the reply. They are all tiny webservers with 1G of RAM and will be used by students and they all have static IP addresses. The thing is that the first one is already set up and I don't want to set it up all over again, as I am a Cisco admin and only occasional Linux user - 50% of the stuff I do on a linux machine is by goggling it first on how it's done :) - you get the idea. The initial Apache setup was painful enough so I just want to spare myself the time.

                – Spirit
                Nov 28 '13 at 21:35



















              Thank you for the reply. They are all tiny webservers with 1G of RAM and will be used by students and they all have static IP addresses. The thing is that the first one is already set up and I don't want to set it up all over again, as I am a Cisco admin and only occasional Linux user - 50% of the stuff I do on a linux machine is by goggling it first on how it's done :) - you get the idea. The initial Apache setup was painful enough so I just want to spare myself the time.

              – Spirit
              Nov 28 '13 at 21:35







              Thank you for the reply. They are all tiny webservers with 1G of RAM and will be used by students and they all have static IP addresses. The thing is that the first one is already set up and I don't want to set it up all over again, as I am a Cisco admin and only occasional Linux user - 50% of the stuff I do on a linux machine is by goggling it first on how it's done :) - you get the idea. The initial Apache setup was painful enough so I just want to spare myself the time.

              – Spirit
              Nov 28 '13 at 21:35















              0














              Yikes, yes IP addresses and hostnames are obvious. However, please be sure you delete /root/.ssh so those VMs don't have your SSH keys to get back into your main server. Same thing if you create that main server VM as your personal server -- remote user accounts that don't need to be on the server.



              Since time is important, is space important? How about a new server,. give student logins to it and have them SSH to their own lightweight container where they can't affect your server. See man -k lxc. FYI, Docker was started using a simple linux container tool called "lxc".



              (1) create brand new Ubuntu or CentOS server; and (2) use Linux Container (lxc "lxc create {servername} -t ubuntu" on your Ubuntu VM. It will let you easily create 10 containers that can be logged into.



              "Oli" raised good point about scripting. See many of the tutorials on digital ocean on using Ansible to create a LXC lab with web servers and database servers. They have both Apache and Nginx versions of the tutorials if you need web server.



              Good luck!



              Larry






              share|improve this answer




























                0














                Yikes, yes IP addresses and hostnames are obvious. However, please be sure you delete /root/.ssh so those VMs don't have your SSH keys to get back into your main server. Same thing if you create that main server VM as your personal server -- remote user accounts that don't need to be on the server.



                Since time is important, is space important? How about a new server,. give student logins to it and have them SSH to their own lightweight container where they can't affect your server. See man -k lxc. FYI, Docker was started using a simple linux container tool called "lxc".



                (1) create brand new Ubuntu or CentOS server; and (2) use Linux Container (lxc "lxc create {servername} -t ubuntu" on your Ubuntu VM. It will let you easily create 10 containers that can be logged into.



                "Oli" raised good point about scripting. See many of the tutorials on digital ocean on using Ansible to create a LXC lab with web servers and database servers. They have both Apache and Nginx versions of the tutorials if you need web server.



                Good luck!



                Larry






                share|improve this answer


























                  0












                  0








                  0







                  Yikes, yes IP addresses and hostnames are obvious. However, please be sure you delete /root/.ssh so those VMs don't have your SSH keys to get back into your main server. Same thing if you create that main server VM as your personal server -- remote user accounts that don't need to be on the server.



                  Since time is important, is space important? How about a new server,. give student logins to it and have them SSH to their own lightweight container where they can't affect your server. See man -k lxc. FYI, Docker was started using a simple linux container tool called "lxc".



                  (1) create brand new Ubuntu or CentOS server; and (2) use Linux Container (lxc "lxc create {servername} -t ubuntu" on your Ubuntu VM. It will let you easily create 10 containers that can be logged into.



                  "Oli" raised good point about scripting. See many of the tutorials on digital ocean on using Ansible to create a LXC lab with web servers and database servers. They have both Apache and Nginx versions of the tutorials if you need web server.



                  Good luck!



                  Larry






                  share|improve this answer













                  Yikes, yes IP addresses and hostnames are obvious. However, please be sure you delete /root/.ssh so those VMs don't have your SSH keys to get back into your main server. Same thing if you create that main server VM as your personal server -- remote user accounts that don't need to be on the server.



                  Since time is important, is space important? How about a new server,. give student logins to it and have them SSH to their own lightweight container where they can't affect your server. See man -k lxc. FYI, Docker was started using a simple linux container tool called "lxc".



                  (1) create brand new Ubuntu or CentOS server; and (2) use Linux Container (lxc "lxc create {servername} -t ubuntu" on your Ubuntu VM. It will let you easily create 10 containers that can be logged into.



                  "Oli" raised good point about scripting. See many of the tutorials on digital ocean on using Ansible to create a LXC lab with web servers and database servers. They have both Apache and Nginx versions of the tutorials if you need web server.



                  Good luck!



                  Larry







                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Feb 8 at 20:21









                  Larry TimminsLarry Timmins

                  1




                  1























                      0














                      And if it is Ubuntu 18.04 using DHCP and netplan (or you may want to do it anyway), just spent a while trying to figure our why my clone with different MAC addresses got the same ip from a dhcp server...



                      You have to change /etc/machine-id to give it a unique name by using



                      sudo systemd-machine-id-setup





                      share|improve this answer




























                        0














                        And if it is Ubuntu 18.04 using DHCP and netplan (or you may want to do it anyway), just spent a while trying to figure our why my clone with different MAC addresses got the same ip from a dhcp server...



                        You have to change /etc/machine-id to give it a unique name by using



                        sudo systemd-machine-id-setup





                        share|improve this answer


























                          0












                          0








                          0







                          And if it is Ubuntu 18.04 using DHCP and netplan (or you may want to do it anyway), just spent a while trying to figure our why my clone with different MAC addresses got the same ip from a dhcp server...



                          You have to change /etc/machine-id to give it a unique name by using



                          sudo systemd-machine-id-setup





                          share|improve this answer













                          And if it is Ubuntu 18.04 using DHCP and netplan (or you may want to do it anyway), just spent a while trying to figure our why my clone with different MAC addresses got the same ip from a dhcp server...



                          You have to change /etc/machine-id to give it a unique name by using



                          sudo systemd-machine-id-setup






                          share|improve this answer












                          share|improve this answer



                          share|improve this answer










                          answered Feb 13 at 22:01









                          cfnzcfnz

                          11




                          11






























                              draft saved

                              draft discarded




















































                              Thanks for contributing an answer to Ask Ubuntu!


                              • Please be sure to answer the question. Provide details and share your research!

                              But avoid



                              • Asking for help, clarification, or responding to other answers.

                              • Making statements based on opinion; back them up with references or personal experience.


                              To learn more, see our tips on writing great answers.




                              draft saved


                              draft discarded














                              StackExchange.ready(
                              function () {
                              StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f383518%2fthings-to-keep-in-mind-to-change-after-cloning-a-ubuntu-server-vm%23new-answer', 'question_page');
                              }
                              );

                              Post as a guest















                              Required, but never shown





















































                              Required, but never shown














                              Required, but never shown












                              Required, but never shown







                              Required, but never shown

































                              Required, but never shown














                              Required, but never shown












                              Required, but never shown







                              Required, but never shown







                              Popular posts from this blog

                              How to make a Squid Proxy server?

                              第一次世界大戦

                              Touch on Surface Book