<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:#954F72;
text-decoration:underline;}
.MsoChpDefault
{mso-style-type:export-only;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
--></style>
</head>
<body lang="EN-US" link="blue" vlink="#954F72">
<div class="WordSection1">
<p class="MsoNormal">As it stands today it’s getting a new MAC address from the host’s pool:</p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">($vm | Get-VMNetworkAdapter).MacAddress</p>
<p class="MsoNormal"> 00155D16FCF</p>
<p class="MsoNormal">Get-VMHost | fl Mac*</p>
<p class="MsoNormal"> MacAddressMaximum : 00155D016FFF</p>
<p class="MsoNormal"> MacAddressMinimum : 00155D016F00</p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Hyper-V does have a MAC parameter <a href="https://www.vagrantup.com/docs/hyperv/configuration.html#mac">
https://www.vagrantup.com/docs/hyperv/configuration.html#mac</a> that could be used. </p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I added this to the Vagrantfile</p>
<p class="MsoNormal"> config.vm.provider "hyperv" do |hv|</p>
<p class="MsoNormal"> hv.mac = "52:54:00:f8:36:8f"</p>
<p class="MsoNormal"> hv.differencing_disk = true</p>
<p class="MsoNormal"> end</p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Once the VM boots, it still doesn’t get an IP. Ifconfig -a shows the right MAC address, but grepping dmesg for eth0 finds “udev: renamed network interface eth0 to eth1”. This is some time after hv_netvsc is loaded and has detected the right
MAC.</p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Can you point me to the scripts used to build the boxes? I'd like to get an idea of what’s there so I can provide PRs or feedback as the Hyper-V provider improves.</p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Private networks & static IPs aren’t implemented yet in the Hyper-V provider. I’m hoping to implement it at some point but it will be a while before I’m able to get to it.</p>
<p class="MsoNormal"><a href="https://github.com/mitchellh/vagrant/issues/8384#issuecomment-287570247">https://github.com/mitchellh/vagrant/issues/8384#issuecomment-287570247</a></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Cheers,</p>
<p class="MsoNormal">Patrick</p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Sent from <a href="https://go.microsoft.com/fwlink/?LinkId=550986">
Mail</a> for Windows 10</p>
<p class="MsoNormal"><o:p> </o:p></p>
<div style="mso-element:para-border-div;border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal" style="border:none;padding:0in"><b>From: </b><a href="mailto:lpancescu@gmail.com">Laurentiu Pancescu</a><br>
<b>Sent: </b>Tuesday, May 2, 2017 12:27 AM<br>
<b>To: </b><a href="mailto:centos-devel@centos.org">centos-devel@centos.org</a><br>
<b>Subject: </b>Re: [CentOS-devel] Vagrant images for Hyper-V</p>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><span style="font-size:10.0pt">On 01/05/17 05:37, Patrick Lang wrote:<br>
> Centos 6.1.1 - Vagrant didn't find an IP address upon bootup. I logged in<br>
> via the console and the Hyper-V virtual NIC was on eth1 which didn't have<br>
> dhclient configured. I ran dhclient manually, then vagrant ssh was able to<br>
> find the IP<br>
<br>
Patrick, would it be possible for you to check the MAC address of the <br>
NIC inside the Vagrant box? If you login in a console, "ip addr show <br>
dev eth1 scope link" should display it as "link/ether". It should be <br>
set to 52:54:00:f8:36:8f for our configuration to work properly. If the <br>
MAC happens to be another value like 00:15:5D:01:07:DC, which is the <br>
Image Factory default for MacAddress in the generated Hyper-V XML, eth0 <br>
would probably be renamed to eth1 - not 100% sure.<br>
<br>
You could also try to add 'config.vm.base_mac = "5254008815b6"' to your <br>
Vagrantfile before booting the box for the first time (that's only <br>
documented for VirtualBox, no idea if it has any effect on Hyper-V boxes).<br>
<br>
Thanks,<br>
Laurențiu<br>
_______________________________________________<br>
CentOS-devel mailing list<br>
CentOS-devel@centos.org<br>
<a href="https://lists.centos.org/mailman/listinfo/centos-devel">https://lists.centos.org/mailman/listinfo/centos-devel</a><o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</body>
</html>