diff --git a/qubes/vm/qubesvm.py b/qubes/vm/qubesvm.py index 9b1261aff..2fe480a1a 100644 --- a/qubes/vm/qubesvm.py +++ b/qubes/vm/qubesvm.py @@ -1643,45 +1643,6 @@ def get_start_time(self): return None - def is_outdated(self): - '''Check whether domain needs restart to update root image from \ - template. - - :returns: :py:obj:`True` if is outdated, :py:obj:`False` otherwise. - :rtype: bool - ''' - # pylint: disable=no-member - - # Makes sense only on VM based on template - if self.template is None: - return False - - if not self.is_running(): - return False - - if not hasattr(self.template, 'rootcow_img'): - return False - - rootimg_inode = os.stat(self.template.root_img) - try: - rootcow_inode = os.stat(self.template.rootcow_img) - except OSError: - # The only case when rootcow_img doesn't exists is in the middle of - # commit_changes, so VM is outdated right now - return True - - current_dmdev = "/dev/mapper/snapshot-{0:x}:{1}-{2:x}:{3}".format( - rootimg_inode[2], rootimg_inode[1], - rootcow_inode[2], rootcow_inode[1]) - - # FIXME - # 51712 (0xCA00) is xvda - # backend node name not available through xenapi :( - used_dmdev = self.app.vmm.xs.read('', - '/local/domain/0/backend/vbd/{}/51712/node'.format(self.xid)) - - return used_dmdev != current_dmdev - # # helper methods # diff --git a/qubes/vm/templatevm.py b/qubes/vm/templatevm.py index 89128ba36..7c4d62bbe 100644 --- a/qubes/vm/templatevm.py +++ b/qubes/vm/templatevm.py @@ -99,13 +99,3 @@ def __init__(self, *args, **kwargs): } } super(TemplateVM, self).__init__(*args, **kwargs) - - def commit_changes(self): - '''Commit changes to template''' - self.log.debug('commit_changes()') - - if not self.app.vmm.offline_mode: - assert not self.is_running(), \ - 'Attempt to commit changes on running Template VM!' - - self.storage.commit()