GNS3 vlan configuration is not saving: Vlan database lost when restarting

Saving vlan.dat in nvram instead of Flash:

By default all Vlan information is store in “vlan.dat” file which exists in flash. Therefore when you restart the GNS3-switch you lost all vlan configurations, gns3 by default doesn’t allow you to save or edit vlan database because of limit flash in gns3 router and result in following error:
Error: “ not enough space on flash to store vlan database. Trying squeeze…
Squeeze of flash complete
not enough space on flash to store vlan database even after squeeze
Error on database apply 40: NV storage failure”

Steps for saving Vlan Configuration in Gns3:

But there is a following way, by using this you can save Vlan configuration in Gns3 and can also change vlan.dat path from flash memory to nvram in gns3 router.

switch#erase flash
switch#squeez flash

switch#config t
switch(config)#vtp file nvram:vlan.dat (this command will tell Gns3 router to save VLANs in NvRam)
For testing and confirmation:
create some vlan and then confirm with these commands:
show vlan-switch

switch#dir nvram


  1. There's a mistake here... looks like you mean vtp instead of ntp?

  2. Hi,
    One should also right click the "switch" --> configure --> "Memories and disks" --> uncheck "Automatically delete NVRAM and disk files"