Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

QEMU 3.1 compatibility #1342

Merged
merged 5 commits into from
Feb 20, 2019
Merged

QEMU 3.1 compatibility #1342

merged 5 commits into from
Feb 20, 2019

Conversation

apoikos
Copy link
Member

@apoikos apoikos commented Feb 19, 2019

A number of options have been dropped in QEMU 3.1 and as a result KVM does not work out of the box. Fix these by converting to the new syntax. Note that for users using VNC TLS, this means a minimum QEMU version of 2.5 (released in Dec 2015).

This fixes #1338

@apoikos
Copy link
Member Author

apoikos commented Feb 19, 2019

I have successfully tested this PR with QEMU 3.1 and all possible option combinations. Also, live-migrations between QEMU 2.8 and QEMU 3.1 seem to work fine.

This PR also demonstrates the need for a better framework to manage the QEMU command line. String concatenation/parsing is obviously too error-prone.

@apoikos apoikos requested a review from iustin February 19, 2019 14:48
@iustin
Copy link
Contributor

iustin commented Feb 19, 2019

This PR also demonstrates the need for a better framework to manage the QEMU command line. String concatenation/parsing is obviously too error-prone.

Yes, this is ugly, but for the last commit, the original data is a raw string, so no way around it, even if for backwards compatibility. 3.0+ could change to store in a JSON file, and fallback to parsing, but not earlier…

lib/hypervisor/hv_kvm/__init__.py Outdated Show resolved Hide resolved
lib/hypervisor/hv_kvm/__init__.py Outdated Show resolved Hide resolved
Copy link
Contributor

@iustin iustin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thanks.

-localtime was removed in QEMU 3.1, superseded by `-rtc base=localtime`
which has been supported since QEMU 0.12.0.

This is part of ganeti#1338.

Signed-off-by: Apollon Oikonomopoulos <apoikos@dmesg.gr>
-balloon has been removed in QEMU 3.1, superseded by -device
virtio-balloon. The latter has been supported since QEMU 0.12.0, so it's
safe to use.

This is part of ganeti#1338.

Signed-off-by: Apollon Oikonomopoulos <apoikos@dmesg.gr>
Since QEMU 2.5, VNC TLS handling has been refactored using the `-object
tls-creds-*` parameters. QEMU 3.1 completely removed the support for
`-vnc tls`, so we need to switch to the new syntax.

Note that this places a lower bound on QEMU 2.5 for those wishing to use
VNC + TLS. 2.5.0 was released more than 3 years ago, so people should be
using it already and it doesn't make sense to try to be backwards
compatible here.

This is part of ganeti#1338.

Signed-off-by: Apollon Oikonomopoulos <apoikos@dmesg.gr>
-M has been marked as deprecated since 0.15.0 and will eventually be
removed. Switch to -machine instead.

Signed-off-by: Apollon Oikonomopoulos <apoikos@dmesg.gr>
Use _UpgradeSerializedRuntime to replace the unsupported command line
arguments with their working counterparts. This will make
already-running instances migrateable to 3.1, cross-version migration
bugs aside.

This is part of ganeti#1338.

Signed-off-by: Apollon Oikonomopoulos <apoikos@dmesg.gr>
@apoikos apoikos merged commit d792d34 into ganeti:stable-2.16 Feb 20, 2019
@apoikos apoikos deleted the compat/qemu_3.1 branch February 20, 2019 20:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants