diff --git a/lib/cmdlib.py b/lib/cmdlib.py
index deee80e0ee7b1768a671d394045bc999ed02b428..e74f71c6860a10f8c247d6cfb5d8b3db58735dfd 100644
--- a/lib/cmdlib.py
+++ b/lib/cmdlib.py
@@ -4916,7 +4916,7 @@ class LURenameInstance(LogicalUnit):
     new_name = self.op.new_name
     if self.op.name_check:
       hostinfo = netutils.HostInfo(netutils.HostInfo.NormalizeName(new_name))
-      new_name = hostinfo.name
+      new_name = self.op.new_name = hostinfo.name
       if (self.op.ip_check and
           netutils.TcpPing(hostinfo.ip, constants.DEFAULT_NODED_PORT)):
         raise errors.OpPrereqError("IP %s of instance %s already in use" %