How to safely copy a Linux VM
-
Hi folks,
We have a CentOS Linux 7 VM here at work, we would like to have a copy of this running on the same network. Any issues with just copying the VHDX and adding that to a new Virtual Machine on our HyperV host?
With our Windows Servers we run sysprep when creating copies to stop duplicate SIDs. Does anything like this need to be ran on the CentOS copy to make it safe?
Best,
Jim -
You should be fine - make sure you change the host name and if it is statically assigned, you will have to give it another address.
-
And SIDs don't apply to Linux - that's a windows thing
-
Will do, thanks for the help. Nice and easy
-
@Jimmy9008 Anytime - let us know if you run into any issues
-
To ask why aren't you using your backup solution to restore a copy of this VM to a different host?
Not that this won't work, but it seems weird to go this route.
-
@DustinB3403 said in How to safely copy a Linux VM:
To ask why aren't you using your backup solution to restore a copy of this VM to a different host?
Not that this won't work, but it seems weird to go this route.
We could. But we can have downtime to the VM. Why not do it like we have and just turn off, copy VHDX, create new VM, attach VHDX? Seems to have worked totally fine to me.
-
You actually need to get a new machine id for your clone VM.
https://www.thegeekdiary.com/centos-rhel-7-how-to-change-the-machine-id/ -
@black3dynamite said in How to safely copy a Linux VM:
You actually need to get a new machine id for your clone VM.
https://www.thegeekdiary.com/centos-rhel-7-how-to-change-the-machine-id/Perfect, thanks. I have followed this process. Glad it got caught as otherwise would not have done this. Thanks for the help.
-
As with many things in Linux... the simple answer makes sense. Windows introduces all kinds of risk and complexity to keep you from simply copying a VM. Linux just keeps it simple.