From c6a39fc244a64d493ced5ae6edf20de4468272b5 Mon Sep 17 00:00:00 2001
From: Guido Trotter <ultrotter@google.com>
Date: Wed, 10 Mar 2010 11:16:55 +0000
Subject: [PATCH] KVM: pass the instance name as the first kvm flag

This makes it the first argument show, for example under "ps".

Signed-off-by: Guido Trotter <ultrotter@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>
---
 lib/hypervisor/hv_kvm.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/hypervisor/hv_kvm.py b/lib/hypervisor/hv_kvm.py
index 6ecdb8647..2b42a0971 100644
--- a/lib/hypervisor/hv_kvm.py
+++ b/lib/hypervisor/hv_kvm.py
@@ -311,11 +311,11 @@ class KVMHypervisor(hv_base.BaseHypervisor):
     pidfile  = self._InstancePidFile(instance.name)
     kvm = constants.KVM_PATH
     kvm_cmd = [kvm]
+    # used just by the vnc server, if enabled
+    kvm_cmd.extend(['-name', instance.name])
     kvm_cmd.extend(['-m', instance.beparams[constants.BE_MEMORY]])
     kvm_cmd.extend(['-smp', instance.beparams[constants.BE_VCPUS]])
     kvm_cmd.extend(['-pidfile', pidfile])
-    # used just by the vnc server, if enabled
-    kvm_cmd.extend(['-name', instance.name])
     kvm_cmd.extend(['-daemonize'])
     if not instance.hvparams[constants.HV_ACPI]:
       kvm_cmd.extend(['-no-acpi'])
-- 
GitLab