box-cutter / ubuntu-vm Goto Github PK
View Code? Open in Web Editor NEWVirtual machine templates for Ubuntu
Virtual machine templates for Ubuntu
My Makefile.local:
CM := puppet
UPDATE := true
HEADLESS := true
Whenever I try to do:
$ make virtualbox/ubuntu1404
I get the following error:
cd ./
rm -rf output-virtualbox-iso
mkdir -p box/virtualbox
packer build -only=virtualbox-iso -var 'cm=puppet' -var 'cm_version=latest' -var 'headless=true' -var 'update=true' -var "iso_url=http://releases.ubuntu.com/14.04/ubuntu-14.04.1-server-amd64.iso" ubuntu1404.json
Failed to create build 'virtualbox-iso':
No builder returned for name: virtualbox-iso
make: *** [box/virtualbox/ubuntu1404-puppetlatest.box] Error 1
Although I can manually create a VM using virtualbox.
OS/Virtualbox information:
OS: Ubuntu 14.04
Virtualbox version: 4.3.14r95030 (Installed from deb source in vbox site)
I am noticing that guest additions fail to mount with box-cutter/ubuntu1204
when running vagrant reload
after vagrant up
finishes. This only occurs when public_network
is used. Though box-cutter/ubuntu1404
works fine. I am on OSX 10.9.2 using Vagrant 1.6.3 and VirtualBox 4.3.12.
I was just wondering if this occurs for anyone else.
evelo@0x6D746873 ~/Documents/Repos/test $ vagrant up [ruby-1.9.3-p448]
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Importing base box 'box-cutter/ubuntu1204'...
==> default: Matching MAC address for NAT networking...
==> default: Checking if box 'box-cutter/ubuntu1204' is up to date...
==> default: Setting the name of the VM: test_default_1405881373880_39875
==> default: Fixed port collision for 22 => 2222. Now on port 2200.
==> default: Clearing any previously set network interfaces...
==> default: Available bridged network interfaces:
1) en1: Wi-Fi (AirPort)
2) en0: Ethernet
3) p2p0
default: What interface should the network bridge to? 1
==> default: Preparing network interfaces based on configuration...
default: Adapter 1: nat
default: Adapter 2: bridged
==> default: Forwarding ports...
default: 22 => 2200 (adapter 1)
==> default: Booting VM...
==> default: Waiting for machine to boot. This may take a few minutes...
default: SSH address: 127.0.0.1:2200
default: SSH username: vagrant
default: SSH auth method: private key
default: Warning: Connection timeout. Retrying...
==> default: Machine booted and ready!
==> default: Checking for guest additions in VM...
==> default: Configuring and enabling network interfaces...
==> default: Mounting shared folders...
default: /vagrant => /Users/evelo/Documents/Repos/test
evelo@0x6D746873 ~/Documents/Repos/test $ vagrant reload [ruby-1.9.3-p448]
==> default: Attempting graceful shutdown of VM...
==> default: Checking if box 'box-cutter/ubuntu1204' is up to date...
==> default: Clearing any previously set forwarded ports...
==> default: Fixed port collision for 22 => 2222. Now on port 2200.
==> default: Clearing any previously set network interfaces...
==> default: Available bridged network interfaces:
1) en1: Wi-Fi (AirPort)
2) en0: Ethernet
3) p2p0
default: What interface should the network bridge to? 1
==> default: Preparing network interfaces based on configuration...
default: Adapter 1: nat
default: Adapter 2: bridged
==> default: Forwarding ports...
default: 22 => 2200 (adapter 1)
==> default: Booting VM...
==> default: Waiting for machine to boot. This may take a few minutes...
default: SSH address: 127.0.0.1:2200
default: SSH username: vagrant
default: SSH auth method: private key
default: Warning: Connection timeout. Retrying...
==> default: Machine booted and ready!
==> default: Checking for guest additions in VM...
==> default: Configuring and enabling network interfaces...
==> default: Mounting shared folders...
default: /vagrant => /Users/evelo/Documents/Repos/test
Failed to mount folders in Linux guest. This is usually because
the "vboxsf" file system is not available. Please verify that
the guest additions are properly installed in the guest and
can work properly. The command attempted was:
mount -t vboxsf -o uid=`id -u vagrant`,gid=`getent group vagrant | cut -d: -f3` vagrant /vagrant
mount -t vboxsf -o uid=`id -u vagrant`,gid=`id -g vagrant` vagrant /vagrant
evelo@0x6D746873 ~/Documents/Repos/test $ vagrant --version [ruby-1.9.3-p448]
Vagrant 1.6.3
evelo@0x6D746873 ~/Documents/Repos/test $ VBoxManage --version [ruby-1.9.3-p448]
4.3.12r93733
Vagrantfile:
# -*- mode: ruby -*-
# vi: set ft=ruby :
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = "box-cutter/ubuntu1204"
config.vm.network "public_network"
end
For those that execute packer on a headless server, it would be nice to make the headless
parameter for VirtualBox (and VMware?) something that can be provided from the command line. Obviously it would default to false to preserve the default behavior.
Add option to install Chef DK, CM=chefdk
Perhaps cleanup.sh
should have the removal of files, and minimize.sh
should just have the zeroing logic?
I use vagrant init box-cutter/ubuntu1204-desktop && vagrant up
, but when the system(virtualbox) up, the ubuntu's version is 14.04?
When running packer build -only=virtualbox-iso ubuntu1404.json
recently, the generated vagrant box doesn't have the proper vboxsf (shared filesystem) kernel module loading at startup.
After some digging, I found that packer's execution of the ubuntu1404.json instructions will generate the kernel modules for the kernel version found in the official Ubuntu ISO, e.g. 3.13.0-24, but once the the latest kernel is installed (right now 3.13.0-29), those kernel modules are out of date and need to be recompiled. As a result, the very first vagrant up
against the box cause a failure where the shared directories cannot be mounted. I then did a modprobe vboxsf
which told me the modules weren't loaded.
I'm thinking the ordering of the provisioning scripts should be reordered slightly? For example, if you make sure that apt-get update && apt-get upgrade -y is called first, then the kernel modules are build for the latest version of the kernel.
Hi all,
Is there a specific reason that you can't control the version of Puppet to install?
Hi,
Any chance to request Ubuntu Desktop for parallels?
Thanks
The box "ubuntu1404-i386 - Ubuntu Server 14.04 (32-bit)" should have 265MB for VirtualBox. I tried it on two different machines, my box has 354MB.
Why is the box size different?
FYI, attempted first time to build ubuntu14.04 box with docker and vagrant was not registered in docker group. After having a look at docker.sh in the script folder, function "give_docker_non_root_access" was never run, after docker installed.
Are there any vagrant cloud base boxes create for ubunutu1204 and puppet?
I can see misheska/ubuntu1204-i386 and misheska/ubuntu1204 but no box with puppet added.
Thanks,
James
Tried for a couple of times now, but always getting this error:
W:\repo\ubuntu-vm>make virtualbox/ubuntu1404
cd ./
rm -rf output-virtualbox-iso
mkdir -p box/virtualbox
packer build -only=virtualbox-iso -var 'cm=nocm' -var 'headless=' -var 'update=' -var 'version=1.0.12' -var 'ssh_username=vagrant' -var 'ssh_password=vagrant' -var 'install_vagrant_key=true' -var "iso_url=http://releases.ubuntu.com/14.04/ubuntu-14.04.1-server-amd64.iso" ubuntu1404.json
virtualbox-iso output will be in this color.
==> virtualbox-iso: Downloading or copying Guest additions
virtualbox-iso: Downloading or copying: file:///C:/Program%20Files/Oracle/VirtualBox/VBoxGuestAdditions.iso
==> virtualbox-iso: Downloading or copying ISO
virtualbox-iso: Downloading or copying: http://releases.ubuntu.com/14.04/ubuntu-14.04.1-server-amd64.iso
==> virtualbox-iso: Starting HTTP server on port 8703
==> virtualbox-iso: Creating virtual machine...
==> virtualbox-iso: Creating hard drive...
==> virtualbox-iso: Creating forwarded port mapping for SSH (host port 3525)
==> virtualbox-iso: Executing custom VBoxManage commands...
virtualbox-iso: Executing: modifyvm ubuntu1404 --memory 512
virtualbox-iso: Executing: modifyvm ubuntu1404 --cpus 1
==> virtualbox-iso: Starting the virtual machine...
...
<snip>
...
virtualbox-iso: zlib1g:amd64 install
virtualbox-iso: ==> Clearing last login information
virtualbox-iso: 2379047+0 records in
virtualbox-iso: 2379047+0 records out
virtualbox-iso: 2436144128 bytes (2.4 GB) copied, 11.1682 s, 218 MB/s
virtualbox-iso: 192000+0 records in
virtualbox-iso: 192000+0 records out
virtualbox-iso: 196608000 bytes (197 MB) copied, 0.987907 s, 199 MB/s
virtualbox-iso: dd: error writing ‘/EMPTY’: No space left on device
virtualbox-iso: 2491+0 records in
virtualbox-iso: 2490+0 records out
virtualbox-iso: 2610987008 bytes (2.6 GB) copied, 9.05889 s, 288 MB/s
virtualbox-iso:
virtualbox-iso:
virtualbox-iso:
virtualbox-iso:
==> virtualbox-iso: Provisioning with shell script: script/cmtool.sh
virtualbox-iso: ==> Building box without baking in a configuration management tool
==> virtualbox-iso: Provisioning with shell script: .
==> virtualbox-iso: Unregistering and deleting virtual machine...
==> virtualbox-iso: Deleting output directory...
Build 'virtualbox-iso' errored: Retryable error: seek .: The handle is invalid.
==> Some builds didn't complete successfully and had errors:
--> virtualbox-iso: Retryable error: seek .: The handle is invalid.
==> Builds finished but no artifacts were created.
make: *** [box/virtualbox/ubuntu1404-nocm-1.0.12.box] Error 1
W:\repo\ubuntu-vm>
Sounds like a disk space issue, but I hardly believe it is as I was trying with various disk_size
s and it's always the same effect. This one was with "disk_size": 4096
and I still have 60 GB free.
Environment:
Any ideas what could be wrong here?
I am noticing that since 29bff65 the Salt installation has been breaking. It seems to remove packages like python yaml (which Salt depends on)...
virtualbox-iso: Removing linux-server (3.13.0.32.38) ...
virtualbox-iso: Removing python-crypto (2.6.1-4build1) ...
virtualbox-iso: Removing python-jinja2 (2.7.2-2) ...
virtualbox-iso: Removing python-m2crypto (0.21.1-3ubuntu5) ...
virtualbox-iso: Removing python-msgpack (0.3.0-1ubuntu3) ...
virtualbox-iso: Removing python-yaml (3.10-4build4) ...
virtualbox-iso: Removing python-zmq (14.0.1-1build2) ...
It seems to be the "deborphan" process that causes the fuss. I made an issue with salt-bootstrap to see if I can get a consensus on what is the core problem here... saltstack/salt-bootstrap#484
The tags of 1.0.5 and up are missing. Can you please include the tag generation and git push --tags
in your release process.
Much appreciated.
Some users need to be able to specify a web proxy. Add parameter to the template .json and Makefile to support a parameter specifying a web proxy address..
When trying to add the ubuntu boxes I am getting the error on download that the url is forbidden:
Enter your choice: 1
==> box: Adding box 'box-cutter/ubuntu1204' (v1.0.3) for provider: virtualbox
box: Downloading: https://vagrantcloud.com/box-cutter/ubuntu1204/version/3/provider/virtualbox.box
An error occurred while downloading the remote file. The error
message, if any, is reproduced below. Please fix this error and try
again.
The requested URL returned error: 403 Forbidden
I get the same with the 1404 update 3. This also happens with the vagrant box update.
Hi!
I am referring to your image (https://app.vagrantup.com/box-cutter/boxes/ubuntu1610-desktop/versions/2.0.26) in my Vagrantfile and it returns the message "403 Forbidden" when I try to run "vagrant up".
Can you check if your image is public for download, please?
Thank you!
Trying to build a 15.10 box with the packer command. 15.04 works perfectly fine, but 15.10 gets stuck here :
==> virtualbox-iso: Waiting for SSH to become available...
I ran in GUI mode, and it looks like after the boot command is issued, the "select language" GUI menu re-appears and is waiting for user input.
Trying to get a 15.10 box since I'm hoping the docker version supported is 1.10.x
Thanks
I use these personally and professionally. What would it take/who do I need to talk to about providing hosting/sponsorship for pre-built versions?
Example Vagrantfile
:
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = "boxcutter/ubuntu1404-desktop"
config.vm.network "public_network"
end
Routing table with route -n
after vagrant up
:
vagrant@vagrant:~$ route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
10.0.2.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
10.100.200.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1
169.254.0.0 0.0.0.0 255.255.0.0 U 1000 0 0 eth0
The box is missing 0.0.0.0
destination.
vagrant reload
or reboot
fixes this issue. If provisioning is required, default gateway should be fixed with explicit provisioning script. Here is my workaround:
$ grep vagrant_fix_default_gw.sh Vagrantfile
config.vm.provision :shell, path: "scripts/vagrant_fix_default_gw.sh"
Script contents:
$ cat scripts/vagrant_fix_default_gw.sh
route del default || true
route -n | grep -qe '^0.0.0.0' || sudo route add default gw `grep routers /var/lib/dhcp/dhclient.eth1.leases | sort -u | awk '{print $3}' | awk -F";" '{print $1}'`
This behaviour exists only with boxcutter/ubuntu1404-desktop
. ubuntu/trusty64
box works as expected. Probably related to NetworkManager.
It would be nice to fix it in box itself.
The Makefile contains quite a lot of repetition, the generic rule is explicitly marked as "not used currently".
The only difference between the invocations (just looking at the vmware ones) seems to be this:
-var "iso_url=$(UBUNTU1004_SERVER_I386)"
-var "iso_url=$(UBUNTU1004_SERVER_AMD64)"
...
a very simple solution would be to define a local directory (e.g. "isos") and to use iso_urls
instead of iso_url
inside the templates like this:
"iso_urls": ["isos/{{user `iso_name`}}", "http://releases.ubuntu.com/14.04/{{user `iso_name`}}"],
The iso_name can be set inside the variables
section of the template
The only downside I can see is the hardcoded location of the isos
directory -- but even that could be made configurable
I'm using the ubuntu1404-desktop base image to create a VM with VMware Fusion on OS X. Basically, everything works, except SSH agent forwarding.
I've set it up correctly on the host, and I have added my key using:
$ ssh-add ~/.ssh/id_rsa
Additionally, my key shows up when I run:
$ ssh-add -l
With another box (based on chef/ubuntu-14.04) it works, so apparently there is an issue with the base box. The actual effect is that if I run
$ ssh -T [email protected]
it tells me that the permission was denied due to the public key.
My Vagrantfile
is pretty straight-forward and looks like this:
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = "box-cutter/ubuntu1404-desktop"
config.vm.hostname = "foobar"
config.ssh.forward_agent = true
config.vm.provider :vmware_workstation do |vmware|
vmware.gui = true
vmware.vmx["memsize"] = "2048"
vmware.vmx["numvcpus"] = "2"
end
config.vm.provider :virtualbox do |vb|
vb.gui = true
vb.customize ["modifyvm", :id, "--memory", "2048", "--cpus", "2"]
vb.customize ["modifyvm", :id, "--clipboard", "bidirectional"]
vb.customize ["modifyvm", :id, "--vram", "32"]
vb.name = "foobar"
end
end
That's it. Any idea what might cause the problem?
Why aren't the docker-vms minimized like the 'normal' VMs?
The packer templates require at least packer version 0.5.0 as it uses the virtualbox-iso
and vmware-iso
builders and the latest version is recommended. Add a check to the Makefile that verifies that the minimum version of packer is installed.
let's say your team just wants box-cutter/ubuntu1410, how do you build just that box?
Is there a way to build these and make use of a apt-get cache such as what is outlined here? I have a slow connection, and I like to build my own boxes for various projects, with minor tweaks here and there.
Previously, I ran a squid-deb-proxy on my LAN and would install that package first, then would update and configure the boxes from that. Is that doable with packer/these images?
Does not shut down cleanly when "vagrant destroy -f" is used on this image in the test barness under vmware - have to nudge it manually
Hi,
I have changed the ubuntu1204-desktop.json to install ubuntu 12.0.4.4 desktop iso from local box. However, I noticed "headless" build is not working as expected. I am trying to build the vm only for virtual box.
Addition to that, I have fixed the preseed.cfg file to be looked from my local server
"preseed/url=http://localhost:8000/preseed-desktop.cfg ",
I issued the following command
packer build ubuntu1204-desktop.json
and I am getting error about accessing the preseed-desktop.cfg file . It look like vm is not able to get access to the above file ....
Could you please advise ?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.