Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am trying to get work offline migration using libvirt API in perl. I have 2 servers (on both is):
- debian squeeze
- xen-hypervisor-4.0-i386
- libvirt (1st server - 0.8.7 and 2nd server - 0.8.3)
In xend-config.sxp on both servers I set up:
- (xend-relocation-server yes)
- (xend-relocation-port 8002)
- (xend-relocation-address '')
I have also 3rd server from where I am running this script:

 use Sys::Virt;

 my $vmm1 = Sys::Virt->new( uri=> "xen://hostA/" );
 my $vmm2 = Sys::Virt->new( uri=> "xen://hostB/" );

 my $dom = $vmm1->get_domain_by_name("test1");

 my $ddom = $dom->migrate($vmm2,0,undef,"xenmigr://hostB/",0);

When I run script I see on hostA after executing xm list:

migrating-test1                            17   128     1     ---s--      9.9

and on hostB I can see in 'xm list' output that migrating domain test1, but it disappear after while from that output because perl script will fail with following error:

libvirt error code: 42, message: Domain not found: xenUnifiedDomainLookupByName

I tried to look up for some solutions, but I wasn't successful. I also tried to run 'xm migrate' from hostA to migrate domain to hostB, but this operation also started but didn't complete (under complete I understand that domain will be migrated from hostA to hostB and stay running on hostB).

EDIT: Do I need shared storage also for offline migration?

share|improve this question
up vote 0 down vote accepted

I found how it works few days after posting this question.

To make offline and also live migration shared storage is needed. So it doesn't matter whether offline or live migration is running, for both types shared storage is needed (e.g. NFS,...).

That libvirt error code 42 was caused by doing offline migration without using shared storage. The script tried to migrate domain from hostA to hostB, but script was not able to find that domain on hostB (offline migration failed due to not using shared storage) because there was no migrated domain on hostB from hostA.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.