Solved: Trying to customize an Gns3 appliance template: Need Help

Okay, Guys, I think it is an easy issue to fix; I can’t fix it myself because I don’t know any Python or JSON. I tried to google for an answer to my problem, but since Python and Json are foreign languages, the answer doesn’t make sense.

What I am trying to do is modify a GNS3 appliance file I got from GNS3’s Marketplace. I am trying to add Ubuntu Server 20.04.2 to someone else GNS3 appliance template. There is a syntax error in my modified code to the appliance file (the appliance file errors out), but I don’t know what is wrong or how to fix it. I have included a sample of the code.

   "name": "Ubuntu Server",
   "category": "guest",
   "description": "This is a custom Ubuntu server which comes with Canonical security updates, Xorg and Telnetd",
   "vendor_name": "Canonical Inc.",
   "vendor_url": "https://www.ubuntu.com",
   "documentation_url": "https://help.ubuntu.com",
   "product_name": "Ubuntu",
   "product_url": "https://ubuntu.com/server",
   "registry_version": 3,
   "status": "stable",
   "maintainer": "Mohamad Siblini",
   "maintainer_email": "https://www.ictkin.com/contact",
   "usage": "Username: gns3\nPassword: gns3 | MD5: 435f15a54f7f673e302ad26f05226e0e",
   "port_name_format": "ens{0}",
   "qemu": {
       "adapter_type": "virtio-net-pci",
       "adapters": 1,
       "ram": 2048,
       "hda_disk_interface": "virtio",
       "arch": "x86_64",
       "console_type": "vnc",
       "boot_priority": "c",
       "kvm": "require",
       "options": "-vga virtio"
   },
   "images": [
       {
           "filename": "ubuntu-20.04.2-live-server-amd64.iso",
           "version":  "20.04.2 LTS Server",
           "md5sum": "aba7e22636c435c5008f5d059ae69a62",
           "filesize": 1215168512,
           "download_url": "https://releases.ubuntu.com/20.04.2/ubuntu-20.04.2-live-server-amd64.iso/"
       },
       
       {
           "filename": "Ubuntu Server 18.04.3 LTS (64bit).vmdk",
           "version": "18.04.3 LTS Server",
           "md5sum": "435f15a54f7f673e302ad26f05226e0e",
           "filesize": 2707814912,
           "download_url": "https://www.ictkin.com/gns3-appliance/"
       }
   ],
   "versions": [
       {
           "name": "20.04.2 LTS Server",
           "images": {
               "hda_disk_image": "Ubuntu Server 20.04.2 LTS (64bit).vmdk"
           },
           
       {
           "name": "18.04.3 LTS Server",
           "images": {
               "hda_disk_image": "Ubuntu Server 18.04.3 LTS (64bit).vmdk"
           }
       }
   ]
}}

I have also included the exact wording of the error message I get from GNS3 when I try importing the modified template.

```Error while importing appliance /home/prince_charming/GNS3/Gns3 Appliances/Ubuntu Server 18.4.3 Gns3 Appliance/ubuntu-server.gns3a: Could not read appliance /home/prince_charming/GNS3/Gns3 Appliances/Ubuntu Server 18.4.3 Gns3 Appliance/ubuntu-server.gns3a: Expecting property name enclosed in double quotes: line 51 column 9 (char 1802)```

Any help would be appreciated.

It says that you have a missing quote on line 51

This is the part where your problem is. If you look close, you failed to close all of the braces under the Ubuntu 20.04.02 LTS Server part. it should be something like:

"versions": [
       {
           "name": "20.04.2 LTS Server",
           "images": {
               "hda_disk_image": "Ubuntu Server 20.04.2 LTS (64bit).vmdk"
           }
       }, 

       {
           "name": "18.04.3 LTS Server",
           "images": {
               "hda_disk_image": "Ubuntu Server 18.04.3 LTS (64bit).vmdk"
           }
       }
   ]

Thanks, @scorpion53530, for seeing my error; I wouldn’t have caught that type of error. Your eagle eyes are really sharp. :grinning:

I also found out Saturday about Gns3’s registry project and the python script that makes a new GNS3 appliance file. I have since git cloned that project and created two new GNS3 appliance files. With the use of this Python script, I won’t have to worry about creating errors. The script creates the appliance by asking setup questions, you only need to answer the questions, and the script does all the work for you. Very handy when you don’t know any Python or Json like me. Well, I am going to mark this post as solved.

I know this is a stupid question. I can’t figure out how to mark a certain post in this topic as the solution. Can anyone please help.