Skip to contentSkip to conversation

[xl restore and migrating problem - hardware compatibility]

xl restore and migrating problem - hardware compatibility Ing. Ricardo Brisighelli 6 participants 11 messages Dec 23, 2016 – Jan 4, 2017

lore
Share & tools
lore
#0 lore raw

Hi, i'm gentoo user and try with xen 4.6.3 and 4.7.1 in both version have the same problem.

My cpu is AMD A10-7860K

I run VM as PVlinux, then try migrate to other server (same hardware) and dont work, same occurs when try restore a saved VM, but this works well (migrate and restore) if run VM as HVM.

I try same instalation in cpu Intel I7-4790 and ir works well VM as PVlinux and HVM

Hardware Problem
#cat /proc/cpuinfo (only last core)
proprocessor : 3
vendor_id : AuthenticAMD
cpu family : 21
model : 56
model name : AMD A10-7860K Radeon R7, 12 Compute Cores 4C+8G
stepping : 1
microcode : 0x6003106
cpu MHz : 3591.088
cache size : 2048 KB
physical id : 0
siblings : 4
core id : 3
cpu cores : 4
apicid : 0
initial apicid : 3
fpu : yes
fpu_exception : yes
cpuid level : 13
wp : yes
flags : fpu de tsc msr pae mce cx8 apic mca cmov pat clflush mmx
fxsr sse sse2 ht syscall nx mmxext fxsr_opt l
m constant_tsc rep_good nopl nonstop_tsc extd_apicid eagerfpu pni pclmulqdq ssse3 fma cx16 sse4_1 sse4_2 popcnt aes xsav
e avx f16c hypervisor lahf_lm cmp_legacy extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch xop fma4 tce tbm perfctr
_core perfctr_nb bpext arat cpb hw_pstate vmmcall fsgsbase bmi1 xsaveopt
bugs : fxsave_leak
bogomips : 7182.17
TLB size : 1536 4K pages
clflush size : 64
cache_alignment : 64
address sizes : 48 bits physical, 48 bits virtual
power management: ts ttp tm 100mhzsteps hwpstate cpb eff_freq_ro [13]

Migration problem:

#xl migrate fs dstdomain
migration target: Ready to receive domain.
Saving to migration stream new xl format (info 0x3/0x0/1307) Loading new save file <incoming migration stream> (new xl fmt info 0x3/0x0/1307)
Savefile contains xl domain config in JSON format
Parsing config from <saved>
xc: info: Saving domain 5, type x86 PV
xc: info: Found x86 PV domain from Xen 4.6
xc: info: Restoring domain
xc: error: X86_PV_VCPU_MSRS record truncated: length 8, min 9: Internal error
xc: error: Restore failed (0 = Success): Internal error
libxl: error: libxl_stream_read.c:749:libxl__xc_domain_restore_done: restoring
domain: Success
libxl: error: libxl_create.c:1144:domcreate_rebuild_done: cannot (re-)build
domain: -3
libxl: error: libxl.c:1610:libxl__destroy_domid: non-existant domain 1
libxl: error: libxl.c:1568:domain_destroy_callback: unable to destroy guest with domid 1
libxl: error: libxl.c:1495:domain_destroy_cb: destruction of domain 1 failed migration target: Domain creation failed (code -3).
libxl: error: libxl_utils.c:430:libxl_read_exactly: file/stream truncated reading ready message from migration receiver
stream
libxl: info: libxl_exec.c:118:libxl_report_child_exitstatus: migration transport process [4250] exited with error status
3
Migration failed, resuming at sender.

Save and restore problem:

#xl save fs fs.snap
Saving to fs.snap new xl format (info 0x3/0x0/1307)
xc: info: Saving domain 5, type x86 PV
xc: Frames: 131072/131072 100%
xc: End of stream: 0/0 0%

#xl restore fs.snap
Loading new save file fs.snap (new xl fmt info 0x3/0x0/1307) Savefile contains xl domain config in JSON format
Parsing config from <saved>
xc: info: Found x86 PV domain from Xen 4.6
xc: info: Restoring domain
xc: error: X86_PV_VCPU_MSRS record truncated: length 8, min 9: Internal error
xc: error: Restore failed (0 = Success): Internal error
libxl: error: libxl_stream_read.c:749:libxl__xc_domain_restore_done: restoring
domain: Success
libxl: error: libxl_create.c:1144:domcreate_rebuild_done: cannot (re-)build
domain: -3
libxl: error: libxl.c:1610:libxl__destroy_domid: non-existant domain 6
libxl: error: libxl.c:1568:domain_destroy_callback: unable to destroy guest with domid 6
libxl: error: libxl.c:1495:domain_destroy_cb: destruction of domain 6 failed

#verify-stream-v2 -v -f xl -i fs.snap
Processed xl header
Libxl Header: little endian
Libxl Record: Libxc context, length 0
Libxc Image Header: little endian
Domain Header: x86 PV from Xen 4.6
Libxc Record: x86 PV info, length 8
64bit guest, 4 levels of pagetables
Libxc Record: x86 PV P2M frames, length 2056
Start pfn 0x0, End 0x1ffff
Squashed 128 Page Data records together
Libxc Record: TSC info, length 24
Mode 0, 3591089 kHz, 1189155414000 ns, incarnation 1
Libxc Record: Shared info, length 4096
Libxc Record: x86 PV vcpu basic, length 5176
vcpu0 basic context, 5168 bytes
Libxc Record: x86 PV vcpu extended, length 64
vcpu0 extended context, 56 bytes
Libxc Record: x86 PV vcpu xsave, length 856
vcpu0 xsave context, 848 bytes
Libxc Record: x86 PV vcpu msrs, length 8
Stream Error:
Traceback (most recent call last):
File "/usr/libexec/xen/bin/verify-stream-v2", line 82, in read_stream
VerifyLibxl(info, stream_read).verify()
File "/usr/lib64/python2.7/site-packages/xen/migration/libxl.py", line 82, in
verify
while self.verify_record() != REC_TYPE_end:
File "/usr/lib64/python2.7/site-packages/xen/migration/libxl.py", line 136,
in verify_record
record_verifiers[rtype](self, content[:length])
File "/usr/lib64/python2.7/site-packages/xen/migration/libxl.py", line 155,
in verify_record_libxc_context
VerifyLibxc(self.info, self.read).verify()
File "/usr/lib64/python2.7/site-packages/xen/migration/libxc.py", line 132,
in verify
while self.verify_record() != REC_TYPE_end:
File "/usr/lib64/python2.7/site-packages/xen/migration/libxc.py", line 227,
in verify_record
record_verifiers[rtype](self, content[:length])
File "/usr/lib64/python2.7/site-packages/xen/migration/libxc.py", line 429,
in <lambda>
VerifyLibxc.verify_record_x86_pv_vcpu_generic(s, x, "msrs"),
File "/usr/lib64/python2.7/site-packages/xen/migration/libxc.py", line 323,
in verify_record_x86_pv_vcpu_generic
" bytes long" % (name, minsz))
RecordError: X86_PV_VCPU_msrs record length must be at least 8 bytes long

Hardware works correcltly
#cat /proc/cpuinfo (last core)
Processor : 7
vendor_id : GenuineIntel
cpu family : 6
model : 60
model name : Intel(R) Core(TM) i7-4790 CPU @ 3.60GHz
stepping : 3
microcode : 0x1c
cpu MHz : 3600.098
cache size : 8192 KB
physical id : 0
siblings : 8
core id : 3
cpu cores : 4
apicid : 7
initial apicid : 7
fpu : yes
fpu_exception : yes
cpuid level : 13
wp : yes
flags : fpu de tsc msr pae mce cx8 apic sep mca cmov pat clflush
acpi mmx fxsr sse sse2 ss ht syscall nx lm co
nstant_tsc arch_perfmon rep_good nopl nonstop_tsc eagerfpu pni pclmulqdq monitor est ssse3 sdbg fma cx16 sse4_1 sse4_2 m
ovbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand hypervisor lahf_lm abm ida arat pln pts dtherm fsgsbase bmi1 av
x2 bmi2 erms xsaveopt

bugs            :                                                                                                        
bogomips        : 7200.19                                                                                                
clflush size    : 64           

Regards.

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel

#1 lore raw
Quoted 4 lines · Ing. Ricardo Brisighelli

Hi, i'm gentoo user and try with xen 4.6.3 and 4.7.1 in both version have the same problem.

My cpu is AMD A10-7860K

This issue has been reported before ("[Xen-devel] "X86_PV_VCPU_MSRS record truncated" during domain restore").

I submitted patches to fix it ("Fix issues with zero-length records in migration v2" in July even), which made no progress. As the author of migration v2, and unfortunately of this bug, I stand by v1 of my fix without any further modification.

You can find the patches here: https://xenbits.xen.org/gitweb/?p=people/andrewcoop/xen.git;a=shortlog;h=refs/heads/tools-fix-zero-length-records

Julien: As 4.9 RM, please mark this as a release blocker. It is very poor that we as a community had this reported and fixed 6 months ago, and yet it still didn't make it into 4.8

~Andrew

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel

#2 lore raw
Quoted 11 lines · Andrew Cooper
Quoted 4 lines · Ing. Ricardo Brisighelli

Hi, i'm gentoo user and try with xen 4.6.3 and 4.7.1 in both version have the same problem.

My cpu is AMD A10-7860K

This issue has been reported before ("[Xen-devel] "X86_PV_VCPU_MSRS record truncated" during domain restore").

I submitted patches to fix it ("Fix issues with zero-length records in migration v2" in July even), which made no progress. As the author of migration v2, and unfortunately of this bug, I stand by v1 of my fix without any further modification.

You can find the patches here: https://xenbits.xen.org/gitweb/?p=people/andrewcoop/xen.git;a=shortlog;h=refs/heads/tools-fix-zero-length-records

If you don't want to take patches, you should be able to work around the issue by booting Xen with

cpuid_mask_ext_ecx=fbffffff

Specifically, you are looking to hide the DBEXT feature from Xen so it doesn't choose to insert them into the migration stream to start with. This migration bug only manifests when the hardware is capable, but the VM isn't using the feature.

~Andrew

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel

#3 lore raw
Quoted 22 lines · El Vie 23 Dic 2016 17:16:32 Andrew Cooper escribió:
Quoted 10 lines · Andrew Cooper
Quoted 5 lines · Ing. Ricardo Brisighelli

Hi, i'm gentoo user and try with xen 4.6.3 and 4.7.1 in both version have the
same problem.

My cpu is AMD A10-7860K

This issue has been reported before ("[Xen-devel] "X86_PV_VCPU_MSRS record truncated" during domain restore").

Quoted 8 lines

I submitted patches to fix it ("Fix issues with zero-length records in migration v2" in July even), which made no progress. As the author of migration v2, and unfortunately of this bug, I stand by v1 of my fix without any further modification.

You can find the patches here:
https://xenbits.xen.org/gitweb/?p=people/andrewcoop/xen.git;a=shortlog;h=r
efs/heads/tools-fix-zero-length-records

If you don't want to take patches, you should be able to work around the issue by booting Xen with

Quoted 8 lines

cpuid_mask_ext_ecx=fbffffff

Specifically, you are looking to hide the DBEXT feature from Xen so it doesn't choose to insert them into the migration stream to start with. This migration bug only manifests when the hardware is capable, but the VM isn't using the feature.

~Andrew

Hi Andrew, first i try boot xen with cpuid_mask_ext_ecx=fbffffff, restore and migration works well, then try apply the patchs

tools/python: Adjust migration v2 library to warn about... tools/libxc: Avoid generating inappropriate zero-length... tools/libxc: Tolerate zero-length records in migration...

remove cpuid_mask, recompile and install xen-4.7.1, reboot and the problem persist. I'm missing something?

Regards

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel

#4 lore raw
Quoted 33 lines · Ing. Ricardo Brisighelli
Quoted 21 lines · El Vie 23 Dic 2016 17:16:32 Andrew Cooper escribió:
Quoted 9 lines · Andrew Cooper
Quoted 5 lines · Ing. Ricardo Brisighelli

Hi, i'm gentoo user and try with xen 4.6.3 and 4.7.1 in both version have the
same problem.

My cpu is AMD A10-7860K

This issue has been reported before ("[Xen-devel] "X86_PV_VCPU_MSRS record truncated" during domain restore").

Quoted 8 lines

I submitted patches to fix it ("Fix issues with zero-length records in migration v2" in July even), which made no progress. As the author of migration v2, and unfortunately of this bug, I stand by v1 of my fix without any further modification.

You can find the patches here:
https://xenbits.xen.org/gitweb/?p=people/andrewcoop/xen.git;a=shortlog;h=r
efs/heads/tools-fix-zero-length-records

If you don't want to take patches, you should be able to work around the issue by booting Xen with

Quoted 8 lines

cpuid_mask_ext_ecx=fbffffff

Specifically, you are looking to hide the DBEXT feature from Xen so it doesn't choose to insert them into the migration stream to start with. This migration bug only manifests when the hardware is capable, but the VM isn't using the feature.

~Andrew

Hi Andrew, first i try boot xen with cpuid_mask_ext_ecx=fbffffff, restore and migration works well, then try apply the patchs

Quoted 6 lines

tools/python: Adjust migration v2 library to warn about... tools/libxc: Avoid generating inappropriate zero-length... tools/libxc: Tolerate zero-length records in migration...

remove cpuid_mask, recompile and install xen-4.7.1, reboot and the problem persist. I'm missing something?

Does Gentoo split the various parts of Xen apart into sub-packages? This needs to be the dom0 tools build, not the hypervisor build.

~Andrew

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel

#5 lore raw
Quoted 48 lines · El Vie 23 Dic 2016 23:22:17 Andrew Cooper escribió:
Quoted 37 lines · Ing. Ricardo Brisighelli
Quoted 24 lines · El Vie 23 Dic 2016 17:16:32 Andrew Cooper escribió:
Quoted 15 lines · Andrew Cooper
Quoted 5 lines · Ing. Ricardo Brisighelli

Hi, i'm gentoo user and try with xen 4.6.3 and 4.7.1 in both version have the
same problem.

My cpu is AMD A10-7860K

This issue has been reported before ("[Xen-devel] "X86_PV_VCPU_MSRS record truncated" during domain restore").

I submitted patches to fix it ("Fix issues with zero-length records in migration v2" in July even), which made no progress. As the author of migration v2, and unfortunately of this bug, I stand by v1 of my fix without any further modification.

Quoted 4 lines

You can find the patches here:
https://xenbits.xen.org/gitweb/?p=people/andrewcoop/xen.git;a=shortlog;h
=r
efs/heads/tools-fix-zero-length-records

If you don't want to take patches, you should be able to work around the issue by booting Xen with

Quoted 8 lines

cpuid_mask_ext_ecx=fbffffff

Specifically, you are looking to hide the DBEXT feature from Xen so it doesn't choose to insert them into the migration stream to start with. This migration bug only manifests when the hardware is capable, but the VM isn't using the feature.

~Andrew

Hi Andrew, first i try boot xen with cpuid_mask_ext_ecx=fbffffff, restore and migration works well, then try apply the patchs

Quoted 6 lines

tools/python: Adjust migration v2 library to warn about... tools/libxc: Avoid generating inappropriate zero-length... tools/libxc: Tolerate zero-length records in migration...

remove cpuid_mask, recompile and install xen-4.7.1, reboot and the problem persist. I'm missing something?

Does Gentoo split the various parts of Xen apart into sub-packages? This needs to be the dom0 tools build, not the hypervisor build.

Quoted 7 lines

~Andrew

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel

I recompile xen-tools and all works well.

Thanks very much Andrew

Regards

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel

#6 lore raw
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines

This issue has been reported before ("[Xen-devel] "X86_PV_VCPU_MSRS record truncated" during domain restore").

I submitted patches to fix it ("Fix issues with zero-length records in migration v2" in July even), which made no progress. As the author of migration v2, and unfortunately of this bug, I stand by v1 of my fix without any further modification.

Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 4 lines

You can find the patches here:
https://xenbits.xen.org/gitweb/?p=people/andrewcoop/xen.git;a=shortlog;h
=r
efs/heads/tools-fix-zero-length-records

FWIW, this is fixed in Gentoo now with xen-4.8.0-r1 or xen-4.7.1-r5 and newer.

https://github.com/gentoo/gentoo/commit/ea2b45715c75943192933e14b58a348027927f2a

Signature · 1 line
Doug Goldstein

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel

#7 lore raw
In reply to Andrew Cooper

(Adding Ian and Wei)

Hi Andrew,

Quoted 15 lines · Andrew Cooper
Quoted 5 lines · Ing. Ricardo Brisighelli

Hi, i'm gentoo user and try with xen 4.6.3 and 4.7.1 in both version have the
same problem.

My cpu is AMD A10-7860K

This issue has been reported before ("[Xen-devel] "X86_PV_VCPU_MSRS record truncated" during domain restore").

I submitted patches to fix it ("Fix issues with zero-length records in migration v2" in July even), which made no progress. As the author of migration v2, and unfortunately of this bug, I stand by v1 of my fix without any further modification.

Quoted 7 lines

You can find the patches here:
https://xenbits.xen.org/gitweb/?p=people/andrewcoop/xen.git;a=shortlog;h=refs/heads/tools-fix-zero-length-records

Julien: As 4.9 RM, please mark this as a release blocker. It is very poor that we as a community had this reported and fixed 6 months ago, and yet it still didn't make it into 4.8

Sounds sensible. I will create an entry in the bug tracker.

Cheers,

Signature · 6 lines
Julien Grall

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
#8 lore raw
Quoted 24 lines · Julien Grall

(Adding Ian and Wei)

Hi Andrew,

Quoted 19 lines · Andrew Cooper
Quoted 5 lines · Ing. Ricardo Brisighelli

Hi, i'm gentoo user and try with xen 4.6.3 and 4.7.1 in both version have the
same problem.

My cpu is AMD A10-7860K

This issue has been reported before ("[Xen-devel] "X86_PV_VCPU_MSRS record truncated" during domain restore").

I submitted patches to fix it ("Fix issues with zero-length records in migration v2" in July even), which made no progress. As the author of migration v2, and unfortunately of this bug, I stand by v1 of my fix without any further modification.

You can find the patches here:
https://xenbits.xen.org/gitweb/?p=people/andrewcoop/xen.git;a=shortlog;h=refs/heads/tools-fix-zero-length-records

Quoted 6 lines
Quoted 3 lines

Julien: As 4.9 RM, please mark this as a release blocker. It is very poor that we as a community had this reported and fixed 6 months ago, and yet it still didn't make it into 4.8

Sounds sensible. I will create an entry in the bug tracker.

Ian made some comments on the old thread but Andrew didn't reply back.

We should resurrect the discussion there.

Wei.

Quoted 4 lines

Cheers,

Signature · 1 line
Julien Grall

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel

#9 lore raw
In reply to Andrew Cooper

create ^
severity it blocker
affects it 4.6, 4.7, 4.8

thanks

Quoted 24 lines · Andrew Cooper
Quoted 5 lines · Ing. Ricardo Brisighelli

Hi, i'm gentoo user and try with xen 4.6.3 and 4.7.1 in both version have the
same problem.

My cpu is AMD A10-7860K

This issue has been reported before ("[Xen-devel] "X86_PV_VCPU_MSRS record truncated" during domain restore").

I submitted patches to fix it ("Fix issues with zero-length records in migration v2" in July even), which made no progress. As the author of migration v2, and unfortunately of this bug, I stand by v1 of my fix without any further modification.

You can find the patches here:
https://xenbits.xen.org/gitweb/?p=people/andrewcoop/xen.git;a=shortlog;h=refs/heads/tools-fix-zero-length-records

Julien: As 4.9 RM, please mark this as a release blocker. It is very poor that we as a community had this reported and fixed 6 months ago, and yet it still didn't make it into 4.8

~Andrew

Signature · 6 lines
Julien Grall

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
#10 lore raw

Processed: Re: [xl restore and migrating problem - hardware compatibility]

Processing commands for [email protected]:

Quoted 1 line

create ^

Created new bug #56 rooted at `<[email protected]>'
Title: `Re: [Xen-devel] [xl restore and migrating problem - hardware compatibility]'

Quoted 1 line

severity it blocker

Change severity for #56 to `blocker'

Quoted 1 line

affects it 4.6, 4.7, 4.8

Bug #56 affects `4.6, 4.7, 4.8'
Command failed: Unable to find tag affects:4.6, 4.7, 4.8 at /srv/xen-devel-bugs/share/perl/5.14.2/Emesinae/Bug.pm line 127, <GEN1> line 3. Stop processing here.

Modified/created Bugs:
- 56: http://bugs.xenproject.org/xen/bug/56 (new)

---
Xen Hypervisor Bug Tracker
See http://wiki.xen.org/wiki/Reporting_Bugs_against_Xen for information on reporting bugs Contact [email protected] with any infrastructure issues

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel