/
definition.rb
57 lines (56 loc) · 2.6 KB
/
definition.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
require 'digest/md5'
CURRENT_DIR = File.dirname(__FILE__)
PRESEED_MD5 = "#{Digest::MD5.file("#{CURRENT_DIR}/preseed.cfg").hexdigest}"
#ISO_MD5 = "#{Digest::MD5.file("#{CURRENT_DIR}/../../iso/ubuntu-10.04.3-alternate-amd64.iso").hexdigest}"
Veewee::Session.declare( {
:boot_cmd_sequence => [
"<Esc><Esc><Enter>",
"/install/vmlinuz ",
"noapic ",
"auto-install/enable",
"console-setup/ask_detect=false ",
"console-setup/modelcode=pc105 ",
"console-setup/layoutcode=us ",
"debconf/priority=critical ",
"debconf/frontend=noninteractive ",
"debian-installer=en_US ",
"debian-installer/locale=en_US ",
"debian-installer/framebuffer=false ",
"initrd=/install/initrd.gz ",
"kbd-chooser/method=us ",
"netcfg/get_hostname=%NAME% ",
"netcfg/dhcp_timeout=60 ",
"netcfg/choose_interface=auto ",
"preseed/interactive=false ",
"preseed/url=http://%IP%:%PORT%/preseed.cfg ",
"preseed/url/checksum=#{PRESEED_MD5} ",
"DEBCONF_DEBUG=5 ",
"-- <Enter>"
],
:boot_wait => "10",
:cpu_count => '4',
:disk_size => '10140',
:disk_format => 'VMDK',
:hostiocache => 'on',
:iso_download_timeout => "60",
:iso_file => "ubuntu-10.04.3-alternate-amd64.iso",
:iso_src => "http://releases.ubuntu.com/10.04.3/ubuntu-10.04.3-alternate-amd64.iso",
:iso_md5 => "e38e5cf4cc02c9a3fa4ecd88832d120c",
:kickstart_file => "preseed.cfg",
:kickstart_port => "7122",
:kickstart_timeout => "60",
:memory_size => '4096',
:os_type_id => 'Ubuntu_64',
:postinstall_files => [ "postinstall.sh" ],
:postinstall_timeout => "10000",
:ssh_guest_port => "22",
:ssh_host_port => "7222",
:ssh_key => "",
:ssh_login_timeout => "60",
:ssh_password => "vagrant",
:ssh_user => "vagrant",
:sudo_cmd => "echo '%p'|sudo -S bash '%f'",
:shutdown_cmd => "shutdown -h now",
:use_hw_virt_ext => 'off',
:use_pae => 'on'
})