On Tue, Jul 27, 2021 at 01:52:30PM +0200, Ján Tomko wrote:
We do not support some configs that assume fd passing.
Add a disclaimer to the API and the virsh command, and a bit frendlier
error message to the vsock command line generator.
(Alternatively, we could fill in some random values for the file
descriptor numbers, just to give the user an idea what the command line
would look like. But this still won't give them a functional equivalent
of the command line. Which is not possible in all cases anyway)
I thought about passing in fake FD numbers to the XML formatting APIs
before, but that risks us accidentally trying to close the fake FDs
in error paths, so felt too dangerous.
I think the safest we can do is to pass in NULL (or -1) for the pre-opened
FDs, and whe we see that format a placeholder, eg literally generate
--netdev tap,fd=FD-NUM
to make it clear we've not provided a real FD and you have to replace
the string "FD-NUM" with your own FD.
Regards,
Daniel
--
|:
https://berrange.com -o-
https://www.flickr.com/photos/dberrange :|
|:
https://libvirt.org -o-
https://fstop138.berrange.com :|
|:
https://entangle-photo.org -o-
https://www.instagram.com/dberrange :|