Xen Project Q&A Forum: First Line Help for Simple Questions
This is your chance to ask questions and provide answers about basic use of the Xen Project software. For debugging problems and for more complex issues, consider using the xen-users mailing list instead. You can find information about xen-users under "HELP | Mailing Lists" in the navigation bar above.
Googling didn't really help. What could be the problem?
jn332@machine1:~$ sudo xl migrate ubuntu junaid@localhost
xc: error: Could not obtain handle on privileged command interface (13 = Permission denied): Internal error
libxl: error: libxl.c:92:libxl_ctx_alloc: cannot open libxc handle: Permission denied
cannot init xl context
libxl: error: libxl_utils.c:396:libxl_read_exactly: file/stream truncated reading banner from migration receiver stream
libxl: info: libxl_exec.c:118:libxl_report_child_exitstatus: migration target process  exited with error status 1
There wasn't really any resources on this error for some reason, even though it should be fairly common given what I now know about it. However I found out that essentially the new migrate command essentially just sshs to the target machine and runs the command "xl migrate-receive". Now, the issue is as with any xl command, it requires sudo priveledges. So when you try to migrate with a normal user such as myusername@localhost, its like just typing in "xl migrate-receive" without the sudo.
So you have to login as root if you want to migrate, such as root@localhost. However, my root password wasn't working when I tried this even though I set up a root password.
This is because it turns out ssh disables the ability to login as root through ssh. Here is the solution:
I pasted the essence of it below in case the link ever goes down:
Enable root login over SSH:
As root, edit the sshd_config file in /etc/ssh/sshd_config:
Add a line in the Authentication section of the file that says PermitRootLogin yes. This line may already exist and be commented out with a "#". In this case, remove the "#".
Save the updated /etc/ssh/sshd_config file.
Restart the SSH server (ADDED: Or just restart computer):
service sshd restart
You can now connect to the conversion server as root over SSH.
The last service sshd restart command didn't work for me I just restarted my computer instead as I added above.
Anyway, with that command set, using migrate with root@otherserver now works!
Accepted Answer0It sounds like a misconfiguration somewhere.
Have you checked out this page to see if it helps:
Particularly note the shared storage (or NBD) requirement.
Then try this:
Login to Domain 0 as root. Try the command (without the sudo). If it does not work, please give us the exact error messages (if they are different than the ones you listed above).
Accepted Answer0Okay, I missed the part of trying to migrate to the same host. Other than a user exercise, why would you need to do that? Frankly, it wouldn't surprise me if migration within a single host has problems, since I can't think of a reason why one would do so, and it is very possible it wasn't designed (or tested) with that capability in mind.
I still believe the key is in the privs, and running in Dom0 as root (either via login or sudo) could remedy the problem.
Please let us know what happens once you get the root access problem sorted out.