lost and found ( for me ? )

Showing posts with label boxgrinder. Show all posts
Showing posts with label boxgrinder. Show all posts

Fedora 18 : build VMs with boxgrinder ( fail ! )


[root@localhost ~]# cat /etc/fedora-release
Fedora release 18 (Spherical Cow)

# uname -ri
3.7.5-201.fc18.x86_64 x86_64

install boxgrinder via yum
[root@localhost ~]# yum install -y rubygem-boxgrinder-build.noarch rubygem-boxgrinder-core.noarch

make VM definition file for Fedora 17 Vm
[root@localhost Boxgrinder_works]# cat f17-basic.appl
name: f17-x86_64
summary: Just Enough Operating System based on Fedora 17
os:
  name: fedora
  version: 17
  password: password # default is boxgrinder
hardware:
  cpus: 1
  memory: 512
  partitions:     
      "/":
       size: 5 # 5GB HDD
       type: ext4
packages:
  - @core
default_repos: true


build the F17 VM
nn ,error
[root@localhost Boxgrinder_works]# boxgrinder-build f17-basic.appl --os-config format:qcow2 --trace
<snip>
D, [2013-02-07T00:28:12.030425 #22209] DEBUG -- : Installing: setserial                    ##################### [210/211]
D, [2013-02-07T00:28:15.938889 #22209] DEBUG -- : Installing: rootfiles                    ##################### [211/211]
D, [2013-02-07T00:30:00.159584 #22209] DEBUG -- : Unable to create appliance : Unable to run ['/usr/bin/firewall-offline-cmd', '--disabled']!
D, [2013-02-07T00:30:00.235624 #22209] DEBUG -- : Unmounting directory /root/My_works/Boxgrinder_works/build/appliances/x86_64/fedora/17/f17-x86_64/1.0/fedora-plugin/tmp/imgcreate-yICUXj/install_root/
D, [2013-02-07T00:30:01.914531 #22209] DEBUG -- : Removing compat symlinks
D, [2013-02-07T00:30:01.914876 #22209] DEBUG -- : Unmapping /dev/loop0
D, [2013-02-07T00:30:01.931232 #22209] DEBUG -- : Losetup remove /dev/loop0
D, [2013-02-07T00:30:02.064390 #22209] DEBUG -- : Installing: kernel                       ##################### [212/211]
D, [2013-02-07T00:30:02.064770 #22209] DEBUG -- :
E, [2013-02-07T00:30:02.099925 #22209] ERROR -- : /usr/share/gems/gems/boxgrinder-core-0.3.14/lib/boxgrinder-core/helpers/exec-helper.rb:85:in `execute'
/usr/share/gems/gems/boxgrinder-build-0.10.4/lib/boxgrinder-build/plugins/os/rpm-based/rpm-based-os-plugin.rb:107:in `execute_appliance_creator'
/usr/share/gems/gems/boxgrinder-build-0.10.4/lib/boxgrinder-build/plugins/os/rpm-based/rpm-based-os-plugin.rb:71:in `build_with_appliance_creator'
/usr/share/gems/gems/boxgrinder-build-0.10.4/lib/boxgrinder-build/plugins/os/fedora/fedora-plugin.rb:53:in `execute'
/usr/share/gems/gems/boxgrinder-build-0.10.4/lib/boxgrinder-build/plugins/base-plugin.rb:172:in `run'
/usr/share/gems/gems/boxgrinder-build-0.10.4/lib/boxgrinder-build/appliance.rb:184:in `execute_plugin'
/usr/share/gems/gems/boxgrinder-build-0.10.4/lib/boxgrinder-build/appliance.rb:207:in `execute_without_userchange'
/usr/share/gems/gems/boxgrinder-build-0.10.4/lib/boxgrinder-build/appliance.rb:129:in `block in execute_plugin_chain'
/usr/share/gems/gems/boxgrinder-build-0.10.4/lib/boxgrinder-build/appliance.rb:125:in `each'
/usr/share/gems/gems/boxgrinder-build-0.10.4/lib/boxgrinder-build/appliance.rb:125:in `execute_plugin_chain'
/usr/share/gems/gems/boxgrinder-build-0.10.4/lib/boxgrinder-build/appliance.rb:164:in `create'
/usr/share/gems/gems/boxgrinder-build-0.10.4/bin/boxgrinder-build:203:in `<top (required)>'
/bin/boxgrinder-build:23:in `load'
/bin/boxgrinder-build:23:in `<main>'
F, [2013-02-07T00:30:02.100695 #22209] FATAL -- : RuntimeError: An error occurred while executing command: 'appliance-creator -d -v -t 'build/appliances/x86_64/fedora/17/f17-x86_64/1.0/fedora-plugin/tmp' --cache=/var/cache/boxgrinder/rpms-cache/x86_64/fedora/17 --config 'build/appliances/x86_64/fedora/17/f17-x86_64/1.0/fedora-plugin/tmp/f17-x86_64.ks' -o 'build/appliances/x86_64/fedora/17/f17-x86_64/1.0/fedora-plugin/tmp' --name 'f17-x86_64' --vmem 512 --vcpu 1 --format qcow2', process exited with wrong exit status: 1
/usr/share/gems/gems/boxgrinder-core-0.3.14/lib/boxgrinder-core/helpers/exec-helper.rb:92:in `rescue in execute'
/usr/share/gems/gems/boxgrinder-core-0.3.14/lib/boxgrinder-core/helpers/exec-helper.rb:51:in `execute'
/usr/share/gems/gems/boxgrinder-build-0.10.4/lib/boxgrinder-build/plugins/os/rpm-based/rpm-based-os-plugin.rb:107:in `execute_appliance_creator'
/usr/share/gems/gems/boxgrinder-build-0.10.4/lib/boxgrinder-build/plugins/os/rpm-based/rpm-based-os-plugin.rb:71:in `build_with_appliance_creator'
/usr/share/gems/gems/boxgrinder-build-0.10.4/lib/boxgrinder-build/plugins/os/fedora/fedora-plugin.rb:53:in `execute'
/usr/share/gems/gems/boxgrinder-build-0.10.4/lib/boxgrinder-build/plugins/base-plugin.rb:172:in `run'
/usr/share/gems/gems/boxgrinder-build-0.10.4/lib/boxgrinder-build/appliance.rb:184:in `execute_plugin'
/usr/share/gems/gems/boxgrinder-build-0.10.4/lib/boxgrinder-build/appliance.rb:207:in `execute_without_userchange'
/usr/share/gems/gems/boxgrinder-build-0.10.4/lib/boxgrinder-build/appliance.rb:129:in `block in execute_plugin_chain'
/usr/share/gems/gems/boxgrinder-build-0.10.4/lib/boxgrinder-build/appliance.rb:125:in `each'
/usr/share/gems/gems/boxgrinder-build-0.10.4/lib/boxgrinder-build/appliance.rb:125:in `execute_plugin_chain'
/usr/share/gems/gems/boxgrinder-build-0.10.4/lib/boxgrinder-build/appliance.rb:164:in `create'
/usr/share/gems/gems/boxgrinder-build-0.10.4/bin/boxgrinder-build:203:in `<top (required)>'
/bin/boxgrinder-build:23:in `load'
/bin/boxgrinder-build:23:in `<main>'


well I can not find the way to solve this , so I’ll build CentOS 6 VM.

Here’s the definition file for CentOS 6 VM
[root@localhost Boxgrinder_works]# cat centos6.appl
name: centos6-x86_64
summary: Just Enough Operating System based on CentOS6
os:
  name: centos
  version: 6
  password: password # default is boxgrinder
hardware:
  cpus: 1
  memory: 512
  partitions:     
      "/":
       size: 5 # 5GB HDD
       type: ext4
packages:
   - @core
   - acpid



[root@localhost Boxgrinder_works]# boxgrinder-build centos6.appl --os-config format:qcow2 --trace
<snip>
D, [2013-02-07T01:13:10.988533 #27863] DEBUG -- : Installing: xorg-x11-drv-ati-firmware    ##################### [191/198]
D, [2013-02-07T01:13:11.003432 #27863] DEBUG -- : Installing: iwl4965-firmware             ##################### [192/198]
D, [2013-02-07T01:13:11.009095 #27863] DEBUG -- : Installing: ql2500-firmware              ##################### [193/198]
D, [2013-02-07T01:13:11.011226 #27863] DEBUG -- : Installing: ql2100-firmware              ##################### [194/198]
D, [2013-02-07T01:13:11.036569 #27863] DEBUG -- : Installing: rt61pci-firmware             ##################### [195/198]
D, [2013-02-07T01:13:11.058688 #27863] DEBUG -- : Installing: ivtv-firmware                ##################### [196/198]
D, [2013-02-07T01:13:11.063158 #27863] DEBUG -- : Installing: ipw2200-firmware             ##################### [197/198]
D, [2013-02-07T01:14:45.939371 #27863] DEBUG -- : Unable to create appliance : Unable to run ['/usr/bin/firewall-offline-cmd', '--disabled']!
D, [2013-02-07T01:14:46.004680 #27863] DEBUG -- : Unmounting directory /root/My_works/Boxgrinder_works/build/appliances/x86_64/centos/6/centos6-x86_64/1.0/centos-plugin/tmp/imgcreate-EesjbB/install_root/
D, [2013-02-07T01:14:46.965246 #27863] DEBUG -- : Removing compat symlinks
D, [2013-02-07T01:14:46.965646 #27863] DEBUG -- : Unmapping /dev/loop0
D, [2013-02-07T01:14:46.986006 #27863] DEBUG -- : Losetup remove /dev/loop0
D, [2013-02-07T01:14:47.112435 #27863] DEBUG -- : Installing: zd1211-firmware              ##################### [198/198]
D, [2013-02-07T01:14:47.112815 #27863] DEBUG -- :
E, [2013-02-07T01:14:47.146380 #27863] ERROR -- : /usr/share/gems/gems/boxgrinder-core-0.3.14/lib/boxgrinder-core/helpers/exec-helper.rb:85:in `execute'
/usr/share/gems/gems/boxgrinder-build-0.10.4/lib/boxgrinder-build/plugins/os/rpm-based/rpm-based-os-plugin.rb:107:in `execute_appliance_creator'
/usr/share/gems/gems/boxgrinder-build-0.10.4/lib/boxgrinder-build/plugins/os/rpm-based/rpm-based-os-plugin.rb:71:in `build_with_appliance_creator'
/usr/share/gems/gems/boxgrinder-build-0.10.4/lib/boxgrinder-build/plugins/os/rhel/rhel-plugin.rb:33:in `build_rhel'
/usr/share/gems/gems/boxgrinder-build-0.10.4/lib/boxgrinder-build/plugins/os/centos/centos-plugin.rb:44:in `execute'
/usr/share/gems/gems/boxgrinder-build-0.10.4/lib/boxgrinder-build/plugins/base-plugin.rb:172:in `run'
/usr/share/gems/gems/boxgrinder-build-0.10.4/lib/boxgrinder-build/appliance.rb:184:in `execute_plugin'
/usr/share/gems/gems/boxgrinder-build-0.10.4/lib/boxgrinder-build/appliance.rb:207:in `execute_without_userchange'
/usr/share/gems/gems/boxgrinder-build-0.10.4/lib/boxgrinder-build/appliance.rb:129:in `block in execute_plugin_chain'
/usr/share/gems/gems/boxgrinder-build-0.10.4/lib/boxgrinder-build/appliance.rb:125:in `each'
/usr/share/gems/gems/boxgrinder-build-0.10.4/lib/boxgrinder-build/appliance.rb:125:in `execute_plugin_chain'
/usr/share/gems/gems/boxgrinder-build-0.10.4/lib/boxgrinder-build/appliance.rb:164:in `create'
/usr/share/gems/gems/boxgrinder-build-0.10.4/bin/boxgrinder-build:203:in `<top (required)>'
/bin/boxgrinder-build:23:in `load'
/bin/boxgrinder-build:23:in `<main>'
F, [2013-02-07T01:14:47.147247 #27863] FATAL -- : RuntimeError: An error occurred while executing command: 'appliance-creator -d -v -t 'build/appliances/x86_64/centos/6/centos6-x86_64/1.0/centos-plugin/tmp' --cache=/var/cache/boxgrinder/rpms-cache/x86_64/centos/6 --config 'build/appliances/x86_64/centos/6/centos6-x86_64/1.0/centos-plugin/tmp/centos6-x86_64.ks' -o 'build/appliances/x86_64/centos/6/centos6-x86_64/1.0/centos-plugin/tmp' --name 'centos6-x86_64' --vmem 512 --vcpu 1 --format qcow2', process exited with wrong exit status: 1
/usr/share/gems/gems/boxgrinder-core-0.3.14/lib/boxgrinder-core/helpers/exec-helper.rb:92:in `rescue in execute'
/usr/share/gems/gems/boxgrinder-core-0.3.14/lib/boxgrinder-core/helpers/exec-helper.rb:51:in `execute'
/usr/share/gems/gems/boxgrinder-build-0.10.4/lib/boxgrinder-build/plugins/os/rpm-based/rpm-based-os-plugin.rb:107:in `execute_appliance_creator'

nnn , can’t build VMs on Fedora 18...
When using Fedora 17 , I was able to build VMs with boxgrinder without problems.

Fedora 17 64bit : boxgrinder 0.10.1 libvirt delivery plugin

Here’s an explanation of how to build a VM and deploy it in a KVM host with boxgrinder libvirt delivery plugin.

[root@fc17 ~]# uname -ri
3.3.7-1.fc17.x86_64 x86_64

[root@fc17 ~]# cat /etc/fedora-release
Fedora release 17 (Beefy Miracle)

install boxgrinder via yum
[root@fc17 ~]# yum install -y *boxgrinder*

[root@fc17 ~]# boxgrinder-build --version | head -1
BoxGrinder Build 0.10.1

make a working directory
[root@fc17 ~]# mkdir boxgrinder_works
[root@fc17 ~]# cd boxgrinder_works/

make a template file
[root@fc17 boxgrinder_works]# cat centos6-jeos.appl
name: "centos6-jeos"
summary: CentOS 6 Core

os:
 name: centos
 version: 6
 password: centos

hardware:
 cpus: 1
 memory: 256
 partitions:
   "/":
     size: 5  # 5GB
   "swap":
     size: 0.5  # 0.5GB

repos:
 - name: "rbel6"
   baseurl: "http://rbel.frameos.org/stable/el6/#BASE_ARCH#/"

packages:
 - coreutils
 - openssh-server

build centos6 jeos and deploy it in “/var/lib/libvirt/images” directory.
[root@fc17 boxgrinder_works]# boxgrinder-build centos6-jeos.appl -d libvirt --delivery-config connection_uri:qemu:///system,image_delivery_uri:/var/lib/libvirt/images

building the VM
[root@fc17 boxgrinder_works]# boxgrinder-build centos6-jeos.appl -d libvirt --delivery-config connection_uri:qemu:///system,image_delivery_uri:/var/lib/libvirt/images
I, [2012-06-05T00:03:12.223041 #2978]  INFO -- : Validating appliance definition from centos6-jeos.appl file...
I, [2012-06-05T00:03:12.224695 #2978]  INFO -- : Appliance definition is valid.
I, [2012-06-05T00:03:12.232729 #2978]  INFO -- : Building 'centos6-jeos' appliance for x86_64 architecture.
I, [2012-06-05T00:03:12.236035 #2978]  INFO -- : Resolving packages added to centos6-jeos appliance definition file...
I, [2012-06-05T00:03:38.005527 #2978]  INFO -- : All additional packages for centos6-jeos appliance successfully resolved.
I, [2012-06-05T00:03:38.005846 #2978]  INFO -- : Building centos6-jeos appliance...
supermin helper [00000ms] whitelist = (not specified), host_cpu = x86_64, kernel = (null), initrd = (null), appliance = (null)
supermin helper [00000ms] inputs[0] = /usr/lib64/guestfs/supermin.d
checking modpath /lib/modules/3.3.7-1.fc17.x86_64 is a directory
picked vmlinuz-3.3.7-1.fc17.x86_64 because modpath /lib/modules/3.3.7-1.fc17.x86_64 exists
checking modpath /lib/modules/3.3.4-5.fc17.x86_64 is a directory
picked vmlinuz-3.3.4-5.fc17.x86_64 because modpath /lib/modules/3.3.4-5.fc17.x86_64 exists
supermin helper [00000ms] finished creating kernel
supermin helper [00001ms] visiting /usr/lib64/guestfs/supermin.d
supermin helper [00001ms] visiting /usr/lib64/guestfs/supermin.d/base.img
supermin helper [00007ms] visiting /usr/lib64/guestfs/supermin.d/daemon.img
supermin helper [00014ms] visiting /usr/lib64/guestfs/supermin.d/hostfiles
supermin helper [00098ms] visiting /usr/lib64/guestfs/supermin.d/init.img
supermin helper [00098ms] adding kernel modules
supermin helper [00196ms] finished creating appliance
supermin helper [00000ms] whitelist = (not specified), host_cpu = x86_64, kernel = /tmp/guestfs.gIaqbT/kernel, initrd = /tmp/guestfs.gIaqbT/initrd, appliance = /tmp/guestfs.gIaqbT/root
supermin helper [00000ms] inputs[0] = /usr/lib64/guestfs/supermin.d
checking modpath /lib/modules/3.3.7-1.fc17.x86_64 is a directory
picked vmlinuz-3.3.7-1.fc17.x86_64 because modpath /lib/modules/3.3.7-1.fc17.x86_64 exists
checking modpath /lib/modules/3.3.4-5.fc17.x86_64 is a directory
picked vmlinuz-3.3.4-5.fc17.x86_64 because modpath /lib/modules/3.3.4-5.fc17.x86_64 exists
supermin helper [00000ms] finished creating kernel
supermin helper [01219ms] finished mke2fs
supermin helper [01220ms] visiting /usr/lib64/guestfs/supermin.d
supermin helper [01220ms] visiting /usr/lib64/guestfs/supermin.d/base.img
supermin helper [05841ms] visiting /usr/lib64/guestfs/supermin.d/daemon.img
supermin helper [05881ms] visiting /usr/lib64/guestfs/supermin.d/hostfiles
supermin helper [17090ms] visiting /usr/lib64/guestfs/supermin.d/init.img
supermin helper [17095ms] adding kernel modules
supermin helper [30948ms] closing ext2 filesystem
supermin helper [30948ms] finished creating appliance
W, [2012-06-05T00:11:50.557966 #2978]  WARN -- : Loading SELinux policy failed. SELinux may be not fully initialized.
I, [2012-06-05T00:12:00.319755 #2978]  INFO -- : Executing post operations after build...
I, [2012-06-05T00:12:00.694046 #2978]  INFO -- : Base image for centos6-jeos appliance was built successfully.
I, [2012-06-05T00:12:00.718734 #2978]  INFO -- : Copying disk build/appliances/x86_64/centos/6/centos6-jeos/1.0/centos-plugin/centos6-jeos-sda.raw to: /var/lib/libvirt/images...
I, [2012-06-05T00:12:48.573367 #2978]  INFO -- : Determining remotely.
I, [2012-06-05T00:12:50.454926 #2978]  INFO -- : Defining domain centos6-jeos-1-0-centos-6-x86_64-raw

centos jeos VM has been deployed !
[root@fc17 boxgrinder_works]# virsh list --all
Id    Name                           State
----------------------------------------------------
-     centos6-jeos-1-0-centos-6-x86_64-raw shut off


virsh # dumpxml centos6-jeos-1-0-centos-6-x86_64-raw
<domain type='qemu'>
 <name>centos6-jeos-1-0-centos-6-x86_64-raw</name>
 <uuid>4e2aeb27-2aa4-2751-ad51-a0ac798466b8</uuid>
 <description>CentOS 6 Core</description>
 <memory unit='KiB'>262144</memory>
 <currentMemory unit='KiB'>262144</currentMemory>
 <vcpu>1</vcpu>
 <os>
   <type arch='x86_64' machine='pc-0.15'>hvm</type>
   <boot dev='hd'/>
 </os>
 <features>
   <pae/>
 </features>
 <clock offset='utc'/>
 <on_poweroff>destroy</on_poweroff>
 <on_reboot>restart</on_reboot>
 <on_crash>destroy</on_crash>
 <devices>
   <emulator>/usr/bin/qemu-system-x86_64</emulator>
   <disk type='file' device='disk'>
     <driver name='qemu' type='raw'/>
     <source file='/var/lib/libvirt/images/centos6-jeos-sda.raw'/>
     <target dev='hda' bus='ide'/>
     <address type='drive' controller='0' bus='0' target='0' unit='0'/>
   </disk>
   <controller type='usb' index='0'>
     <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>
   </controller>
   <controller type='ide' index='0'>
     <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/>
   </controller>
   <interface type='network'>
     <mac address='52:54:00:91:44:2b'/>
     <source network='default'/>
     <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
   </interface>
   <serial type='pty'>
     <target port='0'/>
   </serial>
   <console type='pty'>
     <target type='serial' port='0'/>
   </console>
   <input type='mouse' bus='ps2'/>
   <graphics type='vnc' port='-1' autoport='yes'/>
   <video>
     <model type='cirrus' vram='9216' heads='1'/>
     <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
   </video>
   <memballoon model='virtio'>
     <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
   </memballoon>
 </devices>
</domain>

virsh #



start the VM
virsh # start centos6-jeos-1-0-centos-6-x86_64-raw
Domain centos6-jeos-1-0-centos-6-x86_64-raw started

virsh # list --all
Id    Name                           State
----------------------------------------------------
1     centos6-jeos-1-0-centos-6-x86_64-raw running





Fedora 16 64bit : build a VM image based on Fedora , RHEL and CentOS with boxgrinder

[ what’s boxgrinder ]

boxgrinder enables you to build a custom Virtual appliance based on Fedora , RHEL and CentOS for KVM , VMware etc.

- boxgrinder
http://boxgrinder.org/

[root@fc16 ~]# cat /etc/fedora-release
Fedora release 16 (Verne)
[root@fc16 ~]# uname -ri
3.3.5-2.fc16.x86_64 x86_64

[ installation ]

install boxgrinder and documentation via yum.
[root@fc16 ~]# yum install *boxgrinder*

[ build a VM image with boxgrinder ]

1. create an appliance definition file.

There are sample definition files under /usr/lib/ruby/gems/1.8/gems/boxgrinder-build-0.10.1/integ/appliances
directory.

I am going to build a VM using /usr/lib/ruby/gems/1.8/gems/boxgrinder-build-0.10.1/integ/appliances/jeos-f16.appl

make a working directory for boxgrinder and copy jeos-f16.appl to that directory.
[root@fc16 ~]# mkdir Boxgrinder_works
[root@fc16 ~]# cd Boxgrinder_works/
[root@fc16 Boxgrinder_works]# cp /usr/lib/ruby/gems/1.8/gems/boxgrinder-build-0.10.1/integ/appliances/jeos-f16.appl .

[root@fc16 Boxgrinder_works]# cat jeos-f16.appl
name: jeos-f16
os:
 name: fedora
 version: 16
repos:
 - name: "temp-fedora-updates-testing"
   mirrorlist: "https://mirrors.fedoraproject.org/metalink?repo=updates-testing-f#OS_VERSION#&arch=#BASE_ARCH#"
   ephemeral: true


There are some definition files under  /usr/lib/ruby/gems/1.8/gems/boxgrinder-build-0.10.1/integ/appliances/.
[root@fc16 Boxgrinder_works]# ls /usr/lib/ruby/gems/1.8/gems/boxgrinder-build-0.10.1/integ/appliances/*
/usr/lib/ruby/gems/1.8/gems/boxgrinder-build-0.10.1/integ/appliances/gnome-fedora.appl
/usr/lib/ruby/gems/1.8/gems/boxgrinder-build-0.10.1/integ/appliances/jeos-centos5-files.appl
/usr/lib/ruby/gems/1.8/gems/boxgrinder-build-0.10.1/integ/appliances/jeos-centos5.appl
/usr/lib/ruby/gems/1.8/gems/boxgrinder-build-0.10.1/integ/appliances/jeos-centos6.appl
/usr/lib/ruby/gems/1.8/gems/boxgrinder-build-0.10.1/integ/appliances/jeos-f15.appl
/usr/lib/ruby/gems/1.8/gems/boxgrinder-build-0.10.1/integ/appliances/jeos-f16-files.appl
/usr/lib/ruby/gems/1.8/gems/boxgrinder-build-0.10.1/integ/appliances/jeos-f16.appl

/usr/lib/ruby/gems/1.8/gems/boxgrinder-build-0.10.1/integ/appliances/modular:
_hardware_cpus.appl             _packages_squid.appl
_hardware_memory.appl           _packages_utils.appl
_hardware_partitions_home.appl  _repos_boxgrinder_permanent_noarch.appl
_hardware_partitions_root.appl  _repos_testlocal_ephemeral_noarch.appl
_os_password.appl               _test_base.appl
_packages_groups_base.appl      modular.appl
_packages_groups_core.appl


build a Fedora 16’s JeOS image for KVM using a sample definition file ( jeos-f16.appl )
[root@fc16 Boxgrinder_works]# boxgrinder-build jeos-f16.appl --os-config format:qcow2
I, [2012-05-15T00:12:45.600999 #4575]  INFO -- : Validating appliance definition from jeos-f16.appl file...
I, [2012-05-15T00:12:45.603516 #4575]  INFO -- : Appliance definition is valid.
I, [2012-05-15T00:12:45.613775 #4575]  INFO -- : Building 'jeos-f16' appliance for x86_64 architecture.
I, [2012-05-15T00:12:45.622250 #4575]  INFO -- : Resolving packages added to jeos-f16 appliance definition file...
I, [2012-05-15T00:13:21.232120 #4575]  INFO -- : All additional packages for jeos-f16 appliance successfully resolved.
I, [2012-05-15T00:13:21.232524 #4575]  INFO -- : Building jeos-f16 appliance...
supermin helper [00000ms] whitelist = (not specified), host_cpu = x86_64, kernel = (null), initrd = (null), appliance = (null)
supermin helper [00000ms] inputs[0] = /usr/lib64/guestfs/supermin.d
checking modpath /lib/modules/3.3.4-1.fc16.x86_64 is a directory
picked vmlinuz-3.3.4-1.fc16.x86_64 because modpath /lib/modules/3.3.4-1.fc16.x86_64 exists
checking modpath /lib/modules/3.3.4-3.fc16.x86_64 is a directory
picked vmlinuz-3.3.4-3.fc16.x86_64 because modpath /lib/modules/3.3.4-3.fc16.x86_64 exists
checking modpath /lib/modules/3.3.5-2.fc16.x86_64 is a directory
picked vmlinuz-3.3.5-2.fc16.x86_64 because modpath /lib/modules/3.3.5-2.fc16.x86_64 exists
supermin helper [00000ms] finished creating kernel
supermin helper [00001ms] visiting /usr/lib64/guestfs/supermin.d
supermin helper [00073ms] visiting /usr/lib64/guestfs/supermin.d/base.img
supermin helper [00080ms] visiting /usr/lib64/guestfs/supermin.d/daemon.img
supermin helper [00098ms] visiting /usr/lib64/guestfs/supermin.d/hostfiles
supermin helper [03203ms] visiting /usr/lib64/guestfs/supermin.d/init.img
supermin helper [03605ms] finished creating appliance
supermin helper [00000ms] whitelist = (not specified), host_cpu = x86_64, kernel = /tmp/guestfs.qPBEet/kernel, initrd = /tmp/guestfs.qPBEet/initrd, appliance = /tmp/guestfs.qPBEet/root
supermin helper [00000ms] inputs[0] = /usr/lib64/guestfs/supermin.d
checking modpath /lib/modules/3.3.4-1.fc16.x86_64 is a directory
picked vmlinuz-3.3.4-1.fc16.x86_64 because modpath /lib/modules/3.3.4-1.fc16.x86_64 exists
checking modpath /lib/modules/3.3.4-3.fc16.x86_64 is a directory
picked vmlinuz-3.3.4-3.fc16.x86_64 because modpath /lib/modules/3.3.4-3.fc16.x86_64 exists
checking modpath /lib/modules/3.3.5-2.fc16.x86_64 is a directory
picked vmlinuz-3.3.5-2.fc16.x86_64 because modpath /lib/modules/3.3.5-2.fc16.x86_64 exists
supermin helper [00000ms] finished creating kernel
supermin helper [02620ms] finished mke2fs
supermin helper [02621ms] visiting /usr/lib64/guestfs/supermin.d
supermin helper [02621ms] visiting /usr/lib64/guestfs/supermin.d/base.img
supermin helper [06528ms] visiting /usr/lib64/guestfs/supermin.d/daemon.img
supermin helper [06576ms] visiting /usr/lib64/guestfs/supermin.d/hostfiles
supermin helper [18756ms] visiting /usr/lib64/guestfs/supermin.d/init.img
supermin helper [29206ms] finished creating appliance
W, [2012-05-15T00:19:50.063980 #4575]  WARN -- : Loading SELinux policy failed. SELinux may be not fully initialized.
I, [2012-05-15T00:22:32.786026 #4575]  INFO -- : Executing post operations after build...
I, [2012-05-15T00:22:35.250434 #4575]  INFO -- : Base image for jeos-f16 appliance was built successfully.

It took around 15 minutes to build the VM in my environment.

the VM image will be built under the working directory where you issue boxgrinder-build command.
[root@fc16 fedora-plugin]# pwd
/root/Boxgrinder_works/build/appliances/x86_64/fedora/16/jeos-f16/1.0/fedora-plugin

[root@fc16 fedora-plugin]# ls
jeos-f16-sda.qcow2  jeos-f16.xml

[root@fc16 fedora-plugin]# file *.qcow2
jeos-f16-sda.qcow2: QEMU QCOW Image (v2), 1078984704 bytes

[root@fc16 fedora-plugin]# cat jeos-f16.xml
<image>
 <name>jeos-f16</name>
 <domain>
   <boot type='hvm'>
     <guest>
       <arch>x86_64</arch>
     </guest>
     <os>
       <loader dev='hd'/>
     </os>
     <drive disk='jeos-f16-sda.qcow2' target='hda'/>
   </boot>
   <devices>
     <vcpu>1</vcpu>
     <memory>262144</memory>
     <interface/>
     <graphics/>
   </devices>
 </domain>
 <storage>
   <disk file='jeos-f16-sda.qcow2' use='system' format='qcow2'/>
 </storage>
</image>


start the VM
[root@fc16 fedora-plugin]# qemu-kvm jeos-f16-sda.qcow2 -m 256


well ,,, what’s root user’s credential ???


it seems that root user’s credentials are “boxgrinder-pw”.

[root@fc16 modular]# pwd
/usr/lib/ruby/gems/1.8/gems/boxgrinder-build-0.10.1/integ/appliances/modular
[root@fc16 modular]# cat _os_password.appl
name: os-password
summary: create password
os:
 name: dummy-os
 version: 14
 password: boxgrinder-pw
post:
 base:
   - "/bin/echo 'true' > /os-password-boxgrinder-test"
 ec2:
   - "/bin/echo 'true' > /os-password-ec2-boxgrinder-test"
 vmware:
   - "/bin/echo 'true' > /os-password-vmware-boxgrinder-test"
 virtualbox:
   - "/bin/echo 'true' > /os-password-virtualbox-boxgrinder-test"



user : root
pass : boxgrinder-pw




nice tool !
You could build your custom virtual appliances easily with boxgrinder.