Question : hyper v virtual nic on guest machine gets a dhcp assigned ip address

I'm a little confused configuring a virtual server.  I have Windows 2008 64-bit with hyper-v role installed on a server.   This server has 4 physical NIC in it.  The first physical nic I gave a static ip of 192.168.1.5 to for use with the Windows 2008 Server hosting the virtual servers.  I have that NIC plugged into my lan, can ping, etc.

I then went into the Virtual Network Manager, (in the Hyper-V Manager,) and added an external network to my physical NIC #2.  I want this NIC #2 to be my physical connection from Virtual Server One to my LAN.
I created Virtual Machine One and in the settings added NIC #2 to it.  When I did this, (if you are looking at the network connections on The host server itself,) NIC #2  only has the Microsoft  Virtual Switch Protocol checked.  There is now a  Local Area Connection #6 listed and I set that to have a static IP of 192.168.1.6, (which is what I want for Virtual Server One.)  This works fine.  I have network connectivity to Virtual Server One and there are no problems.  Based on what I read, this was the correct procedure to set this up and would be repeated for each virtual server I create on that host server.

What is totally confusing me, is that if I look on the network connections on Virtual Server One...in the TCP properties of my local connection I noticed it is obtaining an IP address automatically, (via DHCP.)  I confirmed this with an /ipconfig on Virtual Server One....it has an ip of 192.168.1.27..as assigned by my DCHP server.

Should I give this connection another different static IP?  Why am I getting this dhcp address?  How the heck should this be configured?  Any help would be appreciated.

Answer : hyper v virtual nic on guest machine gets a dhcp assigned ip address

As far as disabling, I am not sure it it would be the Virtual Switch or LAN 6 and I don't have a Hyper-V server pre R2 to test for you. I always used the same NIC for VM's and the host but I do use management NIC's now. Easy enough to test though, I belive it would be LAN 6 so right click and disable it then test that the Virtual Guest can still communicate. If this works make sure to remove any WINS and DNS pointers to 192.168.1.6.

Look at NIC 2 as sort of 2 network adapters after you choose it to be a virtual network (actually a NIC & a Switch). One passing straight through to the Virtual Macine (Switch) and one physically being used by the Host. The virtual switch just passes network traffic to all VM's attached to the Virtual Network (external) so when your Virtual Machine boots up, it does a DHCP request unless you've given it a static in the VM (Guest) itself.

Unless you have some specific requirements to use the other 2 NIC's, I'd just attach the current Virtual Network to the other 2 VM's. All traffic for all VM's will flow through the physical hosts NIC 2.
Random Solutions  
 
programming4us programming4us