Link to home
Start Free TrialLog in
Avatar of juan perez
juan perez

asked on

Newbie. Windows Server 2012 R2 as host and 2008 R2 as Virtual Machine (Hyper-V)

Hi, I have being playing with Windows Server 2008 R2 several years. With Mysql server, Files share and a SmarterMail app.
I have use it in a local lan but with access from internet (both RDP and Mysql Server)

I am now trying to virtualize it. I have use disk2vhd to "backup" my 2008R2 installation.

I have save both RAID 1 disks (just in case). I have use another hard disk to make these tests.

I have install in the new hard disk Windows Server 2012 R2 Standar with GUI.
I have add Hyper-V role and I have create a new VM with the VHDX that I created .
I can open and start my VM, but I have NO idea how to configure all of stuff in HyperV to get my Mysql Server working again.
I have power off the host's firewall to do the test, but not luck.

I have in my new host (WS2012R2) the same IP that I had in my WS2008R2 server.

I have create only a external virtual switch.

But I can't connect to mysql from local lan (also I can't from internet).

Please, how could I do this simple configuration?

My main objetive is virtualize my old server to make easy the upgrade of hardware of my server, or the server itself. After, I could also configure a new VM with Windows Server 2012 R2  and begin to install slowly all things (mysql, smartermail,...) and check them before "shutting down" the old WS2008R2 VM.

Could anybody help me. Probable it will be very easy, as  I have only one host, and one guest.

Regards,
Avatar of Richard Amiss
Richard Amiss
Flag of United States of America image

I have in my new host (WS2012R2) the same IP that I had in my WS2008R2 server.

This is likely your problem.  You now have essentially (2) servers.  The Host and the Virtual Machine Server, and they are likely using the same IP address.  This is bad in the same way that 2 separate servers should not have the same IP. Rather than reconfigure the NIC and Services on the VM, it might be easier to assign the Host to another IP.
Avatar of Philip Elder
Use the Microsoft Virtual Machine Converter utility to convert the system to a VM.

Set the host's IP to a different IP than your VM.

Once the VM has booted up, set up the networking.

Make sure to remove any hardware management utilities/software so as to clean things up. Also, use the Device Manager Show_Hidden_Devices method to clean-up hardware references there.
IN hyper -v we have different layers of networks :
1.physical networks.
2.logical networks.
3.vm networks.

these are all abstractions over one another , so you should have the idea where your vm is placed in which layer

you should configure this one before going for accessing the mysql server or rdp for that matter , your ip scheme will depend up on this factor .

as far as switched  networks are concerned you have 3 types internal,external,private in nomenclature ,you have chosen the external switch .

your configuration is simple .

instead of giving the same ip to both win2k8 and win 2012r2 give different ip addresses. with in same subnet ,this make easy .
as richard said above give the  windows2012r2std host different ip and then win2k8r2 the same ip. this also makes things easy.

rest is same as you are doing .
Host, IP or etc/drivers/hosts.  Or DNS?

If this is all local, no external DNS, MySQL has direct calls to hosts name not IP.  I think your better off with hosts file for now.

You could get away with that to certain degree in Netbios days but not DNS...(well, you can but no benefit in what you are doing).

Then you have the duplicate IP.  You mentioned 2 systems.  What kind of subnets and options are we talking here.  A single ISP router or a 10 dot network.  The hosts file, despite a mess, would send request to a hostname with different IP per individual machine.

After all, the Internet pointed to one file at a certain location once.

A Firewall NAT, inbound different story.

Are we talking strict internal traffic here and how many VMs?
Steps:

1. Since you have already virtualized your current infra with disk2vhd with same IPs for all servers, make sure to have different IPs for Hyper-V host machine.
2. Since you have already created external virtual switch so you can attach NICs to all your VMs by shut down them first, then right click on a VM and select properties. From new dialog box, under Net Hardware, click on Network adapter, once it will be added you can then assign that external switch from right hand side drop down list.

Once you done the same in all your VMs, start them and check if you are able to connect with your MySQL vm or not within LAN.
Avatar of juan perez
juan perez

ASKER

HI, I have begun again with my VHDX backup file. But before starting it i have done:

Host server 2012R2: change IP to 192.168.1.222, Gateway and DNS 192.168.1.1. Firewall off, and add to my router a port forward for port 3389 (RDP) to ip 192.168.1.222. I can do RDP perfect from outside.

Create an external Switch from my NIC. NO internal switch has been created.

Configure VM 2008R2 with that External Switch

Start VM2008R2. As it had, it has now 192.168.1.200, gateway and DNS 192.168.1.1

After starting it, it install lots of new hardware (I understand that it is because of virtualization). Only one device remains unknow.

After restarting it again I can't use mouse directly. It ask me for install "Integration Services". Before restart it I could use mouse perfectly.
Anyway, I can use the keyboard in the VM.

But I can't reach any mysql server from my lan, also not ping.

I can't also pin from VM to Host or from Host to VM.

I can pin from local lan to 192.168.1.222 without problems.

I want to ask you about installation of Integration Services. In my past tests after installing it, my VM starts in a boot loop so I would prefer to check this after. I prefer now to solve the problem about accessing my VM.

Could do I have to change my Gateway and DNS in my VM ? (for your information, I use IPs, not Name or Domains)
What do you know about boot loop problem?

Thanks a lot.
More....

MAy be it is usefull for you guys.

My VM WS2008R2 has:

ROLES
hyper-v (it was installed before do to some test, but it hasn't any VM)
Network Policy and Access Services
FEATURES
Remove server administration tolos
Windows process activation service
Windows server backup features
NET 3.5.1

My WS2012R2 Host:
ROLES:
Storege Services (I have not yet congfigured it, i think it was installed by default)
Hyper-V
FEATURES (all installed by default, I have not added anything from fresh install):
NET 4.5
WCF Services: TCP port Sharing
Hyper-v Management Tools
SMB
Server grphics Shell
Powershell

As you see, my host installation is very "clear".

In my VM WS2008R2 NEtwork and sharing center I can see this:

HPSERVER40NL (my name in WS2008R2 VM)  ------ EXCLAMATION ----- Unidentifed network ------  RED CROSS --- internet

There is something strange. I think during the first boot of the VM, that I could see in my VM my "NETWORK ICON" close to the datetime without exclamation.

Meanwhile you could read this, i will try again with the VHDX backup file, to do it again, and check if "without rebooting" I can get the mysql server working.

Please, hope your answer, regards,
Make sure the MySQL my.ini "bind-address" setting is set appropriately to your VM server IP, or set to 0.0.0'0 to listen on all IPs.
I know that my WS2008R2 worked perfectly so are you sure that changing my.ini will help? I can't also ping, RDP, ... so I think is a whole problem, not only a Mysql problem, isn`t it ?

I have checked about the first boot of VM I had seen the network icon without explanation. I have taken again my first VHDX, boot it and wait for all new hardware installation. Without restarting my VM I have now TWO network adapters in my VM:
1. Local Area connection 4.
Unidentified Network
No network Access
Local Area Connection - Virtual Network
Public Network
IP4 manual:
192.168.1.200
255.255.255.0
192.168.1.1
DNS: 192.168.1.1

2. Local Area connection 5.
Network 2
Internet Access
Microsoft Virtual Machine Bus Network Adapter
Private Network
IP4 automatically and gives me:
192.168.1.209
255.255.255.0
192.168.1.1

As you see, WS2008R2 has install new hardware:  "Microsoft Virtual Machine Bus Network Adapter"

I don't want to touch anything before asking you for help. I don't want also to restart the VM because I will go into a endless bootloop (neither safe mode, neither other F8 modes helped me yesterday).

What can I do ? Is this help for you? o worse?

REgards,
GReat !!! I have change to:

1. Local Area connection 4.
 Unidentified Network
 No network Access
 Local Area Connection - Virtual Network
 Public Network
 IP4 automatically

 2. Local Area connection 5.
 Network 2
 Internet Access
 Microsoft Virtual Machine Bus Network Adapter
 Private Network
 IP4 manual:
 192.168.1.200
 255.255.255.0
 192.168.1.1
DNS: 192.168.1.1

(sorry for this simple/stupid newbie question)

NOW I can reach both MySQL and RDP from outside and local lan.

Now I want to know:

1. Do I have to disable Local Area connection 4 ?
2. Is it absolutelly neccesary to install Integration Services? remember that I can't use mouse afterwards
3. I will check what problem I have with the endless boot loop. I will check the text of the blue Windows that appears. I remember something about hardware
4. I will reactivate my WS2012R2 firewall. I suppose that I will have to open the ports that I have opened in my WS2008R2 or it is not necessary ?
5. It will be better if I install a second NIC in my HOST and use one for host and one for VM ?
6. I will break the VM SOFTWARE RAID 1 mirror and I will make it in my HOST. is it the best way, isn't it ?
7. For sharing files in local lan, what option is the best? I had my WS2008R2 server with a second raid 1 disks ("D:" unit) from which I shared some folders.
a. I will uninstall it from my VM and give that service from my Host?
b. VM will give that service with a new VHDX file allocated in that "second" raid 1 disks
c. VM will give that service "directly" to the phisical second raid 1 disks. I don't know if this is possible. Could a HOST give access its hard disks to a VM?

Thanks,

Regards,
ASKER CERTIFIED SOLUTION
Avatar of juan perez
juan perez

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Hi, for anyone with the same "easy" problems like me:

4. I will reactivate my WS2012R2 firewall. I suppose that I will have to open the ports that I have opened in my WS2008R2 or it is not necessary ?

I haven't yet cheked it.

5. It will be better if I install a second NIC in my HOST and use one for host and one for VM ?

Yes: I have already done.

6. I will break the VM SOFTWARE RAID 1 mirror and I will make it in my HOST. is it the best way, isn't it ?

Yes, No raid in VM, and yes in Host.

7. For sharing files in local lan, what option is the best? I had my WS2008R2 server with a second raid 1 disks ("D:" unit) from which I shared some folders.

a. I will uninstall it from my VM and give that service from my Host?
b. VM will give that service with a new VHDX file allocated in that "second" raid 1 disks
c. VM will give that service "directly" to the phisical second raid 1 disks. I don't know if this is possible. Could a HOST give access its hard disks to a VM?

I will use b. after reading a lot with google.

Regards,
Hi, this is  the last answer.

4). It is not necesary, traffic go directo to guest machine. It is not necessary to "reopen" ports again in the host firewall

Thanks to everybody that try to help me. Sorry for my initial question.

Regads,
with all help i have finally found solution