From d2146877b1b2ff7830351ffaf3f4a6ae70a98b66 Mon Sep 17 00:00:00 2001
From: Adam Glasgall <glasgall@mit.edu>
Date: Sat, 27 Apr 2013 00:23:14 -0400
Subject: [PATCH] xm was expecting a string and was getting a unistring for
 machine name, which resulted in the VM name always being
 'invirt-database'. Use passed-in machine_name instead,
 since that will be a string. IBTSOCS.

---
 debian/changelog |    9 +++++++++
 invirt-database  |    2 +-
 2 files changed, 10 insertions(+), 1 deletion(-)

diff --git a/debian/changelog b/debian/changelog
index 2794c53..f8bd430 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,12 @@
+invirt-xen-config (0.0.38~glasgall11ubuntu1) UNRELEASED; urgency=low
+
+  * xm was expecting a string and was getting a unistring for machine
+    name, which resulted in the VM name always being
+    'invirt-database'. Use passed-in machine_name instead, since that will
+    be a string. IBTSOCS.
+
+ -- Adam Glasgall <glasgall@mit.edu>  Sat, 27 Apr 2013 00:21:21 -0400
+
 invirt-xen-config (0.0.38~glasgall11) precise; urgency=low
 
   * Add dependency on ethtool.
diff --git a/invirt-database b/invirt-database
index 92600e7..6008c7a 100644
--- a/invirt-database
+++ b/invirt-database
@@ -25,7 +25,7 @@ if 'cdrom_image' in locals():
 memory = machine.memory
 maxmem = '2048'
 check(re.match('^[A-Za-z0-9][A-Za-z0-9._-]*$', machine.name))
-name = prefix + machine.name
+name = prefix + machine_name
 check(re.match('^[0-9a-f-]+$', machine.uuid))
 uuid = machine.uuid
 
-- 
1.7.9.5