With Simware7, multiple virtual Comware7 devices can be interconnected to perform lab setups and tests.
Simware7 runs inside a QEMU virtual machine (Comware7 is based on a Linux kernel so it can run on x86 platforms), the Simware configuration utility will take care of the actual QEMU Scripts.
This is a sample generated QEMU script (.vbs on Windows and .sh on Linux) when installed on a Windows host (not recommended, it seems very slow, Ubuntu as host works very nicely and fast):
ws.run “cmd /c ..\..\QEMU\qemu-system-i386.exe -L ..\..\QEMU -icount 1 -localtime -k en-us -name device3 -m 768 -model SIM2101,mac=00:e0:03:15:01:00,path=../.. -hda ..\..\QEMU\vmdk\boot.vmdk -hdb ..\..\version\box_irf32.vmdk -hdc device3\nvram.vmdk -hdd device3\flash.vmdk -serial file:device3\serial.txt -serial telnet:127.0.0.1:4000,server,nowait -net udp,vlan=313,sport=36401,dport=36001,daddr=127.0.0.1 -net udp,vlan=314,sport=36402,dport=36002,daddr=127.0.0.1 “,vbhide
Remote Management Access through Aux0
The QEMU interactive console operates as the con0 for the virtual device, however, since this is the console inside the QEMU VM (and since there are no VM tools installed inside Simware7), there is no copy/paste between this VM Console and the local host.
Inside the QEMU script, the COM1 is mapped to a TCP port, so from the host machine the admin can now telnet (e.g. to TCP 4000 based on above example) and will be connected to the aux0 port. The admin just needs to enable management access on aux0 first (from the QEMU console), next a putty telnet can be used to reach the aux0 of the device:
#
line aux 0
authentication-mode none
user-role network-admin
#
By default, the QEMU script tells the aux telnet server to listen only on a specific IP address, in this case only on 127.0.0.1. The problem here is that it will listen only on this IP, so the aux0 will only be reachable when you connect with telnet from the local host (to destination IP 127.0.0.1).
I wanted to have a dedicated server image running with the Simware instances, to which I could simply connect with putty from my own pc and end up on the aux0 port. This can be done by removing the listening IP from this part of the script:
-serial telnet:127.0.0.1:4000,server,nowait
to
-serial telnet::4000,server,nowait
Next time you start the Simware instance, a remote connection will be possible, by using the target IP of the Host system.
Remote Management Access to the Console
I did not have a lot of experience with QEMU, but there is plenty of information about QEMU on the net.
So while looking for QEMU VM Remote console access, I found that a QEMU VM can have its console made available through a VNC Server. So a remote VNC Client can connect to the Host IP and a specific VNC port and will see the console of the Simware instance.
This can be enabled in the QEMU Script by adding the -vnc:x option. The number x should be unique per Simware instance, and will represent the VNC Server listening port. This way you can have several Simware instances on the same host and open VNC connections to each of them.
Since Simware7 is a QEMU VM, you can simply edit the line:
../../QEMU/qemu-system-x86_64 -L ../../QEMU -enable-kvm -localtime -k en-us …
And insert the -vnc:1 option:
../../QEMU/qemu-system-x86_64 -L ../../QEMU -enable-kvm -vnc :1 -localtime -k en-us …
At this point you can connect with any VNC client to the host IP and VNC Port number.
This example is done with UltraVNC and connects to a host system with IP ending with .100.12 and connects to the Simware instance which was configured with -vnc:2 :
Keep in mind that this is just a console redirect, so there is still no copy/paste. I only use this as emergency access when the TCP Telnet to Aux0 would fail or for initial configuration after a factory reset.