Displaying 20 results from an estimated 31 matches for "data_conns".
2014 Dec 05
2
[PATCH] p2v: wait for qemu-nbd before starting conversion (RHBZ#1167774)
...lt;netinet/in.h>
#include <glib.h>
@@ -49,6 +51,7 @@ struct data_conn {
static int send_quoted (mexp_h *, const char *s);
static pid_t start_qemu_nbd (int nbd_local_port, const char *device);
+static int wait_qemu_nbd (int nbd_local_port, int timeout_seconds);
static void cleanup_data_conns (struct data_conn *data_conns, size_t nr);
static char *generate_libvirt_xml (struct config *, struct data_conn *);
static const char *map_interface_to_network (struct config *, const char *interface);
@@ -156,6 +159,12 @@ start_conversion (struct config *config,
if (data_conns[i].nbd_pid ==...
2016 Jun 30
4
[PATCH 0/4] p2v: Send ^C to remote end to cancel the conversion.
(I don't have a BZ# for this yet, but I'm expecting it to be
filed as an RFE)
Currently if the user is in the virt-p2v GUI and cancels the
conversion, all that happens is we abruptly close the ssh session to
virt-v2v.
That is bad .. possibly (or maybe not). But in any case there is an
alternative: we can send a ^C key to the virt-v2v process, which it
could catch and handle gracefully,
2017 Jan 26
3
[PATCH 0/3] p2v: Allow nbdkit as an alternative NBD server.
qemu-nbd is a fine NBD server. However it's not easy to compile a
reliably working version on RHEL 5.
This patch series allows nbdkit to be used as an alternative (qemu-nbd
is still the default).
Rich.
2014 Dec 11
1
[PATCH] p2v: show error dialog if virt-v2v fails (RHBZ#1167601)
...nversion.c
+++ b/p2v/conversion.c
@@ -100,6 +100,7 @@ start_conversion (struct config *config,
void (*notify_ui) (int type, const char *data))
{
int ret = -1;
+ int status;
size_t i, len;
size_t nr_disks = guestfs___count_strings (config->disks);
struct data_conn data_conns[nr_disks];
@@ -276,7 +277,7 @@ start_conversion (struct config *config,
if (mexp_printf (control_h, " ) | tee %s/virt-v2v-conversion-log.txt",
remote_dir) == -1)
goto printf_fail;
- if (mexp_printf (control_h, "; exit") == -1)
+ if (mexp_printf (con...
2017 Feb 03
5
[PATCH 0/5] Support socket activation in virt-p2v.
As the subject says, support socket activation in virt-p2v.
I have added upstream support for socket activation to nbdkit already:
https://github.com/libguestfs/nbdkit/commit/7ff39d028c6359f5c0925ed2cf4a2c4c751af2e4
I posted a patch for qemu-nbd, still waiting on more reviews for that
one:
https://www.mail-archive.com/qemu-devel@nongnu.org/msg427246.html
I tested this against old and new qemu
2018 Oct 04
0
[PATCH v2 2/4] common/utils: Move libxml2 writer macros to a common header file.
...riteFormatComment (xo, fs, ##__VA_ARGS__) == -1) \
- error (EXIT_FAILURE, errno, "xmlTextWriterWriteFormatComment"); \
- } while (0)
-
/**
* Write the libvirt XML for this physical machine.
*
@@ -143,21 +98,21 @@ generate_physical_xml (struct config *config, struct data_conn *data_conns,
attribute ("type", "physical");
start_element ("name") {
- string (config->guestname);
+ string ("%s", config->guestname);
} end_element ();
start_element ("memory") {
attribute ("unit", &quo...
2018 Oct 04
6
[PATCH v2 0/4] common/utils: Move libxml2 writer macros to a common header file.
v1 was here:
https://www.redhat.com/archives/libguestfs/2018-October/msg00047.html
However it was broken in a few ways. First of all the documentation
was broken because "/**" enhanced comments were not permitted on
macros. This is fixed in the new 1/4 patch.
Secondly we didn't use single_element() everywhere possible, which
is fixed in the new 4/4 patch.
Lastly I've
2018 Oct 04
2
[PATCH 0/2] Use common macros to help with libxml2 writer.
Consolidate and extend the use of funky start_element() etc macros.
Rich.
2018 Nov 02
0
[PATCH v3 4/4] lib, p2v: Use single_element() macro where possible.
...data->name, drv->src.u.path);
} end_element ();
return 0;
diff --git a/p2v/physical-xml.c b/p2v/physical-xml.c
index b2169fc83..7d80ab9c5 100644
--- a/p2v/physical-xml.c
+++ b/p2v/physical-xml.c
@@ -97,9 +97,7 @@ generate_physical_xml (struct config *config, struct data_conn *data_conns,
start_element ("domain") {
attribute ("type", "physical");
- start_element ("name") {
- string (config->guestname);
- } end_element ();
+ single_element ("name", config->guestname);
start_element ("memory&q...
2016 Mar 07
0
Re: [PATCH v2] Use less stack.
....c
> index f5c518a..8e90ef5 100644
> --- a/p2v/conversion.c
> +++ b/p2v/conversion.c
> @@ -167,7 +167,7 @@ start_conversion (struct config *config,
> int status;
> size_t i, len;
> size_t nr_disks = guestfs_int_count_strings (config->disks);
> - struct data_conn data_conns[nr_disks];
> + CLEANUP_FREE struct data_conn *data_conns;
Missing "= NULL" here.
> diff --git a/src/appliance.c b/src/appliance.c
> index dbde35e..d7cc60b 100644
> --- a/src/appliance.c
> +++ b/src/appliance.c
> @@ -396,27 +386,24 @@ find_path (guestfs_h *g,
>
&g...
2016 Oct 24
2
[PATCH] p2v: Inhibit power saving during the conversion.
...+219,12 @@ start_conversion (struct config *config,
set_running (1);
set_cancel_requested (0);
+ inhibit_fd = inhibit_sleep ();
+#ifdef DEBUG_STDERR
+ if (inhibit_fd == -1)
+ fprintf (stderr, "warning: virt-p2v cannot inhibit power saving during conversion.\n");
+#endif
+
data_conns = malloc (sizeof (struct data_conn) * nr_disks);
if (data_conns == NULL)
error (EXIT_FAILURE, errno, "malloc");
@@ -426,6 +433,9 @@ start_conversion (struct config *config,
}
cleanup_data_conns (data_conns, nr_disks);
+ if (inhibit_fd >= 0)
+ close (inhibit_fd);
+...
2017 Mar 30
4
[PATCH 0/3] p2v, v2v: Ensure the full version is always available in several places.
After debugging a virt-p2v issue with a customer in the middle of the
night on Tuesday, I felt it would have been helpful to know exactly
which version(s) of virt-p2v and virt-v2v they were using. That
wasn't very clear from the log file I was provided with, so this
change makes sure the information is included every time.
Rich.
2017 Mar 16
0
[PATCH 1/4] p2v: Pass host CPU details to virt-v2v.
...t;);
if (config->disks != NULL) {
for (i = 0; config->disks[i] != NULL; ++i)
diff --git a/p2v/conversion.c b/p2v/conversion.c
index 0c17ef2..55fbfb1 100644
--- a/p2v/conversion.c
+++ b/p2v/conversion.c
@@ -612,6 +612,35 @@ generate_libvirt_xml (struct config *config, struct data_conn *data_conns,
string_format ("%d", config->vcpus);
} end_element ();
+ if (config->cpu.vendor || config->cpu.model ||
+ config->cpu.sockets || config->cpu.cores || config->cpu.threads) {
+ /* https://libvirt.org/formatdomain.html#elementsCPU */
+ sta...
2016 Mar 07
2
[PATCH v2] Use less stack.
...-git a/p2v/conversion.c b/p2v/conversion.c
index f5c518a..8e90ef5 100644
--- a/p2v/conversion.c
+++ b/p2v/conversion.c
@@ -167,7 +167,7 @@ start_conversion (struct config *config,
int status;
size_t i, len;
size_t nr_disks = guestfs_int_count_strings (config->disks);
- struct data_conn data_conns[nr_disks];
+ CLEANUP_FREE struct data_conn *data_conns;
CLEANUP_FREE char *remote_dir = NULL, *libvirt_xml = NULL;
time_t now;
struct tm tm;
@@ -184,6 +184,12 @@ start_conversion (struct config *config,
set_running (1);
set_cancel_requested (0);
+ data_conns = malloc (sizeof (str...
2016 Jun 18
8
[PATCH 0/7] p2v: Multiple improvements to the look of virt-p2v.
In the run dialog, I have implemented an ANSI colour escape sequence
interpreter, so that colours displayed by the remote virt-v2v are now
shown to the user.
(https://bugzilla.redhat.com/show_bug.cgi?id=1314244)
This requires virt-v2v to send colours. It wasn't doing that because
the output was a pipe (as we capture the output into the log file).
So I added a global --colours option to make
2016 Mar 06
8
[PATCH 0/5] Use less stack.
Various changes/fixes to use smaller stack frames.
Rich.
2017 Mar 21
0
[PATCH] p2v: Calculate offset of the Real Time Clock from UTC.
...if (config->disks != NULL) {
for (i = 0; config->disks[i] != NULL; ++i)
diff --git a/p2v/conversion.c b/p2v/conversion.c
index 55fbfb11d..e7e7ce039 100644
--- a/p2v/conversion.c
+++ b/p2v/conversion.c
@@ -641,6 +641,29 @@ generate_libvirt_xml (struct config *config, struct data_conn *data_conns,
} end_element ();
}
+ switch (config->rtc.basis) {
+ case BASIS_UNKNOWN:
+ /* Don't emit any <clock> element. */
+ break;
+ case BASIS_UTC:
+ start_element ("clock") {
+ if (config->rtc.offset == 0)
+ attribute ("...
2019 Dec 03
7
[p2v PATCH 0/6] Use GLib a bit more
In an effort to reduce the code, start to use few bits of GLib:
- replace the gnulib c-type module
- replace the gnulib getprogname module
- use g_spawn_sync to launch curl, and drop a file reading function
Pino Toscano (6):
Include glib.h in p2v.h
Use g_ascii_isspace instead of c_isspace from gnulib
Use g_get_prgname instead of getprogname from gnulib
build: remove no more used gnulib
2017 Mar 21
2
[PATCH] p2v: Calculate offset of the Real Time Clock from UTC.
Unlike the <cpu> node (see the other thread on the libguestfs ML),
reading the Real Time Clock doesn't require libvirt and does work :-)
For reference, read:
https://libvirt.org/formatdomain.html#elementsTime
https://en.wikipedia.org/wiki/Time_zone
To test this you can run virt-p2v under qemu with a RTC offset:
make -C p2v \
run-virt-p2v-in-a-vm \
2014 Dec 12
2
[PATCH] p2v: avoid connecting to ourself while probing qemu-nbd (RHBZ#1167774)
---
p2v/conversion.c | 32 ++++++++++++++++++++++++++------
1 file changed, 26 insertions(+), 6 deletions(-)
diff --git a/p2v/conversion.c b/p2v/conversion.c
index 4ff7ecc..5c0c78e 100644
--- a/p2v/conversion.c
+++ b/p2v/conversion.c
@@ -44,6 +44,16 @@
/* How long to wait for qemu-nbd to start (seconds). */
#define WAIT_QEMU_NBD_TIMEOUT 10
+/* Source port for probing qemu-nbd. Should be one