Copy VM with new ID
-
In Hyper-V when I export and import a VM I can assign a new ID
In XO/XOA how can I copy a VM and assigned a new ID?
-
Any export or import will create a new UUID. I'm not sure to understand exactly what do you need, functionally speaking?
-
I need a new ID for Active Directory, otherwise AD things both VMs are the same computer.
-
I think there's a confusion somewhere. Can you define what are you talking exactly about the ID? Each VM has a unique ID in XCP-ng API (called UUID). It seems you are asking for something relative to Microsoft, inside the VM.
-
What he is talking about is Security Identifier (SID) and is specific to Windows. Each Windows machine must have a unique SID in an AD environment. Cloned machines will have identical SID which is bad.
The solution to this problem is sysprep, a Windows tool that will reset SID and other parameters so that each Windows installation is uniquely identifiable. This is something done inside a machine, of course, and is not something that can be done on HV level. VMware, and Hyper-V as seen here, have integrated support for invoking sysprep (or equivalent) during the machine cloning process. This is achieved by sending a signal to the management agent inside a machine (e.g. VMware Guest Tools).
As far as I know, XenServer/XCP-ng management agent is rudimentary and does not have this functionality. In world of XenServer/XCP-ng, machine has to be syspreped manually before it is cloned.
-
@bvitnik Yeah,
sysprep
is and isn't something that I would say the guest tools and hypervisor should know about... I understand why it's a "nice to have" function, but I personally think this falls to the sys-admin to address ahead of a change like this. -
@DustinB While that may be true, the reality is that VMware and Microsoft have integrated such functionality in their virtualization products and it has become de facto standard. Users are expecting such functionality and taking it for granted. No one is bothering with
sysprep
any more. This is one of those things that makes the life much easier and which XenServer/XCP-ng should support to stay relevant in the market.Maybe something can be done trough Cloudbase-Init? I have not delved into that.