[xenpreview-dev] Problems with save / restore of domUs

tobias.mucke at man.eu tobias.mucke at man.eu
Tue Mar 13 00:22:00 MDT 2007


Hi everybody,

at the weekend I updated our test Xen cluster to XTP changeset 13138.
Everything worked fine so far. Xen cluster is running, domUs are running.

Today I wanted to test domU migration. But I have strange problems to save
/ restore / migrate domUs.

Here is the command line I use, and the corresponding log.

# xm create /srv/xen/domains/nxxen903/nxxen903
Using config file "/srv/xen/domains/nxxen903/nxxen903".
Warning: The bootentry option is deprecated.  Use bootargs and pass
--entry= directly.
Started domain nxxen903
# xm list
Name                                      ID   Mem VCPUs      State
Time(s)
Domain-0                                   0   385     2     r-----
220.0
nxxen903                                   8   256     1     -b----
0.9
# xm save nxxen903 /tmp/nxxen903.sav
Error: /usr/lib/xen/bin/xc_save 22 8 0 0 0 failed
Usage: xm save <Domain> <CheckpointFile>

Save a domain state to restore later.
# xm list
Name                                      ID   Mem VCPUs      State
Time(s)
Domain-0                                   0   385     2     r-----
223.3
nxxen903                                   8   256     1     ---s--
6.4
#  tail -f -n 100 /var/log/xend.log
[2007-03-12 11:15:13 xend 19723] DEBUG (XendCheckpoint:80) [xc_save]:
/usr/lib/xen/bin/xc_save 22 8 0 0 0
[2007-03-12 11:15:13 xend 19723] DEBUG (XendCheckpoint:218) suspend
[2007-03-12 11:15:13 xend 19723] DEBUG (XendCheckpoint:83) In
saveInputHandler suspend
[2007-03-12 11:15:13 xend.XendDomainInfo 19723] DEBUG (XendDomainInfo:752)
Storing domain details: {'console/ring-ref': '360990', 'console/port': '2',
'name': 'migrating-nxxen903', 'console/limit': '2097152', 'vm':
'/vm/55ca1ca6-f9df-0350-6316-863ff4ebd4f0', 'domid': '8',
'cpu/0/availability': 'online', 'memory/target': '262144',
'store/ring-ref': '360991', 'store/port': '1'}
[2007-03-12 11:15:13 xend 19723] DEBUG (XendCheckpoint:85) Suspending 8 ...
[2007-03-12 11:15:13 xend.XendDomainInfo 19723] DEBUG (XendDomainInfo:421)
XendDomainInfo.shutdown
[2007-03-12 11:15:13 xend.XendDomainInfo 19723] DEBUG (XendDomainInfo:819)
XendDomainInfo.handleShutdownWatch
[2007-03-12 11:15:13 xend.XendDomainInfo 19723] DEBUG (XendDomainInfo:819)
XendDomainInfo.handleShutdownWatch
[2007-03-12 11:15:13 xend 19723] INFO (XendCheckpoint:90) Domain 8
suspended.
[2007-03-12 11:15:13 xend 19723] DEBUG (XendCheckpoint:95) Written done
[2007-03-12 11:15:13 xend.XendDomainInfo 19723] INFO (XendDomainInfo:990)
Domain has shutdown: name=migrating-nxxen903 id=8 reason=suspend.
[2007-03-12 11:15:13 xend 19723] ERROR (XendCheckpoint:111) Save failed on
domain nxxen903 (8).
Traceback (most recent call last):
  File "/usr/lib/python2.4/site-packages/xen/xend/XendCheckpoint.py", line
97, in save
    forkHelper(cmd, fd, saveInputHandler, False)
  File "/usr/lib/python2.4/site-packages/xen/xend/XendCheckpoint.py", line
235, in forkHelper
    raise XendError("%s failed" % string.join(cmd))
XendError: /usr/lib/xen/bin/xc_save 22 8 0 0 0 failed
# ll /tmp/nxxen903.sav
-rwx------ 1 root root 978 Mar 12 11:15 /tmp/nxxen903.sav
#

# xm restore /tmp/nxxen903.sav
Error: Restore failed
Usage: xm restore <CheckpointFile> [-p]

Restore a domain from a saved state.
  -p, --paused                   Do not unpause domain after restoring it

# tail -f -n 100 /var/log/xend.log
[2007-03-12 11:37:33 xend.XendDomainInfo 19723] DEBUG (XendDomainInfo:203)
XendDomainInfo.restore(['domain', ['domid', '8'], ['on_crash', 'restart'],
['memory', '256'], ['uuid', '55ca1ca6-f9df-0350-6316-863ff4ebd4f0'],
['bootloader_args',
'--entry=hda1:/boot/vmlinuz-xenpae,/boot/initrd-xenpae'], ['name',
'nxxen903'], ['maxmem', '256'], ['on_reboot', 'restart'], ['on_poweroff',
'destroy'], ['localtime', '0'], ['vcpus', '1'], ['bootloader',
'/usr/lib/xen/boot/domUloader.py'], ['shadow_memory', '0'], ['vcpu_avail',
'1'], ['cpu_weight', '256'], ['cpu_cap', '0'], ['features'],
['on_xend_start', 'ignore'], ['on_xend_stop', 'ignore'], ['start_time',
'1173694465.4'], ['cpu_time', '6.358671222'], ['online_vcpus', '1'],
['image', ['linux', ['kernel', '/var/lib/xen/tmp/kernel.r5gdVQ'],
['ramdisk', '/var/lib/xen/tmp/ramdisk.MxKkEB']]], ['status', '2'],
['memory_dynamic_min', '256'], ['memory_dynamic_max', '256'], ['state',
'-b----'], ['store_mfn', '360991'], ['console_mfn', '360990'], ['device',
['vif', ['mac', '00:16:3e:00:00:03'], ['script', 'vif-bridge'], ['uuid',
'5815fb74-8c05-9166-d322-8790394f8d97'], ['backend', '0']]], ['device',
['vbd', ['uname', 'phy:/dev/vg_xen/lv_nxxen903_root'], ['uuid',
'4ef7c37f-6fdc-031e-fa5d-3da6ea2801b8'], ['mode', 'w'], ['dev',
'hda:disk'], ['backend', '0']]]])
[2007-03-12 11:37:33 xend.XendConfig 19723] WARNING (XendConfig:606)
Unconverted key: cpus
[2007-03-12 11:37:33 xend.XendDomainInfo 19723] DEBUG (XendDomainInfo:1307)
XendDomainInfo.constructDomain
[2007-03-12 11:37:33 xend.XendDomainInfo 19723] DEBUG (XendDomainInfo:1741)
Storing VM details: {'on_xend_stop': 'ignore', 'shadow_memory': '0',
'uuid': '55ca1ca6-f9df-0350-6316-863ff4ebd4f0', 'name': 'nxxen903',
'on_reboot': 'restart', 'start_time': '1173694465.4', 'on_poweroff':
'destroy', 'on_xend_start': 'ignore', 'on_crash': 'restart', 'vcpus': '1',
'vcpu_avail': '1', 'memory': '256', 'image': '(linux (kernel
/var/lib/xen/tmp/kernel.r5gdVQ) (ramdisk
/var/lib/xen/tmp/ramdisk.MxKkEB))', 'maxmem': '256'}
[2007-03-12 11:37:33 xend.XendDomainInfo 19723] INFO (XendDomainInfo:1217)
createDevice: vbd : {'uuid': '4ef7c37f-6fdc-031e-fa5d-3da6ea2801b8',
'driver': 'paravirtualised', 'dev': 'hda:disk', 'uname':
'phy:/dev/vg_xen/lv_nxxen903_root', 'mode': 'w', 'backend': '0'}
[2007-03-12 11:37:33 xend 19723] DEBUG (DevController:115) DevController:
writing {'backend-id': '0', 'virtual-device': '768', 'device-type': 'disk',
'state': '1', 'backend': '/local/domain/0/backend/vbd/9/768'} to
/local/domain/9/device/vbd/768.
[2007-03-12 11:37:33 xend 19723] DEBUG (DevController:117) DevController:
writing {'domain': 'nxxen903', 'frontend':
'/local/domain/9/device/vbd/768', 'uuid':
'4ef7c37f-6fdc-031e-fa5d-3da6ea2801b8', 'dev': 'hda', 'state': '1',
'params': '/dev/vg_xen/lv_nxxen903_root', 'mode': 'w', 'online': '1',
'frontend-id': '9', 'type': 'phy'} to /local/domain/0/backend/vbd/9/768.
[2007-03-12 11:37:33 xend.XendDomainInfo 19723] INFO (XendDomainInfo:1217)
createDevice: vif : {'mac': '00:16:3e:00:00:03', 'script': 'vif-bridge',
'uuid': '5815fb74-8c05-9166-d322-8790394f8d97', 'backend': '0'}
[2007-03-12 11:37:33 xend 19723] DEBUG (DevController:115) DevController:
writing {'backend-id': '0', 'mac': '00:16:3e:00:00:03', 'handle': '0',
'state': '1', 'backend': '/local/domain/0/backend/vif/9/0'} to
/local/domain/9/device/vif/0.
[2007-03-12 11:37:33 xend 19723] DEBUG (DevController:117) DevController:
writing {'domain': 'nxxen903', 'handle': '0', 'uuid':
'5815fb74-8c05-9166-d322-8790394f8d97', 'script':
'/etc/xen/scripts/vif-bridge', 'state': '1', 'frontend':
'/local/domain/9/device/vif/0', 'mac': '00:16:3e:00:00:03', 'online': '1',
'frontend-id': '9'} to /local/domain/0/backend/vif/9/0.
[2007-03-12 11:37:33 xend.XendDomainInfo 19723] DEBUG (XendDomainInfo:752)
Storing domain details: {'console/port': '2', 'name': 'nxxen903',
'console/limit': '2097152', 'vm':
'/vm/55ca1ca6-f9df-0350-6316-863ff4ebd4f0', 'domid': '9',
'cpu/0/availability': 'online', 'memory/target': '262144', 'store/port':
'1'}
[2007-03-12 11:37:33 xend 19723] DEBUG (XendDomain:428) Adding Domain: 9
[2007-03-12 11:37:33 xend 19723] ERROR (XendCheckpoint:46) read_exact: EOF
trying to read 4 (buf='')
[2007-03-12 11:37:33 xend.XendDomainInfo 19723] DEBUG (XendDomainInfo:1506)
XendDomainInfo.destroy: domid=9
[2007-03-12 11:37:33 xend.XendDomainInfo 19723] DEBUG (XendDomainInfo:1514)
XendDomainInfo.destroyDomain(9)
[2007-03-12 11:37:33 xend 19723] ERROR (XendDomain:1003) Restore failed
Traceback (most recent call last):
  File "/usr/lib/python2.4/site-packages/xen/xend/XendDomain.py", line 998,
in domain_restore_fd
    return XendCheckpoint.restore(self, fd, paused=paused)
  File "/usr/lib/python2.4/site-packages/xen/xend/XendCheckpoint.py", line
152, in restore
    "not a valid guest state file: pfn count read")
  File "/usr/lib/python2.4/site-packages/xen/xend/XendCheckpoint.py", line
48, in read_exact
    raise XendError(errmsg)
XendError: not a valid guest state file: pfn count read

I have already searched in the internet for any hints, found a lot of
people having problems with save / restore, but always with older
changesets of Xen.

Any ideas?

Thanks.

Tobias


********************************************

MAN IT Services GmbH
Sitz der Gesellschaft: München 
Registergericht: Amtsgericht München, HRB 158 140 
Geschäftsführung: Dr. Mathias Kretzschmar (Vorsitzender),  Erwin Eicher 

This e-mail (including any attachments) is confidential and may be privileged. 
If you have received it by mistake, please notify the sender by e-mail and delete this message from your system. 
Any unauthorised use or dissemination of this e-mail in whole or in part is strictly prohibited. 
Please note that e-mails are susceptible to change. 
MAN IT Services GmbH (including its group companies) shall not be liable for the improper or incomplete transmission of the information contained in this communication nor for any delay in its receipt.
MAN IT Services GmbH (or its group companies) does not guarantee that the integrity of this communication has been maintained nor that this communication is free of viruses, interceptions or interference. 

******************************************** 


More information about the xenpreview-dev mailing list