GNS3/dynamips

add_slot_binding router command in exported config is incorrect

ghislain-bernard opened this issue · 1 comments

In the configuration file obtained with "hypservisor save" command, the line "vm add_slot_binding router 0 0 C7200-IO-FE" is not correct.

Export configuration via TELNET :

hypervisor save_config config.txt
100-OK

In the exported file :

# cat config.txt 

vm create router 0 c7200
vm set_ios router /opt/dynamips/firmware/c7200/C7200-JK.BIN
vm set_ram router 512
vm set_nvram router 128
vm set_ram_mmap router 1
vm set_clock_divisor router 4
vm set_conf_reg router 0x2102
vm set_con_tcp_port router 2000
vm add_slot_binding router 0 0 C7200-IO-FE
c7200 set_npe router npe-400
c7200 set_midplane router vxr

Trying to replay via TELNET :

vm add_slot_binding router 0 0 C7200-IO-FE
202-Unknown command 'add_slot_binding'

FAILED, but

vm slot_add_binding router 0 0 C7200-IO-FE
100-OK

SUCCESSED

===================

Proposal FIX :

--- common/cisco_card.c.old	2020-01-09 12:34:15.325350112 +0100
+++ common/cisco_card.c	2020-01-09 12:34:26.212125908 +0100
@@ -201,7 +201,7 @@
    struct cisco_nio_binding *nb;
 
    if (card != NULL) {
-      fprintf(fd,"vm add_slot_binding %s %u %u %s\n",
+      fprintf(fd,"vm slot_add_binding %s %u %u %s\n",
               vm->name,card->slot_id,card->subslot_id,card->dev_type);
 
       for(nb=card->nio_list;nb;nb=nb->next) {

Thanks 👍