[Samba] new DC via clone..

Joachim Lindenberg samba at lindenberg.one
Mon Jul 22 14:57:27 UTC 2024


Hi Luis,
I appreciate that you are trying to help.
1 & 2 - no, it is using another MAC address and machine ID. I am using Hyper-V and specifically asked it to assign new IDs.
3: afaik uuids are local to the system. In previous clones there was no side effect I could attribute to this.
4: While this affects identification and authentication of the VM it should  not affect Samba. Or why?
5: I changed the hostname before (re)joining the domain.
6: I wrote that (before moving to the target network) the machine is using DHCP (and this is a change from the cloned system).
7: did that 😉
8: No idea. Can you please elaborate? And no, as I wrote in the mail to Rowland, a complete DC/DNS-Server is more like 4h installing from scratch. LXC/LXD just doesn´t do the job as I need to move the clone to another system and network.
Answering your other mail: I definitely would appreciate if Samba would integrate with virt-sysprep, but right now it doesn´t.
Thanks & Regards,
Joachim


> -----Ursprüngliche Nachricht-----
> Von: samba <samba-bounces at lists.samba.org> Im Auftrag von Luis
> Peromarta via samba
> Gesendet: Montag, 22. Juli 2024 16:12
> An: Samba List <samba at lists.samba.org>
> Betreff: Re: [Samba] new DC via clone..
> 
> It’s not only Samba.
> 
> When cloning a Linux virtual machine (or metal machine), it’s essential to
> ensure that the new clone is treated as a distinct machine by cleaning or
> clearing several key components.
> 
> At least that I can think of.
> 
> 1. **MAC Address**:
>  - Update the network interface card(s) MAC address in your VM management
> software to avoid network conflicts.
> 
> 2. **Machine ID**:
>  - Clear or regenerate the machine ID located in files such as `/etc/machine-id`
> or `/var/lib/dbus/machine-id`.
> 
> 3. **UUIDs**:
>  - Update the UUIDs used in system files like `/etc/fstab` and in the bootloader
> configuration. Generate new UUIDs for unique identification.
> 
> 4. **SSH Host Keys**:
>  - Remove the existing SSH host keys and generate new ones to ensure unique
> cryptographic identities for secure connections.
> 
> 5. **Hostname**:
>  - Change the hostname to a new, unique name to prevent network conflicts
> and ensure clarity in network management.
> 
> 6. **Network Configuration**:
>  - Adjust the network settings to ensure there are no static IP addresses or
> network configurations that conflict with the original machine.
> 
> 7. **Log Files**:
>  - Clear out old log files to remove any traces of the previous machine’s
> activities and start with a clean slate.
> 
> 8. **Persistent Rules**:
>  - If your distribution uses udev for persistent naming of devices (like network
> interfaces), update or clear these rules to avoid conflicts.
> 
> This is too much work. Deploying a Debian + Samba VM or metal machine is
> 20m. On a LXC container, 5m.
> 
> I just can’t see the advantage.
> On 22 Jul 2024 at 11:55 +0200, Joachim Lindenberg via samba
> <samba at lists.samba.org>, wrote:
> > Hello Rowland,
> > your dislike of clone was not shared by Andrew in
> https://lists.samba.org/archive/samba/2020-December/233699.html. Can you
> please put asside your dislike and help to figure out, which service is defunct,
> as probably the same issue of not knowing which service does not start could
> happen even with a new install?
> > Thanks,
> > Joachim
> >
> > > -----Ursprüngliche Nachricht-----
> > > Von: Joachim Lindenberg <samba at lindenberg.one>
> > > Gesendet: Mittwoch, 17. Juli 2024 17:38
> > > An: 'samba at lists.samba.org' <samba at lists.samba.org>
> > > Betreff: AW: [Samba] new DC via clone..
> > >
> > > Hello Rowland,
> > > of course I joined the clone after cleaning the samba directories.
> > > Regards,
> > > Joachim
> > >
> > > > -----Ursprüngliche Nachricht-----
> > > > Von: samba <samba-bounces at lists.samba.org> Im Auftrag von Rowland
> > > > Penny via samba
> > > > Gesendet: Mittwoch, 17. Juli 2024 17:34
> > > > An: samba at lists.samba.org
> > > > Cc: Rowland Penny <rpenny at samba.org>
> > > > Betreff: Re: [Samba] new DC via clone..
> > > >
> > > > On Wed, 17 Jul 2024 15:48:06 +0200 Joachim Lindenberg via samba
> > > > <samba at lists.samba.org> wrote:
> > > >
> > > > > Hello,
> > > > >
> > > > > I set up yet another DC via a renamed and cleaned clone,
> > > > > following previous discussions in
> > > > > https://lists.samba.org/archive/samba/2020-December/233699.html
> > > > > and https://lists.samba.org/archive/samba/2020-
> December/233750.html.
> > > >
> > > > I didn't think it was a good idea then and I still don't, even
> > > > Andrew said that the 'clone' would have to be re-joined, so what do you
> gain ?
> > > >
> > > > Rowland
> > > >
> > > > --
> > > > To unsubscribe from this list go to the following URL and read the
> > > > instructions: https://lists.samba.org/mailman/options/samba
> >
> >
> > --
> > To unsubscribe from this list go to the following URL and read the
> > instructions: https://lists.samba.org/mailman/options/samba
> --
> To unsubscribe from this list go to the following URL and read the
> instructions:  https://lists.samba.org/mailman/options/samba




More information about the samba mailing list