diff --git a/lib/hypervisor/hv_kvm.py b/lib/hypervisor/hv_kvm.py
index 964fe9c03674d0efc33498b4a8fa162dc09525c0..23ad5ce0b08d9a0b8c006779e10dda45fc315b85 100644
--- a/lib/hypervisor/hv_kvm.py
+++ b/lib/hypervisor/hv_kvm.py
@@ -458,7 +458,8 @@ class KVMHypervisor(hv_base.BaseHypervisor):
     if result.failed:
       msg = ("Failed to send command '%s' to instance %s."
              " output: %s, error: %s, fail_reason: %s" %
-             (instance.name, result.stdout, result.stderr, result.fail_reason))
+             (command, instance_name,
+              result.stdout, result.stderr, result.fail_reason))
       raise errors.HypervisorError(msg)
 
     return result