gns3-qemu-config - QEMU config disk
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Bernhard Ehlers 5d179151cb QEMU config disk - improve error handling 1 day ago
patches QEMU config disk - improve error handling 1 day ago QEMU config disk - notification of import/export errors 6 days ago QEMU config disk - initial implementation. Ref #2958 2 months ago

gns3-qemu-config - QEMU config disk

Currently you can't easily transfer data to/from a QEMU VM. Especially transfering configurations would be very helpful. But to share configurations similar to the current Dynamips/IOU solution is very complex. For every device type a special solution must be found.

This extension is much simpler to implement. It adds a small DOS formatted disk as HD-D to every QEMU VM. The user can use this storage device to save configurations, but also any other data. The GNS3 server converts this disk image to a ZIP archive, which is accessible in the GUI by import/export configuration. To access the files in the disk image the server needs the mtools installed (

The config disk uses the disk interface of HD-D, unless that is of type “ide”. If it is, the HD-A disk interface is used. This prevents the use of “ide”, unless HD-A is also using it.


  • Much simpler to implement as a full configuration import/export.
  • Can be used for all file types, it's not limited to configuration files.
  • Supports a wide range of devices, no device specific code is needed.
  • Can store multiple files/configurations.


  • The user must manually tranfer configurations from/to this disk, the configuration doesn't get automatically activated.
  • The user has to manually pack/unpack the ZIP files.
  • For performance reasons the virtual disk size is limited, it's not intended for exchanging big files.
  • Limitation: Works only, if HD-D is not used.

Patching the GNS3 sources

Apply this addition to a GNS3 sources with:

cd <gns3-gui source directory>
git am <path to patches>/gns3-gui*.patch
cd <gns3-server source directory>
git am <path to patches>/gns3-server*.patch

Afterwards do the normal installation from source of GNS3.

Installing mtools

Linux: mtools packages are available for most distributions, see

macOS: mtools is available in the Homebrew package manager, install it with brew install mtools.

Windows: mtools binaries for Win32 are available at They will also run on 64-bit Windows. I have not tested my GNS3 extension on Windows, so I have no idea if mtools works in this environment.

Optional: Create an empty DOS formatted disk image

This extension needs a DOS formatted disk image config.img in the QEMU image directory of the GNS3 server. If this image is missing, a 1 MB image will be created.

If you need a different size, create it as shown below:

disk_size=1024		# disk size in KiByte
dd if=/dev/zero bs=1024 count=$disk_size of=config.img status=none
printf 'drive x:\n  file="config.img"\n  partition=1\n' > mtoolsrc
MTOOLSRC=mtoolsrc mpartition -I -c -s 8 -h 16 -t $(($disk_size / 64)) x:
MTOOLSRC=mtoolsrc mformat x:
rm mtoolsrc

Afterwards copy it into the QEMU image directory of the GNS3 server. contains the 1 MB image together with the build script.

Remaining steps

  • Needs some tests on Windows, but I have no plans for that.
  • Optional: pack/unpack the zip file on the GUI side.