diff --git a/tile_generator/config.py b/tile_generator/config.py
index <HASH>..<HASH> 100644
--- a/tile_generator/config.py
+++ b/tile_generator/config.py
@@ -363,7 +363,7 @@ class Config(dict):
 
 	def update_compilation_vm_disk_size(self, manifest):
 		package_file = manifest.get('path')
-		package_size = os.path.getsize(package_file)
+		package_size = os.path.getsize(package_file) // (1024 * 1024) # bytes to megabytes
 		self['compilation_vm_disk_size'] = max(self['compilation_vm_disk_size'], 4 * package_size)
 
 def read_yaml(file):
diff --git a/tile_generator/config_unittest.py b/tile_generator/config_unittest.py
index <HASH>..<HASH> 100644
--- a/tile_generator/config_unittest.py
+++ b/tile_generator/config_unittest.py
@@ -340,7 +340,7 @@ class TestVMDiskSize(unittest.TestCase):
 		manifest = {'path': 'foo'}
 		config.add_defaults()
 		package_size = config['compilation_vm_disk_size']
-		mock_getsize.return_value = package_size
+		mock_getsize.return_value = package_size * 1024 * 1024 # megabytes to bytes.
 		expected_size = 4 * package_size
 		config.update_compilation_vm_disk_size(manifest)
 		self.assertEqual(config['compilation_vm_disk_size'], expected_size)
Fix compilation vm disk size units.

It is expected in megabytes, not bytes.