xm save workaround
Hi all,
This is something I posted earlier on Xen-Users. I understand it is a known problem so you may be interested in this workaround.
cheers,
John
Hi John-
Thanks a lot, that did the trick. Have you sent this to the Xen-Devel list? If not, I bet they would be interested.
Anyway, thanks again!
-Patrick
Quoted 109 lines · John Croft
Quoted 107 lines
Hi Patrick,
I'm wondering if this is related to the problem I had and posted on the xen-users list with a work-around. The symptoms are similar in that
xm_savefails but the debug output is slightly different, but that may be due to environmental differences.original post follows.
JohnHi all,
Just installed Xen from the base FC5 released on Monday.
It all seems to work great except for "xm save/migrate" which fails with "Unable to get platform info.: 9" at XendCheckpoint:227.
Playing around with it I found that there is a program called
xc_savewhich is called fromXendCheckpoint.pyand passed in a file handle for the xend session and the target file named on the command line. These handles seem to be closed whenxc_saveexec's, so subsequent calls into Xen byxc_savefail. I got it to work by adding...from fcntl import ioctl; FIONCLEX = 0x5450near the top of
XendCheckpoint.pyand...
ioctl (fd, FIONCLEX, 0)
ioctl (xc.handle(), FIONCLEX, 0)at the beginning of forkHelper.
I'm presuming that there are people in the world that this program works for!!! So am I missing a python config item somewhere? Or what am I doing wrong that I need this incantation ?
thanks
JohnQuoted 57 lines · Patrick Kaeding
Quoted 57 lines
Jamie-
I hope you don't mind that I am copying the Xen-Users mailing list on this, in the hope others will see it also.
Yes, I am still having this problem. I believe it is caused by a bug somewhere in the Xen code, which breaks the save functionality. This then means the live migration also doesn't work, since that depends on save.
I believe the developers are aware of this problem, and are working on a solution, but maybe someone else can shed more light on the current situation.
Thanks,
PatrickQuoted 20 lines · jamie chapman
Quoted 20 lines
Hello Mr Kaeding, how are you.
After reading the XenSource mailing list, i at long last came across someone that had the same problem as myself.
I am relatively new to the game so plaese excuse me if i seem foolish.
I am running 2 Xeon Dual Core, with 1 Gig of RAM. Using SuSE 10.0 and Xen 3.0(8259) installed and seems to work fine, creating, destroying domains. The problem is when i try to save the guest domain using, xm save guestName guest.chk
It returns with
/usr/lib/xen/bin/xc_save11 17 1 0 0 0 failedThe addition to xend.log after i call xm save is
(XendCheckpoint:227) Couldnt map p2m_frame_list_list (errno14): 14 (XendCheckpoint:227) Save xeit rc=1 (XendCheckpoint:227) Save failed on domain guest (18).Quoted 6 lines
Quoted 6 lines
Any info from you would be greatly appreciated.
Thanks a lot, Jamie..
_______________________________________________
Xen-users mailing list
[email protected]
http://lists.xensource.com/xen-users
Quoted 11 lines · John Croft
Hi all,
This is something I posted earlier on Xen-Users. I understand it is a known problem so you may be interested in this workaround.
cheers,
JohnHi John-
Quoted 43 lines
Thanks a lot, that did the trick. Have you sent this to the Xen-Devel list? If not, I bet they would be interested.
Anyway, thanks again!
-Patrick
Quoted 34 lines · John Croft
Quoted 34 lines
Hi Patrick,
I'm wondering if this is related to the problem I had and posted on the xen-users list with a work-around. The symptoms are similar in that
xm_savefails but the debug output is slightly different, but that may be due to environmental differences.original post follows.
JohnHi all,
Just installed Xen from the base FC5 released on Monday.
It all seems to work great except for "xm save/migrate" which fails with "Unable to get platform info.: 9" at XendCheckpoint:227.
Playing around with it I found that there is a program called
xc_savewhich is called fromXendCheckpoint.pyand passed in a file handle for the xend session and the target file named on the command line. These handles seem to be closed whenxc_saveexec's, so subsequent calls into Xen byxc_savefail. I got it to work by adding...from fcntl import ioctl;
FIONCLEX =0x5450near the top of
XendCheckpoint.pyand...
ioctl (fd, FIONCLEX, 0)
ioctl (xc.handle(), FIONCLEX, 0)at the beginning of forkHelper.
This is clearing the close-on-exec flag for each of the file descriptors, so
import fcntl
...fcntl.fcntl(fd, fcntl.F_SETFD, 0)fcntl.fcntl(xc.handle(), fcntl.F_SETFD, 0)
ought to do exactly the same, but be a little neater.
What interests me though, is that these flags are set in the first place. The default is for this flag to be unset, and Xend is not setting the flag explicitly on either of those file descriptors, so how did they get set?
Could you investigate?
Thanks,
Ewan.
Calling xc_interface_open returns a file descriptor which has had it's close-on-exec flag set.
Disassembling the code in xc_interface_open in libxenctrl.so as shipped in the FC5 release has two calls to fcntl just after the open.. GET_FD, the flags, or in 1 and then SET_FD . This isn't in the xc_misc.c in the repository, so I don't know how it's getting there.
John
Quoted 82 lines · Ewan Mellor
Quoted 10 lines · John Croft
Hi all,
This is something I posted earlier on Xen-Users. I understand it is a known problem so you may be interested in this workaround.
cheers,
JohnHi John-
Quoted 47 lines
Thanks a lot, that did the trick. Have you sent this to the Xen-Devel list? If not, I bet they would be interested.
Anyway, thanks again!
-Patrick
Quoted 36 lines · John Croft
Quoted 36 lines
Hi Patrick,
I'm wondering if this is related to the problem I had and posted on the xen-users list with a work-around. The symptoms are similar in that
xm_savefails but the debug output is slightly different, but that may be due to environmental differences.original post follows.
JohnHi all,
Just installed Xen from the base FC5 released on Monday.
It all seems to work great except for "xm save/migrate" which fails with "Unable to get platform info.: 9" at XendCheckpoint:227.
Playing around with it I found that there is a program called
xc_savewhich is called fromXendCheckpoint.pyand passed in a file handle for the xend session and the target file named on the command line. These handles seem to be closed whenxc_saveexec's, so subsequent calls into Xen byxc_savefail. I got it to work by adding...from fcntl import ioctl;
FIONCLEX =0x5450near the top of
XendCheckpoint.pyand...
ioctl (fd, FIONCLEX, 0)
ioctl (xc.handle(), FIONCLEX, 0)at the beginning of forkHelper.
This is clearing the close-on-exec flag for each of the file descriptors, so
import fcntl
...fcntl.fcntl(fd, fcntl.F_SETFD, 0)fcntl.fcntl(xc.handle(), fcntl.F_SETFD, 0)ought to do exactly the same, but be a little neater.
What interests me though, is that these flags are set in the first place. The default is for this flag to be unset, and Xend is not setting the flag explicitly on either of those file descriptors, so how did they get set?
Could you investigate?
Thanks,
Ewan.
found it !
xen-3.0.1-cloexec.patch in the source RPM for xen-3.0.1
John
Quoted 95 lines · John Croft
Calling
xc_interface_openreturns a file descriptor which has had it's close-on-exec flag set.Disassembling the code in
xc_interface_openin libxenctrl.so as shipped in the FC5 release has two calls to fcntl just after the open..GET_FD, the flags, or in 1 and thenSET_FD. This isn't in thexc_misc.cin the repository, so I don't know how it's getting there.John
Quoted 75 lines · Ewan Mellor
Quoted 10 lines · John Croft
Hi all,
This is something I posted earlier on Xen-Users. I understand it is a known problem so you may be interested in this workaround.
cheers,
JohnHi John-
Quoted 47 lines
Thanks a lot, that did the trick. Have you sent this to the Xen-Devel list? If not, I bet they would be interested.
Anyway, thanks again!
-Patrick
Quoted 36 lines · John Croft
Quoted 35 lines
Hi Patrick,
I'm wondering if this is related to the problem I had and posted on the xen-users list with a work-around. The symptoms are similar in that
xm_savefails but the debug output is slightly different, but that may be due to environmental differences.original post follows.
JohnHi all,
Just installed Xen from the base FC5 released on Monday.
It all seems to work great except for "xm save/migrate" which fails with "Unable to get platform info.: 9" at XendCheckpoint:227.
Playing around with it I found that there is a program called
xc_savewhich is called fromXendCheckpoint.pyand passed in a file handle for the xend session and the target file named on the command line. These handles seem to be closed whenxc_saveexec's, so subsequent calls into Xen byxc_savefail. I got it to work by adding...from fcntl import ioctl;
FIONCLEX =0x5450near the top of
XendCheckpoint.pyand...
ioctl (fd, FIONCLEX, 0)
ioctl (xc.handle(), FIONCLEX, 0)at the beginning of forkHelper.
This is clearing the close-on-exec flag for each of the file descriptors, so
import fcntl
...fcntl.fcntl(fd, fcntl.F_SETFD, 0)fcntl.fcntl(xc.handle(), fcntl.F_SETFD, 0)ought to do exactly the same, but be a little neater.
What interests me though, is that these flags are set in the first place. The default is for this flag to be unset, and Xend is not setting the flag explicitly on either of those file descriptors, so how did they get set?
Quoted 7 lines
Could you investigate?
Thanks,
Ewan.
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel
Quoted 3 lines · John Croft
found it !
xen-3.0.1-cloexec.patch in the source RPM for xen-3.0.1
You're right -- this seems to be a bug that Redhat have introduced, and has never been in the upstream Xen repository. You'll have to file it with them.
Cheers,
Ewan.