can't create virtual server, IP address already in use

Using Virtualmin 3.02, I’m trying to create a virtual server and getting the error:
“Failed to create virtual server : The virtual interface IP address is already in use.”

It’s clear (to me!) that nothing has been assigned to the IP address I’ve defined.

I took a look at the Module Config page, and got a little confused. I attempted to change “Network interface for virtual addresses” from “eth0” to “Detect automatically.” After saving, it displays “Virtualmin’s configuration has not been checked since it was last updated. Click the button below to verify it now” so I clicked to “re-check and refesh configuration” and it displays “Using network interface eth0 for virtual IPs.” Now the confusing part: Going back to the Module Config page, the “Network interface for virtual addresses” remains set as “eth0”, not “Detect automatically” as I thought I requested. Well, anyway I thought, maybe that’s just a UI quirk, so I set the “Network interface for virtual addresses” to eth0:12 (which I knew is live but not in use) and set “Base number for virtual interfaces” from automatic to the IP address I want to use. Then I tried creating a virtual server again and I’m still getting the error: “Failed to create virtual server : The virtual interface IP address is already in use.”

So what’s up? How do I create a virtual server at a specified IP address?

So I tried to be clever, and created a virtual server on the main (shared) IP address. That works, but when I try to "Edit Server" and select "Virtual interface… Create now with IP" and specify the IP address I really want, I get the same error message, "Failed to create virtual server: The virtual interface IP address is already in use." Stymied again.


I do not know about other distro’s but on SuSE 10.0 if you have created an alias interface with yast the IP address is written to file. If you try to create an virtual server with this same address the creation will fail. The system knows that the ip address has already been assigned as a virtual address.

If you use an address that is not already in use it will create the server.

Hope this helps.:slight_smile:

> on SuSE 10.0 if you have created an alias interface
> with yast the IP address is written to file

This is Centos 4. And I haven’t used yast. I’ve got interfaces set up in /etc/sysconfig/network-scripts/ for ifcfg-eth0:0 to ifcfg-eth0:16 with associated IP addresses. Is that what you mean? Where does yast write an IP address to a file? Is that the problem here?

When I first got my machine, my network administrator created a set of interface files for all the IP addresses assigned to the machine in

I removed one of the files, ifcfg-eth0:12, rebooted the network configuration, then tried "Edit Server" and selected "Virtual interface… Create now with IP" and specified the IP address I really want. This time it worked, without any complaint that the IP address was already in use.

Virtualmin created a new file /etc/sysconfig/network-scripts/ifcfg-eth0:17
(the highest numbered existing file was ifcfg-eth0:16) with the IP address I wanted.

So now I know that to “Create a Virtual Server”, Virtualmin creates a needed network interface file based on its best guesses. And it won’t create a server at a specified IP address if the /etc/sysconfig/network-scripts network interface file already exists.

Here’s a suggestion for Joe/Jamie: Maybe if Virtualmin detects an already-existing network interface file, it could display the contents of the file and ask for confirmation to proceed anyway?

I don’t know if my case is unusual. My netadmin is perhaps overly conscientious to have set up the network interface files ahead of time for me. Maybe no other servers are provisioned this way.

I’m left with some questions about the differences between the parameters in the file that Virtualmin creates, compared to the parameters that were set in other files by my netadmin.

My network admininstrator specified:

Virtualmin has:

I’m going to change the file that Virtualmin created to match the parameters from my network admininstrator. I’m clue-challenged when it comes to network configuration, so I don’t know what’s important here.

For the future, should I remove all the unused ifcfg-eth0:xx files and let Virtualmin create them as needed? Do I need to edit them afterward to conform to the parameters my network admininstrator provided, or are these parameters superfluous?

Hope this helps someone else like me!

Here’s a follow-up question:

Under "Edit Server", when I choose "Change IP address", it shows the Virtual interface as "eth0:17".

But I changed it the interface to eth0:12 by editing files in

Where does Virtualmin get the info for the "Change IP address" screen? Can I update something to get the info in sync? So it will report "eth0:12"? How do I do that?