Package: bootstrap-vz / 0.9.0-1

0001-Correct-volume-size-calculation-to-fix-broken-volume.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
From: Olivier Berger <oberger@ouvaton.org>
Date: Mon, 4 Aug 2014 12:12:47 +0200
Subject: Correct volume size calculation to fix broken volume partitioning
 using nbd

Fixes #129.
---
 bootstrapvz/common/fs/qemuvolume.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/bootstrapvz/common/fs/qemuvolume.py b/bootstrapvz/common/fs/qemuvolume.py
index 605e77c..45d2e65 100644
--- a/bootstrapvz/common/fs/qemuvolume.py
+++ b/bootstrapvz/common/fs/qemuvolume.py
@@ -8,7 +8,7 @@ class QEMUVolume(LoopbackVolume):
 
 	def _before_create(self, e):
 		self.image_path = e.image_path
-		vol_size = str(self.size.get_qty_in('MiB')) + 'M'
+		vol_size = str(self.size.get_qty_in('B') + 4096)
 		log_check_call(['qemu-img', 'create', '-f', self.qemu_format, self.image_path, vol_size])
 
 	def _check_nbd_module(self):