NetTalk Central

Author Topic: NetClient and VMs created from the same image  (Read 6165 times)

Matthew51

  • Full Member
  • ***
  • Posts: 152
    • View Profile
    • Email
NetClient and VMs created from the same image
« on: July 14, 2022, 03:05:28 PM »
NT 12.39

I'm using Amazon web services that disables all notwork broadcasts, even if the VMs are on the same subnet. I get around this by getting a list of IP addresses from the amazon api and calling NetAutoRemote for each of them.

This works fine when I manually create new VM from scratch. However I'd like to create an image of one VM and use that to create others that are already set up and configured. When I try this the NetClients get confused and can't tell each other apart. I tried having amazon change the computer name in windows when a VM is created to give them a unique NetName, but that didn't work. It looks like they are all getting the same NetID. I can't see how the NetID is created as that is happening inside the DLL, so I don't know what if anything I need to change to make the NetIDs unique.

This confusion even crosses Service Names, so I had to create a fire wall between my test VMs and the production ones.

Is their anything I can do to influence the NetID? And is that even the root of my problem?

Thanks
Matthew
Contractor with 10+ years of NetTalk experience looking for work.
www.linkedin.com/in/matthew-leavitt
BisWare.ca
Check out my free EasyTime Template

Matthew51

  • Full Member
  • ***
  • Posts: 152
    • View Profile
    • Email
Re: NetClient and VMs created from the same image
« Reply #1 on: July 25, 2022, 12:58:34 PM »
Just checking to make sure this didn't get forgotten. Did I explain everything clear enough?

Thank Matthew
Contractor with 10+ years of NetTalk experience looking for work.
www.linkedin.com/in/matthew-leavitt
BisWare.ca
Check out my free EasyTime Template

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: NetClient and VMs created from the same image
« Reply #2 on: August 03, 2022, 09:27:53 PM »
I'm not sure that it _is_ the root of your problem, but you can set the NetName using NetOptions early.

https://www.capesoft.com/docs/NetTalk12/NetTalkUtilityFunctions.htm#NetOptions

see NET:SETNETNAME
you can also use it to read the NetId
NET:GETNETID

Net:AutoIDType is declared in NetAll.Inc

The NetId is stored in the registry once it is created, and created (using random values) if it is not there. So on the VM you use as the "source" for your clones, you should remove these registry items.

HKEY_LOCAL_MACHINE\Software\CapeSoft\NetTalk\GUID

cheers
Bruce

Matthew51

  • Full Member
  • ***
  • Posts: 152
    • View Profile
    • Email
Re: NetClient and VMs created from the same image
« Reply #3 on: August 10, 2022, 10:48:13 AM »
The NetId is stored in the registry once it is created, and created (using random values) if it is not there. So on the VM you use as the "source" for your clones, you should remove these registry items.

HKEY_LOCAL_MACHINE\Software\CapeSoft\NetTalk\GUID

This worked, though I found it under HKEY_CURRENT_USER. I'll have to add that to the list of things to check when making a new template.

Thank You Matthew
Contractor with 10+ years of NetTalk experience looking for work.
www.linkedin.com/in/matthew-leavitt
BisWare.ca
Check out my free EasyTime Template