On Wed, Nov 15, 2017 at 12:50 PM +0100, Andrea Bolognani <abologna(a)redhat.com>
wrote:
We can finally introduce a specific target type for the spapr-vty
device used by pSeries guests, which means isa-serial will no longer
show up to confuse users.
We make sure migration works in both directions by interpreting the
isa-serial target type, or the lack of target type, appropriately
when parsing the guest XML, and skipping the newly-introduced type
when formatting if for migration. We also verify that spapr-vty is
not used for non-pSeries guests and add a bunch of test cases.
This commit is best viewed with 'git diff -w'.
Resolves:
https://bugzilla.redhat.com/show_bug.cgi?id=1511421
Signed-off-by: Andrea Bolognani <abologna(a)redhat.com>
---
docs/formatdomain.html.in | 11 +-
docs/schemas/domaincommon.rng | 1 +
src/conf/domain_conf.c | 5 +-
+ for (i = 0; i < def->nserials; i++) {
+ virDomainChrDefPtr serial = def->serials[i];
+
+ /* Historically, the native console type for some machine types
+ * was not set at all, which means it defaulted to ISA even
+ * though that was not even remotely accurate. To ensure migration
+ * towards older libvirt versions works for such guests, we switch
+ * it back to the default here */
+ if (flags & VIR_DOMAIN_XML_MIGRATABLE) {
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
This condition is unneeded here as we already checked
this ~100 lines before.
+ switch ((virDomainChrSerialTargetType)
serial->targetType) {
+ case VIR_DOMAIN_CHR_SERIAL_TARGET_TYPE_SPAPR:
+ serial->targetType = VIR_DOMAIN_CHR_SERIAL_TARGET_TYPE_NONE;
+ break;
[...snip]
--
Beste Grüße / Kind regards
Marc Hartmayer
IBM Deutschland Research & Development GmbH
Vorsitzende des Aufsichtsrats: Martina Koederitz
Geschäftsführung: Dirk Wittkopp
Sitz der Gesellschaft: Böblingen
Registergericht: Amtsgericht Stuttgart, HRB 243294