=== modified file 'VMBuilder/plugins/ubuntu/dapper.py'
--- VMBuilder/plugins/ubuntu/dapper.py	2013-03-06 08:56:30 +0000
+++ VMBuilder/plugins/ubuntu/dapper.py	2013-09-20 07:32:01 +0000
@@ -234,6 +234,14 @@
                                                                               'components' : components,
                                                                               'ppa' : ppa,
                                                                               'suite' : suite })
+        
+        # copy extra source files
+        extrasourcefiles = self.context.get_setting('addsourcefile')
+        for sourcefile in extrasourcefiles:
+            destination_dirname = '/etc/apt/sources.list.d'
+            destination_basename = os.path.basename(sourcefile)
+            destination = os.path.join(destination_dirname, destination_basename)
+            self.context.install_file(destination, source = sourcefile)
 
         # If setting up the final mirror, allow apt-get update to fail
         # (since we might be on a complete different network than the

=== modified file 'VMBuilder/plugins/ubuntu/distro.py'
--- VMBuilder/plugins/ubuntu/distro.py	2013-04-29 16:08:42 +0000
+++ VMBuilder/plugins/ubuntu/distro.py	2013-09-20 07:32:01 +0000
@@ -63,6 +63,7 @@
         group.add_setting('install-security-mirror', metavar='URL', help='Use the security mirror at URL for installation only. Apt\'s sources.list will still use default or URL set by --security-mirror')
         group.add_setting('components', type='list', metavar='COMPS', help='A comma seperated list of distro components to include (e.g. main,universe).')
         group.add_setting('ppa', metavar='PPA', type='list', help='Add ppa belonging to PPA to the vm\'s sources.list.')
+        group.add_setting('addsourcefile', metavar='SOURCEFILE', type='list', help='Add additional sources in /etc/apt/source.list.d/.')
         group.add_setting('lang', metavar='LANG', default=get_locale(), help='Set the locale to LANG [default: %default]')
         group.add_setting('timezone', metavar='TZ', default='UTC', help='Set the timezone to TZ in the vm. [default: %default]')
 
@@ -125,6 +126,12 @@
         if seedfile and not os.path.exists(seedfile):
             raise VMBuilderUserError("Seedfile '%s' does not exist" % seedfile)
 
+        # check if the supplied sources.list.d files exist
+        extrasourcefiles = self.context.get_setting('addsourcefile')
+        for sourcefile in extrasourcefiles:
+            if not os.path.exists(sourcefile):
+                raise VMBuilderUserError("Source file '%s' does not exist" % sourcefile)
+
         lang = self.get_setting('lang')
 
 # FIXME

