Description of problem: (Note this is *not* needed for virt-v2v, or anything immediate, it is just a general feature request) qemu 2.2.0 curl driver supports a 'cookie' and a 'timeout' option. The cookie is a single opaque string. It can actually contain multiple cookies in the same string. The timeout is an integer (timeout in seconds). cookie option: http://git.qemu.org/?p=qemu.git;a=commit;h=a94f83d94fdf907680f068f1be7ad13d1f697067 timeout option: http://git.qemu.org/?p=qemu.git;a=commit;h=212aefaa53d142baa9a22f5aadd2e72eb916c0c0
There's also the sslverify option. Possible XML extensions could look like <disk type='network' device='cdrom'> <source protocol="http" name="/path/to/file"> <host name="myhost" port="443"/> <cookie>my-cookie-string</cookie> <timeout>60</timeout> <ssl verify='off'/> </source> ... </disk> Which would map to qemu option like -drive file=http://myhost:443/path/to/file,media=cdrom,file.cookie=my-cookie-data,file.timeout=60,file.sslverify=off See this bug comment for a link to an example commit, extending the XML parser and qemu commandline building: https://bugzilla.redhat.com/show_bug.cgi?id=825939#c3
Pro-tip: Use the json:-style URLs, they are much easier to create safely. There is also the readahead setting. Here is the virt-v2v code to do this: https://github.com/libguestfs/libguestfs/blob/master/v2v/vCenter.ml#L214
Why is the title about qemu if the bug is in libvirt?
libvirt should implement these qemu curl block driver features.
We want to be able to use this function for RHV 4.2. Can you please consider it?
FYI I filed this bug to track the enhancement needed in QEMU to support cookie setting https://bugzilla.redhat.com/show_bug.cgi?id=1447413
As discussed in the quarterly planning there is currently no need for this feature. As such closing this one. Feel free to reopen with a justification why this feature is needed. Thanks, Martin
This is still a valid feature request. I'll move it to the upstream tracker.
Patches proposed upstream: https://www.redhat.com/archives/libvir-list/2020-March/msg00247.html
Feature added upstream: d6db013c6e qemu: Pass through arguments of 'ssh' block driver used by libguestfs d089234110 qemublocktest: Add JSON->JSON test cases for block device backends 7f8d0ca56a qemublocktest: XMLjsonXML: Test formatting/parsing of modern JSON 218ce53069 qemublocktest: Extract schema root for blockdev-add validation 1262cdede4 qemublocktest: Load QMP schema earlier 5179cc6b08 virStorageSourceParseBackingJSONUri: Handle undocumented value 'off' for sslverify 77194db01c virstoragefile: Add JSON parser for 'sslverify', 'readahead', 'cookies' and 'timeout' 9cac141cd6 qemu: block: Implement readahead and timeout properties for 'curl' driver 06d3e8d539 qemu: block: Add support for HTTP cookies b512935b17 qemu: Handle hotplug and commandline for secret objects for http cookies 877cd35887 qemuDomainSecretStorageSourcePrepare: Setup secret for http cookies 4e8faa5cdc qemu: domain: Store data for 'secret' object representing http cookies 304da9376c qemu: block: Implement ssl verification configuration 3dd7952f6f qemuxml2argvtest: Add test case for disks with http(s) source c1409e308f qemuDomainValidateStorageSource: Validate new network storage parameters 63fd461773 conf: Add support for setting timeout and readahead size for network disks 3b076391be conf: Add support for cookies for HTTP based disks 25481e25b1 conf: Add support for modifying ssl validation for https/ftps disks 43a3d2e02e qemuDomainGetSecretAESAlias: Replace outstanding uses with qemuAliasForSecret 70d2758a9c qemuDomainSecretStorageSourcePrepare: Change aliases for disk secrets 86fecaedf5 qemuDomainSecretAESSetupFromSecret: Use 'qemuAliasForSecret' 740dd1a4e5 qemu: Split out initialization of secrets for 'iscsi' hostdevs 95a8c4332d qemuDomainDeviceDiskDefPostParseRestoreSecAlias: Hardcode restored aliases b05322fc03 qemuDomainSecretStorageSourcePrepare: Fix naming of alias variables bb2a81df21 qemu: Introduce another helper for creating alias for a 'secret' object f742461389 Remove qemuDomainSecretInfoNew 88663e59ef qemuDomainSecretAESSetup: Split out lookup of secret data bad8637892 qemuDomainSecretAESSetup: Allocate and return 'secinfo' here 88126d5f0e qemuDomainSecretAESSetup: Automatically free non-secret locals b544481a91 qemuDomainSecretInfo: Register autoptr cleanup function 7a34e04d82 qemuMigrationParamsResetTLS: Fix comment 3b61106550 qemuMigrationParamsResetTLS: Adapt to modern memory management 38bc76bcc1 qemu: Don't take double pointer in qemuDomainSecretInfoFree 4415b11d6b qemuBlockStorageSourceDetachPrepare: Get rid of cleanup section