8547e28bd5
23233-hvm-cr-access.patch 23234-svm-decode-assist-base.patch 23235-svm-decode-assist-crs.patch 23236-svm-decode-assist-invlpg.patch 23238-svm-decode-assist-insn-fetch.patch 23303-cpufreq-misc.patch 23304-amd-oprofile-strings.patch 23305-amd-fam15-xenoprof.patch 23306-amd-fam15-vpmu.patch 23334-amd-fam12+14-vpmu.patch 23338-vtd-force-intremap.patch - fate#310957 - Update to Xen 4.1.1-rc1 c/s 23064 - xentrace: dynamic tracebuffer allocation xen-unstable.xentrace.dynamic_tbuf.patch xen-unstable.xentrace.empty_t_info_pages.patch xen-unstable.xentrace.verbose.patch xen-unstable.xentrace.no_gdprintk.patch xen-unstable.xentrace.comments.patch xen-unstable.xentrace.printk_prefix.patch xen-unstable.xentrace.remove_debug_printk.patch xen-unstable.xentrace.t_info_pages-formula.patch xen-unstable.xentrace.register_cpu_notifier-boot_time.patch xen-unstable.xentrace.t_info_page-overflow.patch xen-unstable.xentrace.t_info_first_offset.patch xen-unstable.xentrace.data_size__read_mostly.patch xen-unstable.xentrace.__insert_record-dst-type.patch OBS-URL: https://build.opensuse.org/package/show/Virtualization/xen?expand=0&rev=124
98 lines
3.9 KiB
Diff
98 lines
3.9 KiB
Diff
Index: xen-4.1.1-testing/tools/python/xen/xend/XendAPI.py
|
|
===================================================================
|
|
--- xen-4.1.1-testing.orig/tools/python/xen/xend/XendAPI.py
|
|
+++ xen-4.1.1-testing/tools/python/xen/xend/XendAPI.py
|
|
@@ -1959,10 +1959,10 @@ class XendAPI(object):
|
|
bool(live), port, node, ssl, bool(chs))
|
|
return xen_api_success_void()
|
|
|
|
- def VM_save(self, _, vm_ref, dest, checkpoint):
|
|
+ def VM_save(self, _, vm_ref, dest, checkpoint, force):
|
|
xendom = XendDomain.instance()
|
|
xeninfo = xendom.get_vm_by_uuid(vm_ref)
|
|
- xendom.domain_save(xeninfo.getDomid(), dest, checkpoint)
|
|
+ xendom.domain_save(xeninfo.getDomid(), dest, checkpoint, force)
|
|
return xen_api_success_void()
|
|
|
|
def VM_restore(self, _, src, paused):
|
|
Index: xen-4.1.1-testing/tools/python/xen/xend/XendDomain.py
|
|
===================================================================
|
|
--- xen-4.1.1-testing.orig/tools/python/xen/xend/XendDomain.py
|
|
+++ xen-4.1.1-testing/tools/python/xen/xend/XendDomain.py
|
|
@@ -1505,7 +1505,7 @@ class XendDomain:
|
|
pass
|
|
sock.close()
|
|
|
|
- def domain_save(self, domid, dst, checkpoint=False):
|
|
+ def domain_save(self, domid, dst, checkpoint=False, force=False):
|
|
"""Start saving a domain to file.
|
|
|
|
@param domid: Domain ID or Name
|
|
@@ -1521,6 +1521,9 @@ class XendDomain:
|
|
if not dominfo:
|
|
raise XendInvalidDomain(str(domid))
|
|
|
|
+ if os.access(dst, os.F_OK) and not force:
|
|
+ raise XendError("Save file:%s exist!\n" % dst)
|
|
+
|
|
if dominfo.getDomid() == DOM0_ID:
|
|
raise XendError("Cannot save privileged domain %s" % str(domid))
|
|
if dominfo._stateGet() != DOM_STATE_RUNNING:
|
|
Index: xen-4.1.1-testing/tools/python/xen/xm/main.py
|
|
===================================================================
|
|
--- xen-4.1.1-testing.orig/tools/python/xen/xm/main.py
|
|
+++ xen-4.1.1-testing/tools/python/xen/xm/main.py
|
|
@@ -121,7 +121,7 @@ SUBCOMMAND_HELP = {
|
|
'reset' : ('<Domain>', 'Reset a domain.'),
|
|
'restore' : ('<CheckpointFile> [-p]',
|
|
'Restore a domain from a saved state.'),
|
|
- 'save' : ('[-c] <Domain> <CheckpointFile>',
|
|
+ 'save' : ('[-c|-f] <Domain> <CheckpointFile>',
|
|
'Save a domain state to restore later.'),
|
|
'shutdown' : ('<Domain> [-waRH]', 'Shutdown a domain.'),
|
|
'top' : ('', 'Monitor a host and the domains in real time.'),
|
|
@@ -342,6 +342,7 @@ SUBCOMMAND_OPTIONS = {
|
|
),
|
|
'save': (
|
|
('-c', '--checkpoint', 'Leave domain running after creating snapshot'),
|
|
+ ('-f', '--force', 'Force to overwrite exist file'),
|
|
),
|
|
'restore': (
|
|
('-p', '--paused', 'Do not unpause domain after restoring it'),
|
|
@@ -864,18 +865,21 @@ def xm_event_monitor(args):
|
|
|
|
def xm_save(args):
|
|
|
|
- arg_check(args, "save", 2, 3)
|
|
+ arg_check(args, "save", 2, 4)
|
|
|
|
try:
|
|
- (options, params) = getopt.gnu_getopt(args, 'c', ['checkpoint'])
|
|
+ (options, params) = getopt.gnu_getopt(args, 'cf', ['checkpoint', 'force'])
|
|
except getopt.GetoptError, opterr:
|
|
err(opterr)
|
|
usage('save')
|
|
|
|
checkpoint = False
|
|
+ force = False
|
|
for (k, v) in options:
|
|
if k in ['-c', '--checkpoint']:
|
|
checkpoint = True
|
|
+ if k in ['-f', '--force']:
|
|
+ force = True
|
|
|
|
if len(params) != 2:
|
|
err("Wrong number of parameters")
|
|
@@ -889,9 +893,9 @@ def xm_save(args):
|
|
sys.exit(1)
|
|
|
|
if serverType == SERVER_XEN_API:
|
|
- server.xenapi.VM.save(get_single_vm(dom), savefile, checkpoint)
|
|
+ server.xenapi.VM.save(get_single_vm(dom), savefile, checkpoint, force)
|
|
else:
|
|
- server.xend.domain.save(dom, savefile, checkpoint)
|
|
+ server.xend.domain.save(dom, savefile, checkpoint, force)
|
|
|
|
def xm_restore(args):
|
|
arg_check(args, "restore", 1, 2)
|