[Pkg-escience-soc2009] [SCM] Tool for creating VM images. branch, master, updated. 06f8c717989bc8084454638873d9a981ffa644a1

David Wendt kmeisthax at Lappy-486.A
Wed Jul 22 02:26:37 UTC 2009


The following commit has been merged in the master branch:
commit aa08b1baf478937d55396efa7988c2f6e7a461c4
Author: David Wendt <kmeisthax at Lappy-486.A>
Date:   Tue Jul 21 14:13:38 2009 -0400

    Patch by Cedric Jeanneret <cedric.jeanneret at camptocamp.com>:
    
    I guess I found the trick for the umounting part : timing.
    
    Adding a "time.sleep(60)" before self.umount_partitions() seems to correct the error.
    
    I also changed some order in lenny.py (plugins directory)

diff --git a/VMBuilder/plugins/debian/lenny.py b/VMBuilder/plugins/debian/lenny.py
index b207942..cf494b5 100644
--- a/VMBuilder/plugins/debian/lenny.py
+++ b/VMBuilder/plugins/debian/lenny.py
@@ -85,14 +85,14 @@ class Lenny(Etch):
         #Opposite of bind_system_devices.
         #Also removes the cleanup commands.
         if hasattr(self, "system_devices_mounted") and self.system_devices_mounted:
-            run_cmd('umount', '%s/dev' % self.destdir)
-            self.vm.remove_clean_cmd('umount', '%s/dev' % self.destdir, ignore_fail=True)
-
             run_cmd('umount', '%s/dev/pts' % self.destdir)
-            self.vm.remove_clean_cmd('umount', '%s/dev/pts' % self.destdir, ignore_fail=True)
+            #self.vm.remove_clean_cmd('umount', '%s/dev/pts' % self.destdir, ignore_fail=True)
+
+            run_cmd('umount', '%s/dev' % self.destdir)
+            #self.vm.remove_clean_cmd('umount', '%s/dev' % self.destdir, ignore_fail=True)
 
             run_cmd('umount', '%s/proc' % self.destdir)
-            self.vm.remove_clean_cmd('umount', '%s/proc' % self.destdir, ignore_fail=True)
+            #self.vm.remove_clean_cmd('umount', '%s/proc' % self.destdir, ignore_fail=True)
 
             self.system_devices_mounted = False
 
diff --git a/VMBuilder/vm.py b/VMBuilder/vm.py
index e11abab..9fc248f 100644
--- a/VMBuilder/vm.py
+++ b/VMBuilder/vm.py
@@ -29,6 +29,7 @@ import textwrap
 import socket
 import struct
 import urllib
+import time
 import VMBuilder
 import VMBuilder.util      as util
 import VMBuilder.log       as log
@@ -491,6 +492,7 @@ class VM(object):
 
             self.install()
 
+            time.sleep(60)
             self.umount_partitions()
 
             self.hypervisor.finalize()

-- 
Tool for creating VM images.



More information about the Pkg-escience-soc2009 mailing list