search for: drive_source

Displaying 20 results from an estimated 38 matches for "drive_source".

2014 Jan 16
3
[PATCH 0/2] Don't use snapshot=on
QEMU upstream has broken snapshot=on ... again. These two patches stop using it entirely. Instead we run 'qemu-img create' to create overlay disks as required. Note that the libvirt and UML backends were already doing this: The libvirt backend because <transient/> has never worked, and the UML backend was running uml_mkcow because the UML-equivalent syntax of snapshot=on was
2013 Apr 30
1
[PATCH] ssh: fix setting the username part
Right now, we'd always be setting a NULL username. --- src/drives.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/drives.c b/src/drives.c index a13dd03..0e62ca8 100644 --- a/src/drives.c +++ b/src/drives.c @@ -1105,7 +1105,7 @@ guestfs___drive_source_qemu_param (guestfs_h *g, const struct drive_source *src) CLEANUP_FREE char *username = NULL, *port = NULL; if (src->username) - username = safe_asprintf (g, "%s@", username); + username = safe_asprintf (g, "%s@", src->username); if (src->serv...
2013 May 07
7
[PATCH 0/5] rbd improvements
This series improves ceph rbd support in libguestfs. It uses the servers list, adds support for a custom username, and starts to add support for custom secret.
2013 Apr 05
3
[PATCH] Add support for SSH (Secure Shell) block device.
Note this patch requires a non-upstream qemu patch that I've been experimenting with. See qemu-devel list. Rich.
2015 Feb 02
1
RFC: Handle query strings for http and https (RHBZ#1092583)
...return -1; + } if (STREQ (filename, "/dev/null")) drv = create_drive_dev_null (g, &data); diff --git a/src/guestfs-internal.h b/src/guestfs-internal.h index 573c3da..439a80b 100644 --- a/src/guestfs-internal.h +++ b/src/guestfs-internal.h @@ -242,6 +242,8 @@ struct drive_source { char *username; /* Optional secret (may be NULL if not specified). */ char *secret; + /* Optional query string (may be NULL if not specified). */ + char *query; }; enum discard { diff --git a/src/launch-direct.c b/src/launch-direct.c index e6ed54a..00f3190 100644 --- a/src/launch-d...
2016 May 17
0
[PATCH 1/2] src: start unifying version handling
...sion_init_null(v) guestfs_int_version_from_values (v, 0, 0, 0) + /* handle.c */ extern int guestfs_int_get_backend_setting_bool (guestfs_h *g, const char *name); @@ -903,7 +915,7 @@ extern void guestfs_int_cleanup_cmd_close (struct command **); /* launch-direct.c */ extern char *guestfs_int_drive_source_qemu_param (guestfs_h *g, const struct drive_source *src); -extern bool guestfs_int_discard_possible (guestfs_h *g, struct drive *drv, unsigned long qemu_version); +extern bool guestfs_int_discard_possible (guestfs_h *g, struct drive *drv, const struct version *qemu_version); extern char *guestfs_...
2014 Apr 30
3
[PATCH 2/2] Fix handling of passwords in URLs
...p the string in an own variable so it can be freed automatically. */ + userauth = safe_asprintf (g, "%s:%s", user, password); + uri.user = userauth; + } + switch (server->transport) { case drive_transport_none: case drive_transport_tcp: @@ -1267,34 +1276,37 @@ guestfs___drive_source_qemu_param (guestfs_h *g, const struct drive_source *src) return path; case drive_protocol_ftp: - return make_uri (g, "ftp", src->username, + return make_uri (g, "ftp", src->username, src->secret, &src->servers[0], src->u....
2017 Sep 12
0
[PATCH v2 4/5] lib: qemu: Add accessor to test if qemu does mandatory locking.
...pports (guestfs_h *g, const struct qemu_data *, const char *option); extern int guestfs_int_qemu_supports_device (guestfs_h *g, const struct qemu_data *, const char *device_name); +extern int guestfs_int_qemu_mandatory_locking (guestfs_h *g, const struct qemu_data *data); extern char *guestfs_int_drive_source_qemu_param (guestfs_h *g, const struct drive_source *src); extern bool guestfs_int_discard_possible (guestfs_h *g, struct drive *drv, const struct version *qemu_version); extern char *guestfs_int_qemu_escape_param (guestfs_h *g, const char *param); diff --git a/lib/qemu.c b/lib/qemu.c index 34775...
2015 Dec 01
2
[PATCH 1/2] launch: direct: manually compose iscsi:// URIs
...ded by libxml. --- src/launch-direct.c | 31 ++++++++++++++++++++++++++++--- 1 file changed, 28 insertions(+), 3 deletions(-) diff --git a/src/launch-direct.c b/src/launch-direct.c index 559a032..a26b9c4 100644 --- a/src/launch-direct.c +++ b/src/launch-direct.c @@ -1274,9 +1274,34 @@ guestfs_int_drive_source_qemu_param (guestfs_h *g, const struct drive_source *sr return make_uri (g, "https", src->username, src->secret, &src->servers[0], src->u.exportname); - case drive_protocol_iscsi: - return make_uri (g, "iscsi", NULL, NULL, -...
2014 Mar 10
5
[PATCH 0/3] Add discard support.
These patches contain the beginnings of discard (a.k.a. trim or unmap) support. This will allow us to change virt-sparsify to work on disk images in-place (instead of using slow & inefficient copying). The approach used is to add an optional 'discard' parameter to add-drive. It has 3 possible settings: - 'disable' : the default, no discard is done - 'besteffort' :
2020 Feb 20
1
[PATCH] lib: Move guestfs_device_index impl from daemon to library.
Although the commit message ties this to https://bugzilla.redhat.com/1804207, in fact I believe this commit could be applied independently. It's a simple optimization. Rich.
2016 May 18
2
[PATCH v2 0/2] lib: qemu: Memoize qemu feature detection.
v1 -> v2: - Rebase on top of Pino's version work. Two patches went upstream, these are the two remaining patches. Note the generation number is still inside the qemu.stat file. We could put it in the filename, I have no particular preference. Rich.
2014 Jan 23
7
[PATCH 0/7] Various fixes for Ceph drives and parsing libvirt XML.
Miscellaneous fixes to: - Handling of Ceph drives now works end-to-end (RHBZ#1026688). - In particular, you can now use rbd:/// URIs in guestfish (and they work). - Parse Ceph & NBD network drives from libvirt XML correctly, so that existing domains with Ceph/NBD drives can be added (eg. using guestfish -d option). - Add more testing of the above.
2015 Jul 01
2
Re: URI Handling Patch
Hi All, Here's the latest patch. I think this should address the problem. The query string is now only appended to the end of a URI in the HTTP and HTTPS cases. The add-uri test now passes, and 'make check' still passes. -- Gabriel
2013 Mar 15
0
[PATCH] lib: Add direct support for the NBD (Network Block Device) protocol.
...git a/src/guestfs-internal.h b/src/guestfs-internal.h index f5db4cf..71f18a3 100644 --- a/src/guestfs-internal.h +++ b/src/guestfs-internal.h @@ -113,8 +113,22 @@ struct event { }; /* Drives added to the handle. */ +enum drive_protocol { + drive_protocol_file, + drive_protocol_nbd, +}; +union drive_source { + char *path; /* protocol = "file" */ + struct { /* protocol = "nbd" */ + char *server; + int port; + char *exportname; + } nbd; +}; + struct drive { - char *path; + enum drive_protocol protocol; + union drive_source u;...
2016 May 18
2
[PATCH v2 0/2] Use -bios bios-fast.bin where supported.
This commit uses -bios bios-fast.bin if available, which basically stops SeaBIOS from trying to do PCI probing during boot, which is a waste of time when using the -kernel option. v1 -> v2: - Rebase on top of Pino's work. This still has 3 dependencies: - The qemu memoization work (v2). - Support for '-L ?' in qemu:
2018 Sep 13
1
[PATCH] lib: direct: Query qemu binary for availability of KVM (RHBZ#1605071).
..._int_qemu_supports_device (guestfs_h *g, const struct qemu_data *, const char *device_name); extern int guestfs_int_qemu_mandatory_locking (guestfs_h *g, const struct qemu_data *data); +extern bool guestfs_int_platform_has_kvm (guestfs_h *g, const struct qemu_data *data); extern char *guestfs_int_drive_source_qemu_param (guestfs_h *g, const struct drive_source *src); extern bool guestfs_int_discard_possible (guestfs_h *g, struct drive *drv, const struct version *qemu_version); extern char *guestfs_int_qemu_escape_param (guestfs_h *g, const char *param); diff --git a/lib/launch-direct.c b/lib/launch-di...
2020 Feb 10
0
Re: [RFC] lib: allow to specify physical/logical block size for disks
..._xml_disk_address (guestfs_h *g, xmlTextWriterPtr xo, size_t drv_index); > +static int construct_libvirt_xml_disk_blockio (guestfs_h *g, xmlTextWriterPtr xo, int pblocksize, int lblocksize); > static int construct_libvirt_xml_disk_source_hosts (guestfs_h *g, xmlTextWriterPtr xo, const struct drive_source *src); > static int construct_libvirt_xml_disk_source_seclabel (guestfs_h *g, const struct backend_libvirt_data *data, xmlTextWriterPtr xo); > static int construct_libvirt_xml_appliance (guestfs_h *g, const struct libvirt_xml_params *params, xmlTextWriterPtr xo); > @@ -1578,6 +1579,10 @@...
2016 May 12
7
[PATCH 0/4] lib: qemu: Memoize qemu feature detection.
Doing qemu feature detection in the direct backend takes ~100ms because we need to run `qemu -help' and `qemu -devices ?', and each of those interacts with glibc's very slow link loader. Fixing the link loader is really hard. Instead memoize the output of those two commands. This patch series first separates all the code dealing with qemu into a separate module (src/qemu.c) and
2014 Mar 12
3
Re: [PATCH v2 03/18] New API parameter: Add discard parameter to guestfs_add_drive_opts.
...to this file, could need some help in avoid the over-long list of parameters, which all need to be changed every time there's an argument change (just like now). I'll do a small refactor. > --- a/src/guestfs-internal.h > +++ b/src/guestfs-internal.h > @@ -231,6 +231,12 @@ struct drive_source { > char *secret; > }; > > +enum discard { > + discard_disable = 0, > + discard_enable = 1, > + discard_besteffort = 2, > +}; I guess the manual numbering is not needed. > > - if (construct_libvirt_xml_disk_driver_qemu (g, xo, "qcow2", "u...