GNS3 / gns3-server

GNS3 server
GNU General Public License v3.0
812 stars 263 forks source link

GNS3 QEMU not using image file names specified in template configuration #1037

Closed ianc1215 closed 7 years ago

ianc1215 commented 7 years ago

GNS3 is not using the names specified in the config file for the VM template. It is always defaulting to "VM Template"-hda.qcow2

So in my case "Untangle-hda.qcow2", my file was named "untangle_1300_x32.qcow2" So that's a problem.

If I rename the file to what GNS3 is expecting it to be called I get this on my screen (lots of this).

Could not open backing file: Could not open backing file: Could not open backing file: Could not open backing file: Could not open backing file: Could not open backing file: Could not open backing file: Could not open backing file: Could not open backing file: Could not open backing file: Could not open backing file: Could not open backing file: Could not open backing file: Could not open backing file: Could not open backing file: Could not open backing file: Could not open backing file: Could not open backing file: Could not open backing file: Could not open backing file: Could not open backing file: Could not open backing file: Could not open backing file: Could not open backing file: Could not open backing file: Could not open backing file: Could not open backing file: Could not open backing file: Could not open backing file: Could not open backing file: Could not open backing file: Could not open backing file: Could not open backing file: Could not open backing file: Could not open backing file: Could not open backing file: Could not open backing file: Could not open backing file: Could not open backing file: Could not open backing file: Could not open backing file: Could not open backing file: Could not open backing file: Could not open backing file: Could not open backing file: Could not open backing file: Could not open backing file: Could not open backing file: Could not open backing file: Could not open backing file: Could not open backing file: Could not open backing file: Could not open backing file: Could not open backing file: Could not open backing file: Could not open backing file: Could not open backing file: Could not open backing file: Could not open backing file: Could not open backing file: Could not open backing file: Could not open backing file: Could not open backing file: Could not open backing file: Could not open backing file: Could not open backing file: Could not open backing file: Could not open backing file: Could not open backing file: Could not open backing file: Could not open backing file: Could not open backing file: Could not open backing file: Could not open backing file: Could not open backing file: Could not open backing file: Could not open backing file: Could not open backing file: Could not open backing file: Could not open backing file: Could not open backing file: Could not open backing file: Could not open backing file: Could not open backing file: Could not open backing file: Could not open backing file: Could not open backing file: Could not open backing file: Could not open backing file: Could not open backing file: Could not open backing file: Could not open backing file: Could not open backing file: Could not open backing file: Could not open backing file: Could not open backing file: Could not open backing file: Could not open backing file: Could not open backing file: Could not open backing file: Could not open backing file: Could not open backing file: Could not open backing file: Could not open backing file: Could not open backing file: Could not open backing file: Could not open backing file: Could not open backing file: Could not open backing file: Could not open backing file: Could not open backing file: Could not open backing file: Could not open backing file: Could not open backing file: Could not open backing file: Could not open backing file: Could not open backing file: Could not open backing file: Could not open backing file: Could not open backing file: Could not open backing file: Could not open backing file: Could not open backing file: Could not open backing file: Could not open backing file: Could not open backing file: Could not open backing file: Could not open backing file: Could not open backing file: Could not open backing file: Could not open backing file: Could not open backing file: Could not open backing file: Could not open backing file: Could not open backing file: Could not open backing file: Could not open backing file: Could not open backing file: Could not open backing file: Could not open backing file: Could not open backing file: Could not open backing file: Could not open backing file: Could not open backing file: Could not open backing file: Could not open backing file: Could not open backing file: Could not open backing file: Could not open backing file: Could not open backing file: Could not open backing file: Could not open backing file: Could not open backing file: Could not open backing file: Could not open backing file: Could not open backing file: Could not open backing file: Could not open backing file: Could not open backing file: Could not open backing file: Could not open backing file: Could not open backing file: Could not open backing file: Could not open backing file: Could not open backing file: Could not open backing file: Could not open backing file: Could not open backing file: Could not open backing file: Could not open backing file: Could not open backing file: Could not open backing file: Could not open backing file: Could not open backing file: Could not open backing file: Could not open backing file: Could not open backing file: Could not open backing file: Could not open backing file: Could not open backing file: Could not open backing file: Could not open backing file: Could not open backing file: Could not open backing file: Could not open backing file: Could not open backing file: Could not open backing file: Could not open backing file: Could not open backing file: Could not open backing file: Could not open backing file: Could not open backing file: Could not open backing file: Could not open backing file: Could not open backing file: Could not open backing file: Could not open backing file: Could not open backing file: Could not open backing file: Could not open backing file: Could not open backing file: Could not open backing file: Could not open backing file: Could not open backing file: Could not open backing file: Could not open backing file: Could not open backing file: Could not open backing file: Could not open backing file: Could not open backing file: Could not open backing file: Could not open backing file: Could not open backing file: Could not open backing file: Could not open backing file: Could not open backing file: Could not open backing file: Could not open backing file: Could not open backing file: Could not open backing file: Could not open backing file: Could not open backing file: Could not open backing file: Could not open backing file: Could not open backing file: Could not open backing file: Could not open backing file: Could not open '/opt/gns3/images/QEMU/Untangle-hda.qcow2': Too many open files
2017-05-18 03:10:40 ERROR route.py:210 Node error detected: QemuError
Traceback (most recent call last):
 File "/usr/local/lib/python3.4/dist-packages/gns3_server-2.0.1-py3.4.egg/gns3server/web/route.py", line 195, in control_schema
 yield from func(request, response)
 File "/usr/local/lib/python3.4/dist-packages/gns3_server-2.0.1-py3.4.egg/gns3server/handlers/api/compute/qemu_handler.py", line 167, in start
 yield from vm.start()
 File "/usr/local/lib/python3.4/dist-packages/gns3_server-2.0.1-py3.4.egg/gns3server/compute/qemu/qemu_vm.py", line 895, in start
 command = yield from self._build_command()
 File "/usr/local/lib/python3.4/dist-packages/gns3_server-2.0.1-py3.4.egg/gns3server/compute/qemu/qemu_vm.py", line 1558, in _build_command
 command.extend((yield from self._disk_options()))
 File "/usr/local/lib/python3.4/dist-packages/gns3_server-2.0.1-py3.4.egg/gns3server/compute/qemu/qemu_vm.py", line 1366, in _disk_options
 raise QemuError("Could not create {} disk image".format(disk_name))
gns3server.compute.qemu.qemu_error.QemuError: Could not create hda disk image
2017-05-18 03:10:40 INFO helpers.py:480 192.168.43.1 - - [18/May/2017:03:10:40 +0000] "POST /v2/compute/projects/9c8d855a-153d-47b2-bc81-c45598fa11e8/qemu/nodes/2a265e35-13d0-429a-9ad1-b3ce54b6d774/start HTTP/1.1" 409 101 "-" "Python/3.6 aiohttp/1.3.5"

I have no idea what "Could not open backing file" means. The system has permisson to it's own file so thats not the issue.

The information gathered was from running debug 2 on the GNS3 server.

I can provide more info if needed.

ianc1215 commented 7 years ago

I just tried to do the same thing to see if it can be reproduced. I was able to get the same result.

  1. Create a new VM using the GNS3 QEMU wizard.
  2. Install OS on new instance of VM template.
  3. Shutdown new instance of VM template.
  4. Copy qemu-hda.qcow2 from VM instance to home folder.
  5. Move qemu-hda.qcow2 into GNS/images/QEMU and rename it to something else (in this case untangle_1300_x32.qcow2)
  6. Connect VM template to "new" disk image.
  7. Make a new VM from the template
  8. Failure! Could not create hda disk image.

When I look in the folder of the new VM instance, the folder is blank. Nothing, no log, no disk image, nothing. This has to be where the issue is at... But why is it not copying the disk over?

julien-duponchelle commented 7 years ago

It's normal that you have the -hda.qcow2. Qemu use an overlay disk in order to no touch the original image, but this disk will contain only the difference.

The problem is : "Too many open files"

You can't open more file on your system probably a limit of io is too low.