Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

-drive option forbidden #3628

Closed
g1augusto opened this issue Sep 7, 2024 · 4 comments
Closed

-drive option forbidden #3628

g1augusto opened this issue Sep 7, 2024 · 4 comments
Labels

Comments

@g1augusto
Copy link

g1augusto commented Sep 7, 2024

GNS3 Version: GNS3 v2.2.49

Operating System: Windows GUI and Linux bare metal server

I have a VM template created with specific -drive options in QEMU but for some strange reason these are forbidden to be used in the GNS3 GUI with the following error message:

Forbidden additional option: -drive

At first I thought it was something that QEMU itself rejected and then I tried with two different versions (8.2.6 and 7.2.12) from the GNS3 server command line and it booted correctly.

Why this limitation? what is the purpose of it? Is there any way to overcome it or is it just a mistake?

These are the two options causing this:

-drive if=pflash,format=raw,readonly=on,file="/firmware/OVMF_CODE.fd" 
-drive if=pflash,format=raw,file="/firmware/OVMF_VARS-1024x768.fd" 

PS: I have tried to use the gui disk image option as pflash and pass the path of the files but it didn't work

@g1augusto g1augusto added the Bug label Sep 7, 2024
@cristian-ciobanu
Copy link

@g1augusto you can check this commit related to your problem GNS3/gns3-server@b194e48

I think if you add this line into gns3_server.conf and set it to true it will allow you to use the -drive option

; Allow unsafe additional command line options
allow_unsafe_options = True

@g1augusto
Copy link
Author

Looks like a good catch @cristian-ciobanu
I will test it tomorrow

@g1augusto
Copy link
Author

g1augusto commented Sep 9, 2024

EDIT: My bad, it works.

I realized I picked the wrong gns3_server.conf to add the configuration into.

Actually I didn't have at all a gns3_server.conf in the home service account directory in linux, weird...what the default values would be?
the ones here?
https://github.com/GNS3/gns3-server/blob/master/conf/gns3_server.conf

@grossmj
Copy link
Member

grossmj commented Sep 17, 2024

Actually I didn't have at all a gns3_server.conf in the home service account directory in linux, weird...what the default values would be?
the ones here?
https://github.com/GNS3/gns3-server/blob/master/conf/gns3_server.conf

Yes, that file should have the default values.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants