Skip to content

Commit

Permalink
Update hyperv.py
Browse files Browse the repository at this point in the history
  • Loading branch information
SRIKKANTH committed Jan 31, 2025
1 parent 4a04377 commit fbfcb60
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions lisa/tools/hyperv.py
Original file line number Diff line number Diff line change
Expand Up @@ -491,13 +491,18 @@ def enable_internal_dhcp(self, dhcp_scope_name: str = "DHCPInternalNAT") -> None

# Configure the DHCP server to use the internal NAT network
powershell.run_cmdlet(
f'Add-DhcpServerV4Scope -Name "{dhcp_scope_name}" -StartRange {self.INTERNAL_NAT_DHCP_IP_START} -EndRange {self.INTERNAL_NAT_DHCP_IP_END} -SubnetMask 255.255.255.0', # noqa: E501
f'Add-DhcpServerV4Scope -Name "{dhcp_scope_name}" '
f"-StartRange {self.INTERNAL_NAT_DHCP_IP_START} "
f"-EndRange {self.INTERNAL_NAT_DHCP_IP_END} "
f"-SubnetMask 255.255.255.0",
force_run=True,
)

# Set the DHCP server options
powershell.run_cmdlet(
f"Set-DhcpServerV4OptionValue -Router {self.INTERNAL_NAT_ROUTER} -DnsServer {self.AZURE_DNS_SERVER}", # noqa: E501
f"Set-DhcpServerV4OptionValue "
f"-Router {self.INTERNAL_NAT_ROUTER} "
f"-DnsServer {self.AZURE_DNS_SERVER}",
force_run=True,
)

Expand Down

0 comments on commit fbfcb60

Please sign in to comment.