• Home
  • Raw
  • Download

Lines Matching full:vm

44     Preprocess a single VM object according to the instructions in params.
45 Start the VM if requested and get a screendump.
48 @param params: A dict containing VM preprocessing parameters.
50 @param name: The name of the VM object.
52 logging.debug("Preprocessing VM '%s'", name)
53 vm = env.get_vm(name)
54 if not vm:
55 logging.debug("VM object for '%s' does not exist, creating it", name)
58 vm = kvm_vm.VM(name, params, test.bindir, env.get("address_cache"))
59 env.register_vm(name, vm)
64 logging.debug("Param 'restart_vm' specified, (re)starting VM")
67 logging.debug("Param 'migration_mode' specified, starting VM in "
71 if not vm.is_alive():
72 logging.debug("VM is not alive, starting it")
74 if vm.needs_restart(name=name, params=params, basedir=test.bindir):
75 logging.debug("Current VM specs differ from requested one; "
80 # Start the VM (or restart it if it's already up)
81 vm.create(name, params, test.bindir,
84 # Don't start the VM, just update its params
85 vm.params = params
89 if vm.monitor and params.get("take_regular_screendumps") == "yes":
90 vm.monitor.screendump(scrdump_filename, debug=False)
110 Postprocess a single VM object according to the instructions in params.
111 Kill the VM if requested and get a screendump.
114 @param params: A dict containing VM postprocessing parameters.
116 @param name: The name of the VM object.
118 logging.debug("Postprocessing VM '%s'" % name)
119 vm = env.get_vm(name)
120 if not vm:
125 if vm.monitor and params.get("take_regular_screenshots") == "yes":
126 vm.monitor.screendump(scrdump_filename, debug=False)
133 logging.debug("Param 'kill_vm' specified, waiting for VM to shut "
135 virt_utils.wait_for(vm.is_dead, kill_vm_timeout, 0, 1)
137 logging.debug("Param 'kill_vm' specified, killing VM")
138 vm.destroy(gracefully = params.get("kill_vm_gracefully") == "yes")
147 @param params: A dict containing all VM and image parameters.
169 Call image_func for each image listed in params and vm_func for each VM.
172 @param params: A dict containing all VM and image parameters.
175 @param vm_func: A function to call for each VM.
181 # Get list of images specified for this VM
186 # Call vm_func for each vm
203 @param params: A dict containing all VM and image parameters.
231 vm = env[key]
232 if not virt_utils.is_vm(vm):
234 if not vm.name in requested_vms:
235 logging.debug("VM '%s' found in environment but not required for "
236 "test, destroying it" % vm.name)
237 vm.destroy()
293 @param params: Dict containing all VM and image parameters.
346 for vm in env.get_all_vms():
347 if vm.is_alive():
349 session = vm.login()
353 vm.destroy(gracefully=False)
359 living_vms = [vm for vm in env.get_all_vms() if vm.is_alive()]
380 @param params: A dict containing all VM and image parameters.
421 for vm in env.get_all_vms():
422 if not vm.is_alive():
425 vm.monitor.screendump(filename=temp_filename, debug=False)
432 logging.warning("VM '%s' failed to produce a screendump", vm.name)
435 logging.warning("VM '%s' produced an invalid screendump", vm.name)
439 "screendumps_%s" % vm.name)
445 "%s_%s.jpg" % (vm.name,