diff --git a/lib/backend.py b/lib/backend.py index 68cfe52809fcde338de744203f729bbbf0617b51..b993f9d5c0c9df5d505060293b052a40c4d8de76 100644 --- a/lib/backend.py +++ b/lib/backend.py @@ -530,8 +530,9 @@ def AddOSToInstance(instance, os_disk, swap_disk): inst_os.path, create_script, instance.name, real_os_dev.dev_path, real_swap_dev.dev_path, logfile) + env = {'HYPERVISOR': ssconf.SimpleStore().GetHypervisorType()} - result = utils.RunCmd(command) + result = utils.RunCmd(command, env=env) if result.failed: logging.error("os create command '%s' returned error: %s, logfile: %s," " output: %s", command, result.fail_reason, logfile, @@ -1486,8 +1487,9 @@ def ImportOSIntoInstance(instance, os_disk, swap_disk, src_node, src_image): logfile) command = '|'.join([utils.ShellQuoteArgs(remotecmd), comprcmd, impcmd]) + env = {'HYPERVISOR': ssconf.SimpleStore().GetHypervisorType()} - result = utils.RunCmd(command) + result = utils.RunCmd(command, env=env) if result.failed: logging.error("os import command '%s' returned error: %s"