Disk sizing information in the config file ignored

Bug #1464107 reported by David Peall
14
This bug affects 3 people
Affects Status Importance Assigned to Milestone
vm-builder (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

I'm running ubuntu 14.10 and 15.04.

I have tried "rootsize" and the "part" configuration in the /etc/vmbuilder.cfg and both are ignored.

When adding the --rootsize, --swapsize or --part cmd line options the vm is build correctly.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in vm-builder (Ubuntu):
status: New → Confirmed
David Peall (dkpeall)
description: updated
Revision history for this message
David Peall (dkpeall) wrote :

I added the following 2 lines in :/usr/lib/python2.7/dist-packages/VMBuilder/contrib/cli.py
line 153:
            logging.debug("Option part:= %s",self.options.part)
            logging.debug("Option rootsize:= %s",self.options.rootsize)

Output:
2015-06-11 10:25:22,213 DEBUG : Option part:= None
2015-06-11 10:25:22,214 DEBUG : Option rootsize:= 4096

Even though part is specified in the /etc/vmbuilder.cfg

Revision history for this message
David Peall (dkpeall) wrote :

I've found the bug but am not sure how to fix:

This code here in cli.py:

            if self.options.config:
                config_files.append(self.options.config)
            util.apply_config_files_to_context(config_files, distro)
            util.apply_config_files_to_context(config_files, hypervisor)

Only loads settings that are properties of the distro and hypervisor object, that excludes settings for disk so rootsize, optsize, swapsize and part are therefore ignored in configurations files.

Revision history for this message
Serge Hallyn (serge-hallyn) wrote : Re: [Bug 1464107] Re: Disk sizing information in the config file ignored

The debugging output came from line 153, but the config
files (which include /etc/vmbuilder.cfg) aren't applied until line
175.

Exactly what does your vmbuilder.cfg look like? Have you looked
over https://help.ubuntu.com/community/JeOSVMBuilder#Using%20configuration%20files
?

Quoting David Peall (<email address hidden>):
> I've found the bug but am not sure how to fix:
>
> This code here in cli.py:
>
> if self.options.config:
> config_files.append(self.options.config)
> util.apply_config_files_to_context(config_files, distro)
> util.apply_config_files_to_context(config_files, hypervisor)
>
> Only loads settings that are properties of the distro and hypervisor
> object, that excludes settings for disk so rootsize, optsize, swapsize
> and part are therefore ignored in configurations files.
>
> --
> You received this bug notification because you are a member of Ubuntu
> Virtualisation team, which is subscribed to vm-builder in Ubuntu.
> https://bugs.launchpad.net/bugs/1464107
>
> Title:
> Disk sizing information in the config file ignored
>
> Status in vm-builder package in Ubuntu:
> Confirmed
>
> Bug description:
> I'm running ubuntu 14.10 and 15.04.
>
> I have tried "rootsize" and the "part" configuration in the
> /etc/vmbuilder.cfg and both are ignored.
>
> When adding the --rootsize, --swapsize or --part cmd line options the
> vm is build correctly.
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/ubuntu/+source/vm-builder/+bug/1464107/+subscriptions

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.