Detach a deployed machine from MaaS and make it independent.

Can anybody tell me how to detach a server from MaaS after deploying OS, so there is no communication from MaaS to that server further. I need that server to be independent.

After the machine has rebooted it will request the cloud-init user data to MAAS and there should be no further communication to MAAS (unless you enabled HW sync).

Depending on your use case you might want isolate the machine at network level by reconfiguring the switches and isolate the machine into a separated vlan for example.

Hi @r00ta so you are telling to not even to release the machine?

In addition, you may want to remove MAAS DNS from the machine netplan and reapply it, then remove MAAS as http proxy from apt, snap, and maybe other places that MAAS is adding itself as an http proxy. Of course, you can avoid it if you change your global settings so that you specify no proxy: http://maas_url:5240/MAAS/r/settings/network/proxy

It depends on what you are trying to do. If you just want to remove the machine from MAAS you can delete it. But if the machine is still attached to the same network and reboots it will be enlisted in MAAS again. This is why you probably want to isolate such machine also from the MAAS network.

I am using external DNS only. I specify the external DNS in the machine subnet. So it wont use MaaS DNS anymore right??

Hi @r00ta Yeah got it

If you read carefully the UI description for Upstream DNS in the config page http://maas_ip:5240/MAAS/r/settings/network/dns : Upstream DNS used to resolve domains not managed by this MAAS (space-separated IP addresses), you can spot that there is no concept of external DNS only. The netplan will contain MAAS DNS plus the externals you specify. So you have to do this manual step too. You can also confirm by reading the contents of the file in your MAAS deployed machine. For example, this is from my dev MAAS, located at 192.168.2.42:

cat /etc/netplan/50-cloud-init.yaml
...
      nameservers:
        addresses:
        - 192.168.2.42
        - 1.1.1.1
        - 8.8.8.8
        search:
        - maas
...

so what to do, if i dont want MaaS DNS after deployment

As I typed in my first comment, you have to remove the relevant lines from the /etc/netplan/50-cloud-init.yaml and run sudo netplan apply for the changes to take effect.