Do not look to "../../qemu/x86_64-softmmu/qemu-system-x86_64",
this will be searched with which if no found, just use the name.
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Victor Toso <victortoso@redhat.com>
The script was updated to use Python 3 syntax.
Although you can launch with "python3 ./tests/migrate.py ..."
better to also update the script source to make it
executable directly.
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Victor Toso <victortoso@redhat.com>
Now we always add seamless-migration option to qemu command line and
disabled (off) by default although seamless migration is supported for
over 7 years already!
Signed-off-by: Victor Toso <victortoso@redhat.com>
Acked-by: Kevin Pouget <kpouget@redhat.com>
This is used in the migrate message and being able to tweak it allows
clients from different machines to test this local migration test.
Example of usage:
./migrate.py --hostname 192.168.122.1 --wait-user-connect
In a VM with access to 192.168.122.1:
remote-viewer spice://192.168.122.1:5911
Signed-off-by: Victor Toso <victortoso@redhat.com>
Acked-by: Kevin Pouget <kpouget@redhat.com>
Preparatory patch for adding support to change hostname.
Signed-off-by: Victor Toso <victortoso@redhat.com>
Acked-by: Kevin Pouget <kpouget@redhat.com>
This function can be tweak quite a bit due all possibilities around
QEMU configuration. This patch removes incoming_args and extra_args
and move their values to the right place in the function.
I'm also applying a more extensive coding style for parameters, so
when we need to do changes it should happen with fewer lines.
While at it, change to string interpolation from 3.6+, suggested by
Kevin Pouget.
Signed-off-by: Victor Toso <victortoso@redhat.com>
Acked-by: Kevin Pouget <kpouget@redhat.com>
We are only interested in the running state of qmp (or VCPUS) here
which is what we check. Moving this check to the try branch allows
removing some extra checks.
Signed-off-by: Victor Toso <victortoso@redhat.com>
Acked-by: Kevin Pouget <kpouget@redhat.com>
As this is not some index but a counter. The first print happens after
first migration was done, meaning 1 instead of 0
Signed-off-by: Victor Toso <victortoso@redhat.com>
Acked-by: Kevin Pouget <kpouget@redhat.com>
Currently, when we run migrate.py with --client option we get stuck
waiting for SPICE_CONNECTED event on target qmp (while receiving only
QMP). Problem is, only after event SPICE_INITIALIZED in the source qmp
is that the client will be able to do migration (to properly exchange
spice messages).
So, it is a must that if we have a test where a client is connected,
to wait for SPICE_INITIALIZED event in the source qmp.
To clarify, this patches fixes the following test:
./migrate.py --client spicy
Signed-off-by: Victor Toso <victortoso@redhat.com>
Acked-by: Kevin Pouget <kpouget@redhat.com>
Instead, create a new image with backing-file of the original image
(a "permanent" snapshot), use it during the test and remove it at the end.
Also use 'writeback' cache instead of 'unsafe'.
Signed-off-by: Uri Lublin <uril@redhat.com>
squash: actually remove the snapshot. mention cache change
There is no raw_input() in python3 -- define it as input()
Use decode() when writing subprocess output to the log, to make
sure the argument for write is a string (in python3
stdout.read() returns bytes).
There is no has_key in python3 -- use "in" instead
Signed-off-by: Uri Lublin <uril@redhat.com>
Before this patch, running the test with --vdagent option would error
in the second migration attempt with:
| qemu-system-x86_64: Unknown savevm section or instance
| '0000:00:04.0/virtio-console' 0. Make sure that your current VM setup
| matches your saved VM setup, including any hotplugged devices
The reason is that target host created for migration was lacking the
configuration for vdagent that is present in the first source/target
migration VMs.
Signed-off-by: Victor Toso <victortoso@redhat.com>
Acked-by: Uri Lublin <uril@redhat.com>
This supports doing migration without any client to be connected.
If tester wants client, it needs to pass an option to --client.
Change of default still is to keep the test as simple as possible
when no arguments are given.
Signed-off-by: Victor Toso <victortoso@redhat.com>
Acked-by: Uri Lublin <uril@redhat.com>
The iterate() method already considers it. This is useful if one wants
to attach gdb on qemu for instance.
Signed-off-by: Victor Toso <victortoso@redhat.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
Simpler. Make the default to be False as well as
1) No args should run as simple as possible
2) True is currently broken
Signed-off-by: Victor Toso <victortoso@redhat.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
Not supported feature to be tested so reduce unused/untested code for
now.
Signed-off-by: Victor Toso <victortoso@redhat.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
Moved in qemu, see:
| commit 8f8fd9edba4bd6768da2c8e2bea49ad5c16ced1a
| Author: Cleber Rosa <crosa@redhat.com>
| Date: Wed Feb 6 11:29:01 2019 -0500
|
| Introduce a Python module structure
|
| This is a simple move of Python code that wraps common QEMU
| functionality, and are used by a number of different tests and
| scripts.
|
| By treating that code as a real Python module, we can more easily:
| * reuse code
| * have a proper place for the module's own unittests
| * apply a more consistent style
| * generate documentation
Signed-off-by: Victor Toso <victortoso@redhat.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
Adds the required options to provide a vdagent to the guest in both source and target qemu
instances.
This will be the last update of the in spice git tests directory, I've moved those tests
to the repository spice-tests. The longer term goal remains autotest integration, but since
this test (and some minor others for qemu) need a home it is:
http://cgit.freedesktop.org/~alon/spice-tests/
(I'm reluctant to put it under spice/ because of my wish to go to autotest, but still, there
they are. Nothing as permanent as the temporary).
Independent (of external modules, i.e. qemu) tests (server/tests) should remain in tree.
Most helpful change is that it prints help if you do --help.
It can take --image parameter, and --client parameter, defaults to spicy.
Incidentally, spicy switch host seems broken - if you run with --client spicec
(assuming spicec is in the PATH), it works fine, but using the default spicy (or
--client spicy) it fails after a single switch.