vmbuilder should allow for no swapfile
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
vm-builder (Ubuntu) |
Confirmed
|
Wishlist
|
Unassigned |
Bug Description
The option "--swapsize 0" currently throws an exception -- I guess vmbuilder tries to add a 0-sized partition to the virtual disk.
In the cli module, in its CLI class, in its set_disk_layout method, the code says:
if vm.hypervisor.
if vm.optsize > 0:
else:
if vm.raw:
if vm.optsize > 0:
and it could allow for skipping swapfiles with:
if vm.hypervisor.
if vm.swapsize > 0:
if vm.optsize > 0:
else:
if vm.raw:
if vm.swapsize > 0:
if vm.optsize > 0:
Related branches
- Soren Hansen: Approve
-
Diff: 132 lines (+30/-16)4 files modifiedVMBuilder/contrib/cli.py (+23/-13)
VMBuilder/disk.py (+1/-1)
VMBuilder/plugins/kvm/vm.py (+4/-0)
VMBuilder/plugins/ubuntu/distro.py (+2/-2)
Changed in vm-builder (Ubuntu): | |
assignee: | Chuck Short (zulcss) → nobody |
Thanks for the bug report. I will create a patch for this and try to push it Soren.
Regards
chuck