IP Allocation not working

Hello All,

Using Virtualmin Pro

I have been trying to get IP allocation to work with no luck. I have an IP block of 16. I have 4 hosting server templates called starter, silver, gold and platinum. In each server template, I configured "Virtual IP Address" from "None" to "Listed Below" and specified my range.

Then, I went into "Networking -> Network Configuration" and added an IP range to eth0 as well.

Now, when I try to create a "Virtual Server" using any of the templates, I get "Failed to create virtual server : Could not allocate virtual IP address from range"

I have looked through the forum at what different approaches people have taken an none seem to work. I first have to try to get it to work this way before I can count on it working through AWBS.

Any ideas?

Thanks,
G

have you also tried not adding the range to eth0:0 in “Networking -> Network Configuration” ?
Just curious if that would work as the IP’s should already point to that card.

or adding the IP’s to “Addresses and Networking” -> Shared IP Addresses

edit
OK I made a test with one of my IP’s
When creating a domain I clicked Virtual IP, added the IP and clicked (Already active)

Network interface Shared, on IP xx.xxx.xxx.15
Virtual with IP xx.xxx.xxx.36 ( Already active )

and that worked.
Not enabling (Already active) then it failed.<br><br>Post edited by: ronald, at: 2008/06/04 04:52

Hmmmm…I removed the range from eth0 so there is nothing there anymore. I then checked out “Addresses and Networking” -> Shared IP Addresses but don’t see why I have to add each IP there because I don’t want IP’s to be shared. I want IP’s selected from my range that I specified in each server template under “Virtual IP Addresses”

If I try to manually create a domain and choose "Virtual with allocated IP" and then hit "create server", it fails with the following:

Failed to create virtual server : Could not allocate virtual IP address from range

Okay I double checked my own system and I do have the xx.xxx.xxx.36 ip (it is a second IP) to a eth0 and it is the only place this IP exists.

when creating the domain I had to enable the (active already) box else it would fail.

per haps this helps a bit

Ronald,

Thanks for the help. I actually found that when I had created a range to eth0, the range still existed as active to eth0:x all across the board. I deleted each interface of eth0:x and was able to create a virtual server with an IP from the range. It choose one automatically starting from the "base" IP I told it to. :-D…YAY!!!

Now, I have to figure out why in AWBS, when creating the domain, it is still wanting to use the default shared IP instead of IP’s from the range. I am on mission two now :wink:

I know this is a question for AWBS but if anyone here uses it and can tell me how they are able to have AWBS select an IP from the range I specified in VM, I will appreciate it.

Thanks,
G

sighhh…AWBS support says that all AWBS does is look at the templates I have setup on the server and follows most of the instructions from there. So, in my templates, I do have Virtual IP Addresses range set but when creating the virtual server through AWBS, it still won’t choose an IP from the range. It’ll only choose an IP from the range if I set the virtual server manually and tell it to pick an IP from the range.

Is this just the way it is?

i have no experience with AWBS and I will never get it neither :stuck_out_tongue:

however I do know it simply reads the VM template and there you need to enter the desired IP by hand as only you know what domain you want on which IP (if I understood you correctly).

Now if I was an extremely talented and gifted developer (and Im quite the opposite) I might be able to come up with a piece of code that tells the template to pick an IP in a specific order

per haps Joe or Jamie can help you with this.
I’m on the end of my Latin :smiley:

ronald wrote:

Now if I was an extremely talented and gifted developer (and Im quite the opposite) I might be able to come up with a piece of code that tells the template to pick an IP in a specific order

That is exactly what I am looking for!!! :smiley: I was under the impression that when you specified the IP range in each template, that it should pick up the next available IP address. If this can’t be done, then the range is pointless because I would have to go in there manually and set it anyway. It doesn’t matter which IP it chooses as long as it’s not one that is available.

This could be a pain to manually do because now I would have to have every account in pending mode in AWBS so that I can manually setup a static address for each no order and that doesn’t sound right. I am sure there is a way and I am just not setting it up correctly.

If I figure this out, which I have been at it for 2 days already, I’ll post up.

I’ve asked Jamie to chime in on this thread (and to spend some time figuring out how to make IP allocation make more sense…questions in this area have been coming up a lot lately). Obviously, our IP allocation UI just doesn’t make sense to people.

Joe,

Thanks, I’ll be waiting on some input from Jamie. I am still stuck :wink:

Virtualmin actually does all the work of bringing up the virtual IP addresses itself, so you never need to touch the Network Configuration module … in fact, adding ranges there will just prevent it from using those IPs for your virtual domains.

The correct process for setting a range of IPs to allocate from is :

  1. Go to System Settings -> Server Templates -> Default Settings -> Virtual IP address.
  2. Select the ‘Listed below’ radio button, and enter starting and ending IPs in the fields below it.
  3. Click ‘Save’
  4. Back on the ‘Create Virtual Server’ form, you can set the ‘Network interface’ to ‘Virtual with allocated IP’. A free IP will be chosen from the range when the domain is created, and activated on your system.

A few people have asked about this, so I’m going to have to either make this easier to find, or document it better :slight_smile:

Jamie,

I had the range set on every server template I created except for "Default Settings" template. I went into every server template I created and change the radio button to "From default settings" and removed the range. I then went ahead and added the range ONLY in "default settings" template.

Now, that seems to work nice. The only thing that sucks is that AWBS, when creating the account to a particular template, won’t choose and IP from the allocated range. It’ll choose the default server address. I still have to go into VM and manually click on “Edit Virtual Server” and change it afterwards.

But, this is much better than what I had so I guess I just have to deal with it :wink:

Thanks to all of you guys for the great help.

that’s odd because if AWBS is reading your created template and that template says choose from “default settings in default template” then common sense says it should behave the way you want it.

Per haps AWBS doesn’t know about the default template and can not read it? Is there a way you can inform AWBS of that default template?

If you have different ip range in each template, whichever one is selected at domain creation time will determine the ip allocated. Of course, this assumes that AWBS allows you to select templates…

jamie wrote:

If you have different ip range in each template, whichever one is selected at domain creation time will determine the ip allocated. Of course, this assumes that AWBS allows you to select templates..

That is ok. I don’t have a problem setting up the range and yes, AWBS does allow you to select the templates but for some reason AWBS is not selecting from the range I specify in the templates. See, now I know this should be working…dang…

Since this is a AWBS issue and NOT virtualmin’s you are asking this in the wrong place.

AWBS is a frontend to the API for virtualmin pro and since this issue works inside VM it isn’t a bug for us. Asking for help on the AWBS forums instead is a better idea and get them them to work this out for you.

This is as far as I got with AWBS tech:

"Unless VM will echo out the assigned ip to the API return, I am not sure how we can get the assigned ip in order to stuff the record in AWBS."

I don’t have a clue what else to do. I don’t think it’s a matter of VM having to echo anything. I think it’s more of a matter that AWBS just needs to let VM do it’s job. Is there ANYONE out there running AWBS and VM?

Regards,
G

If AWBS needs to get the assigned IP after creating a domain, it could call lookup-domain.pl with the multiline parameter to get the new domain’s full details.

I don't have a clue what else to do. I don't think it's a matter of VM having to echo anything. I think it's more of a matter that AWBS just needs to let VM do it's job.

Be gentle with the AWBS folks, they’re sensitive. :wink:

Seriously, though, they’ve only got a few Virtualmin-using customers right now…and a few of them have been a bit hostile in support interactions with the AWBS folks. They’ve been pretty good about resolving issues when it is possible to do so, and while it’s still not a perfect interaction and a lot of stuff doesn’t work as well as it should, I think they’re beginning to take Virtualmin users more seriously as the pool of users grows. So, if we all keep working with them, letting them know about problems, and keep the communication channels open, things will continue to improve. In another six months or a year, we may find that AWBS works as well with Virtualmin as anything else they support.

I guess I’ll just have to be patient and wait then :slight_smile: