GNS3 - Access the Files in a Docker VM
While it’s quite complicated to access the data stored in a QEMU VM (see Inspect and modify QEMU Images), it’s relative simple to access the data in a Docker VM.
Attention: Please note, that you can only access the files of the persistent directories and that the Docker VM needs to be stopped. Access to a running VM will be refused with permission errors.
If you happen to run the Docker VM on your local Linux server, then you can simply right-click on the device and select “Show in file manager”. But most of us use Docker in the GNS3 VM or in a remote VM. Using “Show in file manager” will result in a popup like this:
Confirm with “Yes” to accept, that the path will be copied to the clipboard, we will need it later.
But first we need to access the GNS3 server, hosting the Docker VM. That can normally achieved by SSH. So install a SCP client like WinSCP.
For making the connection we need the IP address of the server. For that have a look in the topology summary for the console IP address of the device. That is also the server IP address.
Now login to the GNS3 server. The GNS3 VM uses the user gns3 with password gns3. If you want to connect to a remote GNS3 server, you have to find out it’s login credentials.
Now change to the VM’s directory, in WinSCP use “Open directory” . Paste the path from the clipboard, that was previously copied by the GNS3 “Show on file manager” function.
You will see the persistent directories. For the “ipterm” VM, that are the etc/network directory for the IP configuration and “root”, the home directory of user root.
Opening the “root” directories shows it’s content. You can now copy files from/to your local disks to this remote location.