Submitted by yngens on Tue, 12/09/2014 - 20:22
I have this situation at hand: on a Cloudmin server with already created DNS-records for a domain name I needed to add Virtualmin and create virtual server using the same domain name. It naturally refused to create a new DNS zone because similar one already existed, so I created a virtual server without DNS and now have to manage its DNS through Webmin interface only while I really wanted to grant Virtualmin to control the same zone.
I see only "Suggested DNS Records" option now on Virtualmin part, so I though maybe Virtualmin needs another option to get associated with the existing on Webmin side DNS zones if virtual servers with similar domain names are requested to be created.
Status:
Closed (fixed)
Comments
Submitted by JamieCameron on Tue, 12/09/2014 - 22:49 Comment #1
There is a way to do this, using the Virtualmin command line API. You need to SSH in as
root
and run :virtualmin enable-feature --domain whatever.com --dns --associate
Submitted by Chris_C on Fri, 12/12/2014 - 21:06 Comment #2
I have a similar scenario, but on Debian 6 and 7. According to the Virtualmin distro upgrade docs for Debian upgrade from Debian 6 to 7, it said to uninstall Dovecot first. Doing so automatically uninstalled Virtualmin (this shoulnd't happen! Virtualmin shouldn't strictly require dovecot to be present in order to function, and uninstall itself when dovecot gets uninstalled!). So, when reinstalling Virtualmin and dovecot, the Bind 9 DNS domain created under virtualmin was forgotten by virtualmin, and had to be managed by hand under webmin.
Same symptoms, "Server Configuration / Suggested DNS Records," fails to notice that the DNS domain is actually hosted on Webmin. "This virtual server's DNS domain is not hosted by your Virtualmin system. If the domain is hosted elsewhere, the records below should be used to ensure that the website and email functions correctly."
And failure when attempting to re-enable the DNS in "Edit Virtual Server / Enabled Features." "Failed to modify server : The DNS domain (yourdomain.com) is already hosted by your DNS server."
Huh?! "domain is not hosted by your Virtualmin system." + "domain is already hosted by your DNS sever." ???????????
It would be nice to have a menu option in the Virtualmin web interface, to do that command line command that you mention above, to re-associate the DNS domain back with the existing Virtualmin virtual server of the same DNS domain name. Virtualmin is able to detect that the "domain is already hosted by your DNS server" so it should provide the option to associate the domain with the virtualmin virtual server.....
Submitted by JamieCameron on Sat, 12/13/2014 - 12:49 Comment #3
The trouble with associating an existing DNS zone is that it may not have the correct records that Virtualmin normally creates - that's why I've limited this to an API function for experienced users who should be able to understands the risks. An incomplete zone might not have the records for mail delivery, SPF, the website and so on..
Submitted by Chris_C on Sat, 12/13/2014 - 15:37 Comment #4
Thanks Jamie for your explanation. I understand the risks of automatically associating the DNS domain from Webmin into Virtualmin.
The domain DNS might be missing some important records, therefore by reconnecting it to the Virtualmin virtual server, the "expected" settings that Virtualmin expects to be present, might be different from the "actual" settings in the DNS records. Is there some way to make it more of a helpful process? 1. spell out the command, right in the user interface, so tha the admin could just copy paste it, to re-connect the BIND DNS domain to the Virtualmin virtual server ? 2. have a button that executes the command? with plenty of warnings and "are you sure" ? 3. after the dns domain is reconnected, offer to run a "validate virtual server" on the virtualmin virtual server, to validate the BIND DNS domain on that particular virtualmin virtual server ?
Submitted by JamieCameron on Sun, 12/14/2014 - 12:30 Comment #5
Ok, I will look into adding this to the UI. However, that may not happen for a release or two .. so until then, the command-line API is the way to go.
Submitted by JamieCameron on Tue, 12/30/2014 - 00:43 Comment #6
An associate / disassociate feature has been added to the UI for the next release of Virtualmin (4.13).
Submitted by Issues on Tue, 01/13/2015 - 00:46 Comment #7
Automatically closed -- issue fixed for 2 weeks with no activity.