There appears to be a bug in Server Core 2022 in regards to changing the network settings through “sconfig”.
I’m deploying a new server from template in vCenter and by default it drops onto a private network with DHCP. The first thing I will do is go edit the settings of the VM and drop it on the proper network. After the VM is properly configured I will then go through “sconfig” to reset the IP to a static IP.
In “sconfig” you punch in number “8” for “Network Settings” and select “1” for the only NIC in the machine and you will be at the following prompt:
Here you will select “1” for 1) set network adapter address.
Then select “S” for (S)tatic IP Address.
Follow the on-screen prompts to enter IP, Subnet Mask, and Default Gateway. It is here you may be prompted with the error.
Setting NIC to static IP…
Failed to release DHCP lease.
Result code: 83
Method name: ReleaseDHCPLease
If you run into this issue you can enter “15” on sconfig and drop to Powershell. You can then run the following commands:
Remove-NetIPAddress -InterfaceAlias Ethernet0 -confirm:$False
Even after getting this far you may still not be able to assign the IP through “sconfig” in which case you can do it with Powershell.
New-NetIPAddress -InterfaceAlias Ethernet0 -IPAddress 172.16.1.2 -PrefixLength 24 -DefaultGateway 172.16.1.1
You can now launch “sconfig” go back to “8” Network Settings and configure your DNS servers.