Index: root/xen-unstable.hg/tools/python/xen/xend/XendDomainInfo.py =================================================================== --- root.orig/xen-unstable.hg/tools/python/xen/xend/XendDomainInfo.py +++ root/xen-unstable.hg/tools/python/xen/xend/XendDomainInfo.py @@ -956,6 +956,7 @@ class XendDomainInfo: def shutdown(self, reason): + self.unsupportedOnHVM("shutdown") if not reason in shutdown_reasons.values(): raise XendError('Invalid reason: %s' % reason) if self.domid == 0: @@ -1084,6 +1085,15 @@ class XendDomainInfo: ## private: + def unsupportedOnHVM(self, cmd): + if self.info['image'][0] == "hvm": + if cmd == "shutdown": + raise XendError("No graceful shutdown on HVM. Use " + "'destroy' instead.") + elif cmd == "save": + raise XendError("Cannot save/migrate an HVM domain, yet") + + def createDevice(self, deviceClass, devconfig): return self.getDeviceController(deviceClass).createDevice(devconfig) Index: root/xen-unstable.hg/tools/python/xen/xend/XendCheckpoint.py =================================================================== --- root.orig/xen-unstable.hg/tools/python/xen/xend/XendCheckpoint.py +++ root/xen-unstable.hg/tools/python/xen/xend/XendCheckpoint.py @@ -23,6 +23,7 @@ from XendError import XendError from XendLogging import log from XendDomainInfo import DEV_MIGRATE_STEP1, DEV_MIGRATE_STEP2 from XendDomainInfo import DEV_MIGRATE_STEP3 +from XendDomainInfo import XendDomainInfo SIGNATURE = "LinuxGuestRecord" XC_SAVE = "xc_save" @@ -55,6 +56,7 @@ def read_exact(fd, size, errmsg): def save(fd, dominfo, network, live, dst): + dominfo.unsupportedOnHVM("save") write_exact(fd, SIGNATURE, "could not write guest state file: signature") config = sxp.to_string(dominfo.sxpr())