Jump to content


 


Register a free account to unlock additional features at BleepingComputer.com
Welcome to BleepingComputer, a free community where people like yourself come together to discuss and learn how to use their computers. Using the site is easy and fun. As a guest, you can browse and view the various discussions in the forums, but can not create a new topic or reply to an existing one unless you are logged in. Other benefits of registering an account are subscribing to topics and forums, creating a blog, and having no ads shown anywhere on the site.


Click here to Register a free account now! or read our Welcome Guide to learn how to use this site.

Photo

Hyper-v, 2012 Host, 2008 vm, external sw


  • Please log in to reply
14 replies to this topic

#1 bzserverguy

bzserverguy

  • Members
  • 8 posts
  • OFFLINE
  •  
  • Local time:08:57 PM

Posted 13 September 2015 - 11:26 AM

Hi. I'm using a 2012 r2 server hyper-v. Home network. Have internet access. Physical NIC.

I created a 2008 server vm. Not a DC. Just a plain 2008 r2 server in a workgroup.
I created an external switch, allowing management OS to share network adapter.
In the virtual machine settings, Network adapter is set to use this external switch.

I want the 2008 server vm to be able to connect to the internet to apply windows updates.
It is unclear to me what I need to do make this happen.

I believe the issue is in the ip configuration but I need some help.

Edited by Al1000, 05 February 2017 - 01:10 PM.
Moved from Networking


BC AdBot (Login to Remove)

 


#2 x64

x64

  • Members
  • 352 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:London UK
  • Local time:01:57 AM

Posted 13 September 2015 - 11:58 AM

Yes, I think you would be correct - the most likely cause would be the IP configuration on the VM.

 

Basically the IP configuration of the VM would need to be valid settings for your physical home network.

 

That could be simply DHCP settings obtained from your router (the same as your home PC probably obtains its IP configuration) or manually configured IP address, subnet mask, gateway, and DNS servers (as IP presume you configured the Hyper-V server, or would statically configure any physical machine on your LAN).

 

The VM IP address would obviously need to be unique and valid on your home LAN. Subnet mask, Gateway, and DNS servers would be exactly the same as your physical machine.

 

You should not need to play that the physical machines IP settings at all (Hyper-V will juggle the IP address settings between additional network adapters that it creates on the physical machine as it create/removes the virtual switches).

 

x64



#3 bzserverguy

bzserverguy
  • Topic Starter

  • Members
  • 8 posts
  • OFFLINE
  •  
  • Local time:08:57 PM

Posted 13 September 2015 - 03:12 PM

Hey x64

 

Thanks for responding.

 

The physical host server (2012r2) gets its ip configuration from the internet provider (router). I'm trying not to play around with assigning a static address to it so I leave it alone.

 

When a virtual switch is created in the Hyperv manager, the host's adapter config shows that it only uses 'Hyperv Extensible Virtual switch' and a new adapter is created called 'vEthernet' which has the appropriate protocols and IPv4 enabled and using tcpipv4 set at 'Obtain IP address automatically'

 

When I run ipconfig /all at the host server (2012r2), The vEthernet adapter shows:

ip: 169.254.136.202

subnet mask: 255.255.0.0

There is no gateway or dns server ip addresses.

 

so in the 2008r2 vm, I configured the adapter tcpipv4:

ip: 169.254.136.203      (random picked. don't know how to identify what unique address is allowed)

subnet mask: 255.255.0.0

no other info was put in.

 

The adapter results in 'Unidentified network'. Can't ping each other and no internet access, naturally.

 

but when I include a gateway & dns ip address in the vm adapter:

gateway: 169.254.136.202

dns server: 169.254.136.202

 

The adapter connects to the network and I can ping each server from one to another, but no internet.

I don't get any error message to offer any clues except the 'page not found' when I try google.com

 

stumped???

 



#4 x64

x64

  • Members
  • 352 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:London UK
  • Local time:01:57 AM

Posted 13 September 2015 - 04:11 PM

The 169.254.x.x addresses are automatic IP addresses, assigned randomly by the computer they are on, and only if the adapter has no other way of allocating an IP address (static or DHCP). They would have nothing to do with your router and are useless for talking to anything that is not on your local LAN. In short they are not part of the solution and are only there because something else is wrong... The computer was not configured with or could not obtain a useful IP address....

 

I'm assuming that you have other devices on your LAN than can access the internet... Do an "ipconfig /all" on those - the Gateway should be the IP address of your router, and maybe the DNS server as well (or you may have a real IP address of the ISP s DNS server there). The IP addresses on the physical server and VM should be from that same range.

 

As you found, the vEthernet adapter inherited the IP configuration of the physical Ethernet adapter and unbound TCP/IP from it - that's normal for an external switch. It left DHCP enabled in the vEthernet adapter - that SHOULD have picked up an IP address from your router, but did not (you ended up with the 169.254 address instead) - A possibilities is lack of physical connectivity to the LAN (bad network cable? I'm assuming that you do not have any third party firewall on the physical server - they might not understand Hyper-V networking.

 

To be honest - I don't think I've ever seen a real server (in production use) that has relied on a truly dynamic IP address, (and I've been installing networks for about 30 years....) You could do worse than set up both the physical server networking and the VM statically. You'd use the same subnet mask, gateway and DNS server IP addresses as a PC on your LAN that IS working, but need to select spare IP addresses from your LAN range to allocate to the physical server and VM. You'd need to know the range of IP addresses that your router can issue and avoid it (if you can get into your router configuration - you should be able to see the range of IP addresses from which it allocates addresses to your LAN PCs) whilst staying in the same subnet (if your subnet mask is 255.255.255.0, and for most home networks it would be - that just means that the first three octets of the IP address must be the same - again for most home networks they would be 192.169.0.something or 192.168.1.something). If you cannot determine the exaxt pool of IP addresses that your router allocates from that range - choose a last octet well away from the other addresses that you can see picked up by PCs.

 

For example if your router (shown as the gateway on working PCs) is 192.168.1.1, and working PCs are picking up 192.168.1.100, 192.168.1.101 etc, you could probably reasonably safely choose 192.168.1.220 for the physical sever and and use 192.168.1.230, .231, .232 etc for the guest VMs.

 

x64



#5 x64

x64

  • Members
  • 352 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:London UK
  • Local time:01:57 AM

Posted 14 September 2015 - 12:41 AM

As a second thought (and as a troubleshooting step)....

 

You could change the Hyper-V switch to "Internal" (which will tear down the vEthernet adapter and make the Physical adapter on the physical server "live" again, get the networking sorted out on the physical server (so that it has proven internet connectivity). Take a not of th TCP/IP settings you ended up with for reference. Then change the Hyper-v switch back to External (observe the reinstatement of the vEthernet adapter and the transfer of TCP/IP settings over to it, and their correct functioning (ir Physical server still on the net).

 

Once you have sorted out the Physical server, troubleshooting the VM (if indeed it still failed to connect) would be easier.

 

x64



#6 bzserverguy

bzserverguy
  • Topic Starter

  • Members
  • 8 posts
  • OFFLINE
  •  
  • Local time:08:57 PM

Posted 14 September 2015 - 10:54 PM

You were right! The host server's ip configuration has been rectified. Internet access ok.

 

Host server: ip address 192.168.1.138

255.255.255.0

gw, dns: 192.168.1.1

 

router's allowable ip addresses: 192.168.1.100 thru 192.168.1.199

 

for the vm: static

ip address: 192.168.1.129

255.255.255.0

gw, dns: 192.168.1.1

 

I can't seem to get a successful ping to and from each other. Not picking up network so no internet access.

Turned off firewall on both while I try to find a solution. Pings return...destination unreachable

Also tried a different IP address for the vm: 192.168.1.125 (made no difference)

 

Since the host server is not a real production server (using for training purposes only), I left it set to pick up address dhcp. Do you recommend to set it static anyway?



#7 x64

x64

  • Members
  • 352 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:London UK
  • Local time:01:57 AM

Posted 15 September 2015 - 01:00 AM

A couple of very quick comments before I leave for work...

Firewall  leave it off - it will get in the way of testing servers - you are ok (in a test environment) as long as you are behind your router...

If I read your post correct - you have connectivity on the host, but not on the VM (and the VM would not pick up a DHCP allocated address from your router?, and still has no connectivity?)

Probably not the cause of lack of connectivity - but if you are statically configuring IP addresses, avoid the range that your router issues (but you must still stick within the same subnet) - so if your router issues 192.168.1.100-.199, then allocate static IP addresses from .200 to .254.

Re use static or DHCP - If you are training for an IT career, then doing things the way you would in a corporate LAN would be the way to go (i.e. static). This would particularly be important if you started building an active directory domain. In that case you would need to run your own DNS on the test servers, and that would be at odds with what you want on your home LAN non-test PCs.

 

Re lack of connectivity to the VM - can you post full "ipconfig /all" from both physical and virtual server?, confirm hyper-v switch is again external, and that there is only one hyper-v switch?

 

x64



#8 bzserverguy

bzserverguy
  • Topic Starter

  • Members
  • 8 posts
  • OFFLINE
  •  
  • Local time:08:57 PM

Posted 16 September 2015 - 07:30 PM

Yes, you are correct. Host server ok. Connectivity on the host but not the vm. The vm wasn't picking up IP from DHCP so I entered static address. and still no connectivity.

 

I entered static IP addresses on the VM that was not within the router range. so I made it 192.168.1 225.

 

and yes, I will be implementing Active Directory domain in the near future on this training server as soon as I rectify these initial issues.

so for now, I'm using static addresses just to get the connectivity going.

 

I can confirm: host server is picking up ip address 192.168.1.138 from dhcp. Internet access is good.

vm server static address 192.168.1.225. Network unidentified. No internet.

 

External switch:  allowing management OS to share network adapter.

Firewalls disabled on both.

only one hyper-v switch

 

I will post screenshots of the ipconfig information shortly.

 

 

Re lack of connectivity to the VM - can you post full "ipconfig /all" from both physical and virtual server?, confirm hyper-v switch is again external, and that there is only one hyper-v switch?



#9 bzserverguy

bzserverguy
  • Topic Starter

  • Members
  • 8 posts
  • OFFLINE
  •  
  • Local time:08:57 PM

Posted 16 September 2015 - 07:58 PM

Here are the two screen shots.

first one is the host server.

note: as a test, I entered static ip address on the host config (same as the dhcp address it was getting)

host server: presidente  (like the beer)

vm: bhmcdc100

 

 

Attached Files

  • Attached File  host.jpg   133.61KB   0 downloads
  • Attached File  vm.jpg   127.31KB   0 downloads


#10 bzserverguy

bzserverguy
  • Topic Starter

  • Members
  • 8 posts
  • OFFLINE
  •  
  • Local time:08:57 PM

Posted 16 September 2015 - 08:04 PM

here's the real vm screen shot. with the .225 address

Attached Files



#11 x64

x64

  • Members
  • 352 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:London UK
  • Local time:01:57 AM

Posted 17 September 2015 - 12:57 AM

Will digest screenshots properly when I get back from work tonight - on surface of it they both look good.

 

One thing to check - in settings for the VM, check that the lan adapter is set to connect to the virtual switch that currently exists....

 

Can you ping the router from the VM?

 

x64



#12 x64

x64

  • Members
  • 352 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:London UK
  • Local time:01:57 AM

Posted 17 September 2015 - 01:30 PM

On the VM screenshot with the .129 address, you have the DNS server as .138 - that should instead be your router .1 for now.

Additionally, as you are planning to make the VM a DC, it WILL need a static IP in the end.At that dime, it will run a DNS server of its own and will need to point to itself doe DNS (and then use a forwarder endry in the DNS server to your router or ISP DNS resolver for internet DNS)

 

The dodgy DNS server entry will stop internet access working by name, but is should not stop pings by IP address.

 

x64



#13 bzserverguy

bzserverguy
  • Topic Starter

  • Members
  • 8 posts
  • OFFLINE
  •  
  • Local time:08:57 PM

Posted 17 September 2015 - 08:24 PM

hello x64

 

you led me in the right direction! I got it working! here's how.

 

In the VM settings adapter, I had already 'set to connect to the virtual switch that currently exists...' as you instructed. I'm not sure why I did this but I had the VLAN ID enabled set at 2. I also had the External switch VLAN ID enabled set at 2. I thought that by having these two parameters matching VLAN IDs, it would be ok to do. As soon as I unchecked those two parameters, after about 20 seconds, my VM was connecting. I'm able to ping host and vms successfully. I have a second vm that's working with those same settings. I'm currently running windows updates on one of my VMs now.

 

I did take into consideration on your findings in your prior message.

DNS ip address is now 192.168.1.1 not .138 (that screen shot was posted by accident. the third screenshot was the correct one I meant to post)

 

thanks again! Will continue to use Bleeping Computer forums to help me train!

Sincerely

BZSERVERGUY



#14 x64

x64

  • Members
  • 352 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:London UK
  • Local time:01:57 AM

Posted 18 September 2015 - 12:52 AM

Ahh yes..... VLAN ID....  that would do it :lol: .

 

Devices on the same VLAN (same VLAN ID in this case) are able to talk to each other (if properly set up) but invisible to other devices on the same cabling that are on other VLANs. For the purposes of what you are doing, once some data is in a VLAN it will stay there and basic networking settings will not help it escape... As an analogy, for the moment think of the different VLAN IDs as different radio channels.

 

You may be interested in some free courses here https://www.microsoftvirtualacademy.com/ It IS run by Microsoft. There are a lot of courses about technology in their newer products and the product lines they are pushing, but hidden in there are some more basic and general courses.

 

x64.



#15 bzserverguy

bzserverguy
  • Topic Starter

  • Members
  • 8 posts
  • OFFLINE
  •  
  • Local time:08:57 PM

Posted 18 September 2015 - 01:38 PM

Thanks for everything! Thanks for the link!

Until I post again!






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users