Jump to content

Assigning internal/LAN IP Address for VM


SliMat

Recommended Posts

Hi All,

 

OK - I am hoping someone can help with a specific requirement for my new production server before I buy another Pro key licence ;)

 

I have a 'new' machine which a friend is allowing me to host in his data centre in 2 weeks time. One role of this machine is my Windows SBS Server - which is currently on my existing HP Microserver UnRAID machine and has been working as a VM for about a year now with no real issues. Anyway... SBS is really fussy about IP addresses and it is very fickle if you try to change its IP address. So - my active SBS VM is using an IP address 192.168.74.250. As this is on my LAN which is 192.168.74.xx this works fine.

 

Here lies my lack of knowledge... when I move the new DL380 into service, in the data centre, the IP address assigned to the server could be anything (10.0.10.xx, 192.168.1.xx etc). But for the SBS VM to work properly it MUST have the IP address 192.168.74.250... so how do I control the internal IP address and also route various ports from the physical NIC (10.0.10.xx, etc) to the assigned IP address of the VM (192.168.74.250)?

 

One way I can do this is to fit a router in the data centre, so I can configure the internal IP range as 192.168.74.xx - this would work but its 'another' bit of hardware to monitor and maintain... so I am sure that this can be controlled within UnRAID somewhere - but need some help ;)

 

I have built the DL380 on a trial key and its working great, but as the trial expired recently I have just extended it so only have 15 days more to play before I have to commit to buying a new key... so any pointers would be gratefully received.

 

Also as the machine has 4 x gigabit NICs any thoughts on whether I should connect more than 1 when it goes live and also how to configure UnRAID to get the most out of them... obviously I need to do this before it is installed in the DC as if I do something and lose connection I have an 80 mile drive to plug a keyboard and monitor in ;)

 

I hope I have explained this simply enough... Thanks in advance

Link to comment

Well, one way that you can use - but will probably give you headaches, almost same as the router solution minus the additional moving parts, is to set the network bridge to virbr0, and configure that to your desired subnet.

Personally, I'd workout how to reconfigure SBS to a new IP range as then you won't have to worry about NAT'ing the SBS server.

Link to comment

Thanks Ken, I think learning how to configure virbr0 is what I need to do as a friend who is an IT Engineer assures me that trying to change the IP address of an SBS Server, even using the Microsoft tools to do this, always ends in tears and has advised me to keep the IP address which it was assigned when first installed.

 

Thanks for the pointer - there has to be a way to configure virbr0 to do this... so I will start looking up how to do this.

Link to comment

OK, I made some progress but not sure if I am on the right track.

 

I disabled dockers and VMs and then removed one of my 4 physical NICs from the bonded list... this opened up a new config page in networking for this NIC (eth1), so to test it I assigned an IP Address of 10.0.0.1 and 192.168.74.1 as a gateway. The I restarted VM manager and now have network options of br0 virbr0 and br1 - br1 is showing as route 10.0.0.0/24 gateway br1 in network settings... so I assume (rightly or wrongly) that by assigning br1 to my VM it will be allocated a 10.0.0.xx address. So, I assigned br1 to one of my Ubuntu VMs and when I powered it on I was expecting it to get a 10.0.0.xx address, but it still has 192.168.74.xx - so I am not sure if I have done something wrong, or I may have allocated a static IP of 192.168.74.xx in Ubuntu... so I need to take a look.


Also I am assuming that if this did work, my Ubuntu machine would effectively be in the DMZ, which is not what I want for my SBS machine obviously... so I was hoping to find a port forwarding/NAT configuration page for br1... but dont :( So... it might end up being a physical router in the DC so I can control it confidently!!

 

I'll update any more progress - but if anyone reads this who can help, please chip in ;)

Link to comment

I'm not running VMs right now, but to change the network setting for virbr0, you'll need to use the cli.

use mc and navigate to /etc/libvirt/qemu/networks

edit the default.xml file

change the ip address and the dhcp range

then run this command

virsh net-define /etc/libvirt/qemu/networks/default.xml

This should update your virbr0 network settings.

 

as for the changes you are doing to eth1/br1. please remember its a physical network interface. so what you tried is the equivalent of telling unraid that you have ip 10.0.0.1 (netmask /24) on br1, but you should be using 192.168.74.1 as the gateway (which is not reachable and simply wont work) even while the network on it is 192.168.74.0/24. So its not a surprise the VM will get an IP from 192.168.74.0/24

and if the br1 settings were correct and as expected. it would be on the same level as whatever the cable for eth1 was meant for. (if it used to be part of a bond, then its a neighbor to unraid)

 

the best solution here is probably to run a router, seeing as you have to put up with microsoft servers (which can be crappy annoying - because you claim that you can't even change IPs on the thing) - but you are in a datacenter, so maybe your friend can give you a VLAN, which will give you better options, but way more complexity. persoanlly, I'd run my VM on a seperate VLAN so the network admins can limit the traffic talking to the VM

Link to comment
35 minutes ago, ken-ji said:

the best solution here is probably to run a router, seeing as you have to put up with microsoft servers (which can be crappy annoying - because you claim that you can't even change IPs on the thing) - but you are in a datacenter, so maybe your friend can give you a VLAN, which will give you better options, but way more complexity. persoanlly, I'd run my VM on a seperate VLAN so the network admins can limit the traffic talking to the VM

Thanks Ken - I think you're right, at least using another router will give me an environment I am happy to adminstrate... I totally agree about the MS Servers - but unfortunately I have been using Exchange for so long I have no experience in anything else. AFAIK in a normal Windows Server changing the IP is simple... I think its only SBS which has problems changing the IP... at least thats what I'm told.

 

I will take a look in mc at the XML file and maybe have a play... but reckon I'll end up sticking to a setup I'm familiar with.

 

Thanks for the advice ;)

Link to comment

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...