dispvm: display warning if the template is running (#754)
Opening a DispVM when the TemplateVM is running forces savefile regeneration. Checking real root.img modification time (taking into account root-cow.img) is tricky, so display a warning instead.
This commit is contained in:
		
							parent
							
								
									242590902a
								
							
						
					
					
						commit
						8be54ab174
					
				| @ -125,6 +125,9 @@ class QfileDaemonDvm: | |||||||
|         dvm_mtime = os.stat(current_savefile).st_mtime |         dvm_mtime = os.stat(current_savefile).st_mtime | ||||||
|         root_mtime = os.stat(dvmdata_dir+'savefile-root').st_mtime |         root_mtime = os.stat(dvmdata_dir+'savefile-root').st_mtime | ||||||
|         if dvm_mtime < root_mtime: |         if dvm_mtime < root_mtime: | ||||||
|  |             template_name = os.path.basename(os.path.dirname(os.readlink(dvmdata_dir+'savefile-root'))) | ||||||
|  |             if subprocess.call(["xl", "domid", template_name]) == 0: | ||||||
|  |                 self.tray_notify("For optimum performance, you should not start DispVM when its template is running.") | ||||||
|             return False        |             return False        | ||||||
|         return True |         return True | ||||||
| 
 | 
 | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 Marek Marczykowski-Górecki
						Marek Marczykowski-Górecki