cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
934
Views
0
Helpful
1
Replies

QEMU/KVM: Telnet session into Nexus 9000v VM hangs

Syd
Level 1
Level 1

Hi Cisco folks,

                    I'm attempting to experiment with the Nexus 9000v KVM virtual switch switch and I obtained the image from here. I've attempted to following the instruction below section NX-OSv 9000 Deployment on KVM/QEMU Hypervisor of the guide to obtain the following line:

 

 

'''
virt-install --name nexus-9000v --memory 8192 --vcpus 2 --disk /home/openstack/cisco_image/nexus9300v64.10.2.5.M.qcow2,bus=sata --import --network default --serial tcp,host=localhost:8888,mode=bind,protocol=telnet --virt-type kvm --graphics none --os-variant ubuntu20.04 --noautoconsole
'''

 

 

 I then use the following telnet call to access the VM, but it hangs:

 

 

'''
> telnet localhost 8888
Trying ::1...
Connected to localhost.
Escape character is '^]'.
'''

 

 

 Can you kindly provide feedback?

Thanks!

-Syd

1 Accepted Solution

Accepted Solutions

Syd
Level 1
Level 1

Instructions to create Cisco Nexus 9000v VM instances on Host Running Ubuntu 20.04

1. Download the qcow image from the following link:
https://www.cisco.com/c/en/us/products/switches/nexus-9000v-switch/index.html

2. Move image to install directory:
host> mkdir cisco_image && mv nexus9300v64.10.2.5.M.qcow2 cisco_image && cd cisco_image

3. Enable UEFI support:
host> sudo apt -y install ovmf

Note:
* The image's boot partition is base on EFI and as such the host requires
EFI/UEFI support. It also requires a compatible bios image to operate.
The ovmf package provides this.
* OVMF is a port of Intel's tianocore firmware to KVM/QEMU virtual machines.
It contains sample UEFI firmware for both KVM and QEMU.

4. Create the VM via the CLI and Virtual Machine Manager GUI:
host> virt-install --name nexus-9000v --memory 9000 --vcpus 4 --disk /home/openstack/cisco_image/nexus9300v64.10.2.5.M.qcow2,bus=sata --import --network bridge=virbr0,model=e1000 --serial tcp,host=localhost:8888,mode=bind,protocol=telnet --virt-type kvm --graphics none --os-variant ubuntu20.04 --boot uefi --noautoconsole

Note:
Below are features of this VM:
* --memory 9000: Minimum memory is 8096MB but we have used 9000MB
* --vcpus 2: 2 vCPUs
* --disk /<Path To Image>/cisco_image/nexus9300v64.10.2.5.M.qcow2,bus=sata: Use the sata bus for optimization
* --network bridge=virbr0,model=e1000 : Used virbr0 and model e1000: virbr0 is
created when Virtual Machine Manager is installed
* --serial tcp,host=localhost:8888,mode=bind,protocol=telnet: No graphical
console is provided to get into the VM so we use a serial connection to
setup a telnet server that can be reached from the localhost on port 8888.
* --graphics none: No graphical console is shipped with the VM
* --boot uefi: Use uefi to boot.
* --noautoconsole: Don't attempt to use a console when the VM is just created
since this will fail: i.e. the VM does not ship with a console. We will use
the telnet connection to get into the system.


5. In the Virtual Machine Manager GUI, click on "Details" for the nexus-9000v
VM that was created and add a second NIC:
* Click on "Add Hardware->Network":
* Ensure the following:
- Network source: "Virtual network 'default': NAT"
- Device Model: e1000

Note:
I believe first NIC has Name eth0 and second has eth1. If you don't create
the second, you may get this error:


Installing LC netdev container_id=0 is_standby=0 ... [ 69.142680]
[ 69.142680] ALERT !! lcnd_platform_init can't find mgmt dev mgmt_ns_id ffffffff mgmt_dev_name eth1
done

6. Restart the VM from the GUI:
Power -> Force Off > Then click on "Green" play button to power on the VM.

7. From the CLI, telnet into the VM and boot the corresponding binary file
from the loader prompt:


host> telnet localhost 8888

loader> dir
bootflash::

.rpmstore
nxos64-cs.10.2.5.M.bin

loader> boot nxos64-cs.10.2.5.M.bin

8. Skip auto provisioning during the boot process:
...
`2023 May 9 03:42:59 switch %$ VDC-1 %$ %POAP-2-POAP_INFO: - Abort Power On Auto Provisioning [yes - continue with normal setup, skip - bypass password and basic configuration, no - continue with Power On Auto Provisioning] (yes/skip/no)[no]:`
*Note: choose "skip"

Notes:
* Yes - This option will bring you to the switch setup process admin / user accounts with passwords, switch name, mgmt port, etc... It will also ask you if you want to save the config.
* Skip - will give you a login prompt (username should be admin with no password)
* No - This option will loop back to the (POAP) question

9. Login to the switch:
* User Access Verification:
- username: admin
- Note: Leave the Password empty.


10. Make the OS persistent.

<switch> # dir
...
1943380992 Mar 03 17:06:35 2023 nxos64-cs.10.2.5.M.bin
...

* Find the name of the boot image again (i.e. "nx-os*.bin" file)

<switch># conf t
<switch>(config)# boot nxos bootflash:nxos64-cs.10.2.5.M.bin

* Notes:
- Tab completion works above
- At this point the setup will verify the file and load into bootflash.


11. Set a password for the admin user:
switch(config)# username admin password 0 <Add Password string>

12. Update the switch name:
switch(config)# hostname <Add Name for Switch>

13. Configure SSH access:
* virbr0 is the bridge created by the virtual machine manager. Below is it's
config:


host> ip a show virbr0
...
inet 192.168.1.1/24 brd 192.168.122.255 scope global virbr0
...

* So we will assign the management IP of the switch 192.168.1.2/24.

<nexus-9000v># conf t
nexus-9000v(config)# interface mgmt 0
nexus-9000v(config-if)# ip address 192.168.1.2/24
nexus-9000v(config-if)# no shutdown
nexus-9000v(config-if)# feature ssh

14. Save the config(i.e. copy the running config to the startup config)
<nexus-9000v> # copy run start

Note: Now when you reboot the OS will be persistent.

15. Attempt to SSH into the VM from the host:
host> ssh admin@192.168.1.2

 

View solution in original post

1 Reply 1

Syd
Level 1
Level 1

Instructions to create Cisco Nexus 9000v VM instances on Host Running Ubuntu 20.04

1. Download the qcow image from the following link:
https://www.cisco.com/c/en/us/products/switches/nexus-9000v-switch/index.html

2. Move image to install directory:
host> mkdir cisco_image && mv nexus9300v64.10.2.5.M.qcow2 cisco_image && cd cisco_image

3. Enable UEFI support:
host> sudo apt -y install ovmf

Note:
* The image's boot partition is base on EFI and as such the host requires
EFI/UEFI support. It also requires a compatible bios image to operate.
The ovmf package provides this.
* OVMF is a port of Intel's tianocore firmware to KVM/QEMU virtual machines.
It contains sample UEFI firmware for both KVM and QEMU.

4. Create the VM via the CLI and Virtual Machine Manager GUI:
host> virt-install --name nexus-9000v --memory 9000 --vcpus 4 --disk /home/openstack/cisco_image/nexus9300v64.10.2.5.M.qcow2,bus=sata --import --network bridge=virbr0,model=e1000 --serial tcp,host=localhost:8888,mode=bind,protocol=telnet --virt-type kvm --graphics none --os-variant ubuntu20.04 --boot uefi --noautoconsole

Note:
Below are features of this VM:
* --memory 9000: Minimum memory is 8096MB but we have used 9000MB
* --vcpus 2: 2 vCPUs
* --disk /<Path To Image>/cisco_image/nexus9300v64.10.2.5.M.qcow2,bus=sata: Use the sata bus for optimization
* --network bridge=virbr0,model=e1000 : Used virbr0 and model e1000: virbr0 is
created when Virtual Machine Manager is installed
* --serial tcp,host=localhost:8888,mode=bind,protocol=telnet: No graphical
console is provided to get into the VM so we use a serial connection to
setup a telnet server that can be reached from the localhost on port 8888.
* --graphics none: No graphical console is shipped with the VM
* --boot uefi: Use uefi to boot.
* --noautoconsole: Don't attempt to use a console when the VM is just created
since this will fail: i.e. the VM does not ship with a console. We will use
the telnet connection to get into the system.


5. In the Virtual Machine Manager GUI, click on "Details" for the nexus-9000v
VM that was created and add a second NIC:
* Click on "Add Hardware->Network":
* Ensure the following:
- Network source: "Virtual network 'default': NAT"
- Device Model: e1000

Note:
I believe first NIC has Name eth0 and second has eth1. If you don't create
the second, you may get this error:


Installing LC netdev container_id=0 is_standby=0 ... [ 69.142680]
[ 69.142680] ALERT !! lcnd_platform_init can't find mgmt dev mgmt_ns_id ffffffff mgmt_dev_name eth1
done

6. Restart the VM from the GUI:
Power -> Force Off > Then click on "Green" play button to power on the VM.

7. From the CLI, telnet into the VM and boot the corresponding binary file
from the loader prompt:


host> telnet localhost 8888

loader> dir
bootflash::

.rpmstore
nxos64-cs.10.2.5.M.bin

loader> boot nxos64-cs.10.2.5.M.bin

8. Skip auto provisioning during the boot process:
...
`2023 May 9 03:42:59 switch %$ VDC-1 %$ %POAP-2-POAP_INFO: - Abort Power On Auto Provisioning [yes - continue with normal setup, skip - bypass password and basic configuration, no - continue with Power On Auto Provisioning] (yes/skip/no)[no]:`
*Note: choose "skip"

Notes:
* Yes - This option will bring you to the switch setup process admin / user accounts with passwords, switch name, mgmt port, etc... It will also ask you if you want to save the config.
* Skip - will give you a login prompt (username should be admin with no password)
* No - This option will loop back to the (POAP) question

9. Login to the switch:
* User Access Verification:
- username: admin
- Note: Leave the Password empty.


10. Make the OS persistent.

<switch> # dir
...
1943380992 Mar 03 17:06:35 2023 nxos64-cs.10.2.5.M.bin
...

* Find the name of the boot image again (i.e. "nx-os*.bin" file)

<switch># conf t
<switch>(config)# boot nxos bootflash:nxos64-cs.10.2.5.M.bin

* Notes:
- Tab completion works above
- At this point the setup will verify the file and load into bootflash.


11. Set a password for the admin user:
switch(config)# username admin password 0 <Add Password string>

12. Update the switch name:
switch(config)# hostname <Add Name for Switch>

13. Configure SSH access:
* virbr0 is the bridge created by the virtual machine manager. Below is it's
config:


host> ip a show virbr0
...
inet 192.168.1.1/24 brd 192.168.122.255 scope global virbr0
...

* So we will assign the management IP of the switch 192.168.1.2/24.

<nexus-9000v># conf t
nexus-9000v(config)# interface mgmt 0
nexus-9000v(config-if)# ip address 192.168.1.2/24
nexus-9000v(config-if)# no shutdown
nexus-9000v(config-if)# feature ssh

14. Save the config(i.e. copy the running config to the startup config)
<nexus-9000v> # copy run start

Note: Now when you reboot the OS will be persistent.

15. Attempt to SSH into the VM from the host:
host> ssh admin@192.168.1.2