Comments (14)
@iainbrighton I can work on adding this NAT support.
I have a Server 2016 box , where I am already playing with the Module.
from lability.
@DexterPOSH - Thanks for volunteering! 😃
Just a word of warning - as we're using the xVMSwitch from the xHyper-V DSC resources to configure the virtual switches, this functionality will first need to be put into the official https://github.com/PowerShell/xHyper-V resource. I have opened an issue dsccommunity/HyperVDsc#40 to implement this functionality.
Are you still happy to implement this functionality over there first? Once complete, we can then enable NAT functionality here?
from lability.
@iainbrighton Thanks for the heads up.
Let me try and see if I can finish this early, if am able to do that I will do a PR to the parent repo.
from lability.
@DexterPOSH @csandfeld - FYI - It looks like NAT support is included on Win 10 build 10586. I might be seeing the NAT -SwitchType be because I have the RSAT tools installed?! Regardless, I have a NAT virtual switch up and running on build 10586 😃
From other Twitter conversations, it looks like the New-VMSwitch implementation might be changing, at least that it what it looks like in the later Win 10 build 11082. If this is the case, we're all going to be in for a bumpy ride 😬
from lability.
NAT support on Win 10 👍
Changing New-VMSwitch implementation 👎
from lability.
Win 10 11082 allows me to specify NAT as the Switch type although it seems that the Help Needs updating to reflect that this has been included - not updated either after running Update-Help -Force
I reckon its part of either the implemented version of HyperV or possibly via RSAT tools
But you can create a NAT Switch with the below
New-VMSwitch -Name NAT -SwitchType NAT -NATSubnetAddress 1.1.1.1
Poor example but yeah its in there
from lability.
from lability.
Didnt have it installed when I ran it - though I do now and it installed fine using my Install-Win10RSATTools function https://github.com/kilasuit/PoshFunctions/blob/Dev/Scripts/Install-Win10RSATTools.ps1
from lability.
@iainbrighton I spoke to Ravikanth at work and he already has a NAT VM switch implementation in his repo. He will be doing a PR soon to the xHyperV repo.
I will be going through that and see how we can fit those changes here.
from lability.
@DexterPOSH Excellent! This is what I have run on my Win10 machine:
## Create NAT virtual switch
## This automatically adds the 172.16.3.1/24 IP address to the virtual ethernet adapter
## Removing the virtual switch doesn't appear to clean this up particularly well :(
New-VMSwitch -Name NAT -SwitchType NAT -NATSubnetAddress 172.16.3.0/24
## Add the NAT translation for machines on the 172.16.3.0/24 subnet
New-NetNat -Name NAT -InternalIPInterfaceAddressPrefix 172.16.3.0/24
I think we're going to need a NAT translation DSC resource. What repo this goes into, I haven't a clue at the moment! It may need a new 'xNAT' repo or put into the xNetworking repo?
from lability.
@iainbrighton I see the code pushed upstream by Ravi.
https://github.com/rchaganti/DSCResources/tree/master/cHyper-V/DSCResources/cNatSwitch
from lability.
@DexterPOSH I don't see any reference to a New-NetNat
equivalent resource? I'm sure this will need working as well?
from lability.
@iainbrighton, I do see New-NetNat being used in the Set-TargetResource definition in the psm1 file.
from lability.
@DexterPOSH I'm not 100% convinced that that's the right place for it. What happens when I need an alternative NAT configuration?
IMHO the resource shouldn't be making any assumptions, but that's probably a conversation that needs to happen over at dsccommunity/HyperVDsc#40
from lability.
Related Issues (20)
- Cache gets updated for DSC modules but not for other modules HOT 3
- Request: Add a Content tag to Resource instead of Uri HOT 4
- Machine stuck at boot after successful DSC configuration. HOT 12
- Improve error message for module versions that don't exist HOT 2
- Setting SecureBoot value per CustomMedia HOT 8
- Add support for using specific VM username when calling Start-LabConfiguration HOT 1
- Cert issue in v0.19.0 HOT 3
- McAfee DLP prevents Lability builds HOT 1
- Non-English ISO options HOT 33
- cannot -IgnorePendingReboot, build fails regardless
- New Release with Updated Media HOT 1
- Adding a new, empty virtual disk fails
- Remove Dependency on Dsc Resources from the PSDesiredStateConfiguration Version 1.1 Module HOT 2
- AuthenticodeIssuerMismatch,Validate-ModuleAuthenticodeSignature,Microsoft.PowerShell.Pac kageManagement.Cmdlets.InstallPackage
- File Resource not connecting to network share HOT 2
- Windows Server 2022 media HOT 1
- Windows 11 22H2 Issue HOT 3
- URL for WIN11_x64_Enterprise_22H2_EN_Eval not working HOT 2
- Inconsistent uncompressing of ZIP files as resources
- Add support for Azure DevOps Artifact Feeds
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lability.