[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH] Fix xm restore command


I found minor bugs in xm restore command. 

1) When I gave a wrong check point file, a return code of command was 0. 

# touch /tmp/dummy
# xm restore /tmp/dummy
Error: not a valid guest state file: signature read
# echo $?

2) When Xend had been stopping, I saw the following traceback message. 

# xend stop
# xm restore /xen/save.vm1 
Unexpected error: exceptions.AttributeError

Please report to xen-devel@xxxxxxxxxxxxxxxxxxx
Traceback (most recent call last):
  File "/usr/sbin/xm", line 10, in ?
  File "/usr/lib/python/xen/xm/main.py", line 2531, in main
    _, rc = _run_cmd(cmd, cmd_name, args)
  File "/usr/lib/python/xen/xm/main.py", line 2555, in _run_cmd
    return True, cmd(args)
  File "/usr/lib/python/xen/xm/main.py", line 747, in xm_restore
    err("%s" % ex.faultString)
AttributeError: error instance has no attribute 'faultString'

This patch fixes the bugs.  Test results are as follows. 

# touch /tmp/dummy
# xm restore /tmp/dummy
Error: not a valid guest state file: signature read
Usage: xm restore <CheckpointFile> [-p]

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

# echo $?
# xend stop
# xm restore /xen/save.vm1
Error: Unable to connect to xend: Connection refused. Is xend running?

Signed-off-by: Masaki Kanno <kanno.masaki@xxxxxxxxxxxxxx>

Best regards,

Attachment: xm_restore.patch
Description: Binary data

Xen-devel mailing list



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.