With Hyper-V I created a virtual switch to allow my VMs to access to shared folders from the host.
As the virtual switch is a "Unidentified network" on Windows 10. The category of this network is set as public. So if I want to access to my file from the VM I have to "Turn on file and printer sharing" of Guest and Public Network in the Advanced sharing settings.
I do not like this solution because isn't secure as I use to connect to free Wifi...
I found a solution to set change the Category of my Network by using PowerShell ran as administrator.
Set-NetConnectionProfile -interfacealias "vEthernet (Host-Only)" -NetworkCategory Private
The problem is that the modification disappear after any restart. How can I make this Set-NetConnectionProfile permanent ?
1 Answer
One reason your virtual adapter is listed as an unidentified network is perhaps because it does not have an IPv4 default gateway assigned. Specify that in Network Connections to see if it helps.
A second solution from the articleVSwitch Hyper-V “Unidentified network” (Vlan ID), is to set up a VLAN ID on the Switch, as follows:
- In Hyper-V, select the "Virtual Switch Manager" option.
- In the "Virtual Switch Manager", click the VSwitch.
- Select "Enable virtual LAN identification for management operating system" and set an ID for the Vlan (for example retaining "10").
- Click "Apply" and "OK".