Hi,

I encounter a VERR_ZIP_CORRUPTED error when I vagrant up. I am using a 
custom box made with Packer. It's weird because VBoxManage cannot unzip the 
image, but if create a VM with the vmdk file directly in VirtualBox it 
works. This custom box has nothing special, it's a CentOS 6.5 image plus 
some packages for turning it into a LAMP server.

My vagrant setup seems to be right because I can vagrant up the 
hashicorp/precise64 box.

Any help appreciated!

Some details:

I'm on Mac OS 10.7 with the following versions:
vagrant 1.7.2
virtualbox 4.3.20
packer 0.7.5

Following are:
- the Packer json config
- the kickstart config triggered by Packer
- the vagrantfile

PACKER SCRIPT
(based on this example: 
https://bitbucket.org/ariya/packer-vagrant-linux/src/d0359d7e64e2?at=master)
-------------------------------------
{
    "builders": [{
        "type": "virtualbox-iso",
        "guest_os_type": "RedHat_64",

        "iso_url": 
"http://archive.kernel.org/centos-vault/6.5/isos/x86_64/CentOS-6.5-x86_64-minimal.iso";,
        "iso_checksum": "f21a71e8e31df73297bdd1ccd4a64a36831284bd",
        "iso_checksum_type": "sha1",

        "ssh_username": "vagrant",
        "ssh_password": "vagrant",
        "ssh_wait_timeout": "10000s",
        "ssh_port": 22,

        "shutdown_command": "echo 'vagrant'|sudo -S /sbin/halt -h -p",

        "virtualbox_version_file": ".vbox_version",
        "headless": false,

        "disk_size": 10000,

        "boot_command": [
            "<tab> text ks=http://{{ .HTTPIP }}:{{ .HTTPPort 
}}/centos-6.5-x86_64/ks.cfg<wait5><enter><wait>"
        ],
        "boot_wait": "12s",

        "http_directory": "http",

        "guest_additions_path": "VBoxGuestAdditions_{{.Version}}.iso",

        "vboxmanage": [
            ["modifyvm", "{{.Name}}", "--memory", "512"],
            ["modifyvm", "{{.Name}}", "--cpus", "1"]
        ]

    }],
    "post-processors": [{
        "output": "build/centos-6.5-x86_64.box",
        "type": "vagrant"
    }],
    "provisioners": [{
        "type": "shell",
        "execute_command": "echo 'vagrant' | {{.Vars}} sudo -S -E bash 
'{{.Path}}'",
        "scripts": [
            "scripts/vagrant.sh",
            "scripts/vboxguest.sh",
            "scripts/compact.sh"
        ]
    }]
}
-------------------------------------


KICKSTART CONFIG
-------------------------------------
# kickstart installation configuration file
# reference here: http://red.ht/1EYRUuM

# enable a firewall
firewall --enabled --http --ssh --port=443:tcp

# fresh install (default)
install
#  install url
url --url http://archive.kernel.org/centos-vault/6.5/os/x86_64/

# regional setup
lang en_US.UTF-8
keyboard fr
timezone Europe/Paris

# get network from dhcp
network --bootproto=dhcp

# root password: 'vagrant'
rootpw --iscrypted $1$damlkd,f$UC/u5pUts5QiU3ow.CSso/
authconfig --enableshadow --passalgo=sha512
# auth  --useshadow  --enablemd5

# enable selinux
selinux --enforcing
# bootloader (= default)
bootloader --location=mbr

# kickstart installation in text mode instead of graphical
text
# skip X-Window configuration
skipx
# verbose level of install
logging --level=info

# partition setup
# reset partition tables of any found disk
zerombr 
# erase all partitions
clearpart --all
#  --initlabel 
# auto create partitions (root + swap + boot)
autopart

# firstboot feature disabled
firstboot --disabled
# reboot without confirmation after a successful install
reboot 

# packages
%packages --ignoremissing
# default
@Base
@Core
# specific
@Development Tools
kernel-devel
@Web Server
@MySQL Database client
@MySQL Database server
@PHP Support
php-mysql
@E-mail server
git
%end

# post install additional config
%post
# get a Certificate Authority file for OpenSSL (curl's CA Extract)
wget -O/etc/pki/tls/certs/ca-bundle.crt http://curl.haxx.se/ca/cacert.pem
# vagrant user config
groupadd vagrant -g 999
useradd vagrant -g vagrant -G wheel -u 900
echo "vagrant" | passwd --stdin vagrant
echo "vagrant        ALL=(ALL)       NOPASSWD: ALL" >> /etc/sudoers
sed -i "s/^.*requiretty/#Defaults requiretty/" /etc/sudoers
-------------------------------------


VAGRANTFILE
-------------------------------------
# -*- mode: ruby -*-
# vi: set ft=ruby :

VAGRANTFILE_API_VERSION = "2"

Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
  config.vm.box = "my_centos6.5_v2"
  config.vm.base_mac = "080027EC40AF"
end
-------------------------------------

-- 
You received this message because you are subscribed to the Google Groups 
"Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to