Cisco Catalyst 8000V Edge Software Installation And Configuration Guide

PDF

Cisco Catalyst 8000V Edge Software Installation And Configuration Guide

Deploy the Cisco Catalyst 8000V VM using PowerShell

Want to summarize with AI?

Log in

Provides all the details you need to deploy the Cisco Catalyst 8000V VM using PowerShell.


This section describes how to create and manage VMs on Azure Local using Windows PowerShell. The following table outlines the high-level steps involved to create and manage the VM. It also provides the link to the respective Azure Local documentation. To learn about the PowerShell commands used in detail. refer to this PowerShell Command page.

  • Review the detailed Azure Local documentation for each step.

  • Refer to the PowerShell command reference for syntax and usage examples.

Action

PowerShell command and description

Link to the Azure PowerShell documentation

Create the VM

New-VM 

Creates a new VM.

https://learn.microsoft.com/en-us/azure/azure-local/manage/vm-powershell?view=azloc-2604#create-a-vm

Create a disk

New-VHD

Creates one or more new virtual hard disks.

https://learn.microsoft.com/en-us/powershell/module/hyper-v/new-vhd?view=windowsserver2025-ps

Add a hard disk

Add-VMHardDiskDrive

Adds a hard disk drive to a virtual machine.

https://learn.microsoft.com/en-us/powershell/module/hyper-v/add-vmharddiskdrive?view=windowsserver2025-ps

Configure the VM settings

Set-VMProcessor

Configures settings for the virtual processors of a virtual machine. Settings are applied uniformly to all virtual processors belonging to the virtual machine.

https://learn.microsoft.com/en-us/powershell/module/hyper-v/set-vmprocessor?view=windowsserver2025-ps

Configure the memory

Set-VMMemory

Configures the memory of a virtual machine.

https://learn.microsoft.com/en-us/powershell/module/hyper-v/set-vmmemory?view=windowsserver2025-ps

Connect the switch and the VLAN

Connect-VMNetworkAdapter

Connects a virtual network adapter to a virtual switch.

https://learn.microsoft.com/en-us/powershell/module/hyper-v/connect-vmnetworkadapter?view=windowsserver2025-ps

Configure the firmware of the VM

Set-VMFirmware

Sets the firmware configuration of a virtual machine.

https://learn.microsoft.com/en-us/powershell/module/hyper-v/set-vmfirmware?view=windowsserver2025-ps

Configure a virtual DVD Drive

Set-VMDvdDrive

Configures a virtual DVD drive.

https://learn.microsoft.com/en-us/powershell/module/hyper-v/set-vmdvddrive?view=windowsserver2025-ps

Start the VM

Start-VM

Starts the virtual machine.

https://learn.microsoft.com/en-us/powershell/module/hyper-v/start-vm?view=windowsserver2025-ps


VM deployment workflow

This section provides a sample end-to-end workflow to create a Cisco Catalyst 8000V VM and deploy the instance in Azure Local using PowerShell commands.

PS C:\Users\azs-admin>  

Procedure

  1. Set the required parameters.

    Example:

    $HostName    = "hostname.com" 
    $VMName      = "vm-name" 
      
    $VMPath      = "C:\ProgramData\Microsoft\Windows\Hyper-V" 
    $CpuCount    = 4 
    $MemoryGB    = 8 
      
    $SwitchName  = "ConvergedSwitch(compute_management)" 
    $VlanId      = 3309 
      
    $NewDiskGB   = 16 
      
    $OsIsoPath   = "C:\ClusterStorage\UserStorage_6\c8000v-universalk9_vga.2026-01-05_14.36_xyz.iso" 
    $Day0IsoPath = "C:\ClusterStorage\UserStorage_6\day0_2ctrl.iso" 
      
    Invoke-Command -ComputerName $HostName -ScriptBlock { 
    param( 
        [string]$VMName, 
        [string]$VMPath, 
        [int]$CpuCount, 
        [int]$MemoryGB, 
        [string]$SwitchName, 
        [int]$VlanId, 
        [int]$NewDiskGB, 
        [string]$OsIsoPath, 
        [string]$Day0IsoPath 
    ) 
      
    $vmFolder = Join-Path $VMPath $VMName 
    $vhdPath  = Join-Path $vmFolder "$VMName.vhdx" 
      
    # Ensure folder exists (on the HOST, not your local machine) 
    New-Item -ItemType Directory -Path $vmFolder -Force | Out-Null 
    
  2. Create a disk.

    Example:

    if (-not (Test-Path $vhdPath)) { 
        New-VHD -Path $vhdPath -SizeBytes ($NewDiskGB * 1GB) -Dynamic | Out-Null 
    } 
    
  3. Create the VM (Gen2).

    Example:

    if (-not (Get-VM -Name $VMName -ErrorAction SilentlyContinue)) { 
        New-VM -Name $VMName -Generation 2 -Path $vmFolder -MemoryStartupBytes ($MemoryGB * 1GB) | Out-Null 
    } 
    
  4. Attach a disk (if not already attached).

    Example:

    $hasDisk = (Get-VMHardDiskDrive -VMName $VMName -ErrorAction SilentlyContinue | Where-Object { $_.Path -eq $vhdPath }) 
    if (-not $hasDisk) { 
        Add-VMHardDiskDrive -VMName $VMName -Path $vhdPath | Out-Null 
    } 
    
  5. Set a CPU.

    Example:

    Set-VMProcessor -VMName $VMName -Count $CpuCount | Out-Null 
  6. Set memory as force static (disable dynamic).

    Example:

    Set-VMMemory -VMName $VMName -DynamicMemoryEnabled $false -StartupBytes ($MemoryGB * 1GB) | Out-Null 
  7. Configure switch and VLAN settings.

    Example:

    # (If NIC exists but not connected, connect it; otherwise just set VLAN) 
    Connect-VMNetworkAdapter -VMName $VMName -SwitchName $SwitchName -ErrorAction SilentlyContinue | Out-Null 
    Set-VMNetworkAdapterVlan -VMName $VMName -Access -VlanId $VlanId | Out-Null 
    
    $nic = Get-VMNetworkAdapter -VMName $VMName 
    # 1. Bandwidth Settings $bf = Get-VMSystemSwitchExtensionPortFeature ` -FeatureName "Ethernet Switch Port Bandwidth Settings" Add-VMSwitchExtensionPortFeature -VMNetworkAdapter $nic ` -VMSwitchExtensionFeature $bf | Out-Null 
    
    # 2. Security Settings $sf = Get-VMSystemSwitchExtensionPortFeature ` -FeatureName "Ethernet Switch Port Security Settings" Add-VMSwitchExtensionPortFeature -VMNetworkAdapter $nic ` -VMSwitchExtensionFeature $sf | Out-Null 
    
    # 3. Profile Settings $pf = Get-VMSystemSwitchExtensionPortFeature ` -FeatureName "Ethernet Switch Port Profile Settings" $pf.SettingData.ProfileId = "{00000000-0000-0000-0000-000000000000}" $pf.SettingData.ProfileData = 2 $pf.SettingData.ProfileName = "Testprofile" $pf.SettingData.VendorId = "{1FA41B39-B444-4E43-B35A-E1F7985FD548}" $pf.SettingData.VendorName = "NetworkController" $pf.SettingData.NetCfgInstanceId = "{56785678-a0e5-4a26-bc9b-c0cba27311a3}" $pf.SettingData.CdnLabelId = 1111 $pf.SettingData.CdnLabelString = "TestCdn" Add-VMSwitchExtensionPortFeature -VMNetworkAdapter $nic ` -VMSwitchExtensionFeature $pf | Out-Null
    
  8. Enable Secure Boot off.

    Example:

    Set-VMFirmware -VMName $VMName -EnableSecureBoot Off | Out-Null

    Note
    Secure Boot is disabled here for simplicity. Cisco Catalyst 8000V also supports Secure Boot with the Microsoft UEFI Certificate Authority template if your security policy requires it:
    Set-VMFirmware -VMName $VMName -EnableSecureBoot On -SecureBootTemplate "MicrosoftUEFICertificateAuthority" 
    Note

    Do not use the default "MicrosoftWindows" Secure Boot template. Doing so will prevent the Cisco Catalyst 8000V from booting.

  9. Configure DVD 1: OS ISO

    Example:

    $dvdDrives = Get-VMDvdDrive -VMName $VMName -ErrorAction SilentlyContinue 
    if (-not $dvdDrives) { 
        Add-VMDvdDrive -VMName $VMName -Path $OsIsoPath | Out-Null 
    } else { 
        Set-VMDvdDrive -VMName $VMName -ControllerNumber $dvdDrives[0].ControllerNumber -ControllerLocation $dvdDrives[0].ControllerLocation -Path $OsIsoPath | Out-Null 
    } 
    
  10. Configure DVD 2: Day0 ISO

    Example:

    $dvdDrives = Get-VMDvdDrive -VMName $VMName 
    if ($dvdDrives.Count -lt 2) { 
        Add-VMDvdDrive -VMName $VMName -Path $Day0IsoPath | Out-Null 
    } else { 
        Set-VMDvdDrive -VMName $VMName -ControllerNumber $dvdDrives[1].ControllerNumber -ControllerLocation $dvdDrives[1].ControllerLocation -Path $Day0IsoPath | Out-Null 
    } 
    
  11. Set the first boot from DVD.

    Example:

    $dvd = (Get-VMDvdDrive -VMName $VMName | Select-Object -First 1) 
    Set-VMFirmware -VMName $VMName -FirstBootDevice $dvd | Out-Null  
    
  12. Start the VM.

    Example:

    Start-VM -Name $VMName -ErrorAction SilentlyContinue | Out-Null 
  13. Set VHDX as first boot device.

    Example:

    $VMName   = "vm-name”
    $HVHost   = "HOST1" 
      
    $hdd = Get-VMHardDiskDrive -ComputerName $HVHost -VMName $VMName | Select-Object -First 1 
    Set-VMFirmware -ComputerName $HVHost -VMName $VMName -FirstBootDevice $hdd 
    
  14. Connect to VM.

    Example:

    PS C:\Users\azs-admin> & "C:\Windows\System32\vmconnect.exe" HOST "c8000v-name"
  15. Delete the VM using PowerShell.

    Example:

    # Delete VM including VHD files
    Invoke-Command -ComputerName $HostName -Credential $cred -ScriptBlock {
    param($VMName)
    
    # Stop VM
    Stop-VM -Name $VMName -Force -TurnOff -ErrorAction SilentlyContinue
    Start-Sleep -Seconds 3
    
    # Get VHD paths before removing VM
    $vhds = Get-VMHardDiskDrive -VMName $VMName | Select-Object -ExpandProperty Path
    $vmPath = (Get-VM -Name $VMName).Path
    
    # Remove VM
    Remove-VM -Name $VMName -Force
    
    # Delete VHD files
    foreach ($vhd in $vhds) {
    if (Test-Path $vhd) {
    Remove-Item $vhd -Force
    Write-Host "Deleted VHD: $vhd" -ForegroundColor Green
    }
    }
    
    # Delete VM folder
    if ($vmPath -and (Test-Path $vmPath)) {
    Remove-Item $vmPath -Recurse -Force
    Write-Host "Deleted VM folder: $vmPath" -ForegroundColor Green
    }
    
    Write-Host "VM '$VMName' deleted successfully." -ForegroundColor Cyan
    } -ArgumentList $VMName
    
    Note

    Make sure to note the VHD paths before running the Remove-VM command. After the VM is deleted, its disk paths can no longer be queried.

  16. Update the VM settings.

    Example:

    Note

    For some update operations, you must stop the VM first.

    To update VM processor, use these commands.

    Example:

    $NewCpu   = 8 
    Set-VMProcessor -ComputerName $HostName -VMName $VMName -Count $NewCpu 
    

Configure network settings

This section outlines the network settings configuration.

Procedure

  1. To get the VM, use this command:

    Example:

    Get-VMNetworkAdapter -ComputerName $HostName -VMName $VMName | 
    Select Name, SwitchName, MacAddress, DynamicMacAddressEnabled 
      
    Name            SwitchName                          MacAddress   DynamicMacAddressEnabled 
    ----            ----------                          ----------   ------------------------ 
    Network Adapter ConvergedSwitch(compute_management) 00155D1F0931                    False 
    
  2. To set the existing NIC to static MAC, use this command:

    Example:

    $HostName  = "hostname.com" 
    $VMName    = "vm-name" 
    $Mac       = "00155D1F0931" 
      
    Set-VMNetworkAdapter ` 
      -ComputerName $HostName ` 
      -VMName $VMName ` 
      -Name "Network Adapter" ` 
      -StaticMacAddress $Mac 
    
  3. To add a network adapter, use this command:

    Example:

     $HostName   = " hostname.com" 
    $VMName     = " vm-name" 
    $SwitchName = "ConvergedSwitch(compute_management)" 
    $NicName    = "mgmtnicname" 
      
    Add-VMNetworkAdapter ` 
      -ComputerName $HostName ` 
      -VMName $VMName ` 
      -SwitchName $SwitchName ` 
      -Name $NicName 
    
  4. To assign a VLAN, use this command:

    Example:

     VLAN 3311 (access mode) 
    Set-VMNetworkAdapterVlan ` 
      -ComputerName $HostName ` 
      -VMName $VMName ` 
      -VMNetworkAdapterName $NicName ` 
      -Access ` 
      -VlanId 3311 
    

    Example:

    Note

    Additional NICs may require the same extension port feature sequence as the primary NIC.