You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@vcl.apache.org by "Jeries, Ibrahim (Student)" <ib...@student.anglia.ac.uk> on 2011/09/20 20:21:48 UTC

Ubuntu Base image creation - VCL 2.2.1

Dear all,
Can anyone assist with a Backtrack 5 r1 (Ubuntu based) Base image creation?
I’m using:

1) CentOS 6.0

2) VCL 2.2.1

3) VMware ESX

4) BackTrack 5 r1 (BT) is a VM on the ESX Virtual Host.
I have followed the documentation under:
https://cwiki.apache.org/confluence/display/VCL/Create+a+Linux+Base+Image
As well as Andy’s solution in the following archive link:
http://www.mail-archive.com/vcl-dev@incubator.apache.org/msg01061.html
Andy’s script works perfectly fine on the BT VM (if ran locally) without any errors. However, when vcl tries to image BT, it pushes the CentOS/Red Hat variant of the script and overwrites the rc.local removing Andy’s script and causing the image capture to fail.
I would be grateful for any advise on the following:

1) vcld –setup, Select OS to be captured (install type: VMware), I choose option 1. Generic Linux (VMware), then the image architecture x86. Should I get a list of Linux OS’s to select from at any stage, i.e.: CentOS, or Fedora, Or Ubuntu, etc..?
2) Where should I place Andy’s script? I’ve placed on the BT VM under /etc/rc.local which gets overwritten as shown in the vcld.log snippet bellow.

Please note, I’m Linux newbie, however i've managed to successfully set up VCL so far and capture a Windows XP iamge as well as make successful reservation.

Many thanks.

Ibrahim

2011-09-20 09:57:20|9087|15:15|image|utils.pm:run_ssh_command(5464)|run_ssh_command output:
2011-09-20 09:57:20|9087|15:15|image|utils.pm:run_ssh_command(5478)|SSH command executed on vm1, returning (0, "")
2011-09-20 09:57:20|9087|15:15|image|Linux.pm:clear_private_keys(451)|cleared any id_rsa keys from /root/.ssh
2011-09-20 09:57:20|9087|15:15|image|utils.pm:run_scp_command(5600)|attempting to copy file via SCP: '/tmp/15.rc.local' --> 'vm1:/etc/rc.local'
2011-09-20 09:57:20|9087|15:15|image|utils.pm:run_scp_command(5636)|copied file via SCP: '/tmp/15.rc.local' --> 'vm1:/etc/rc.local'
2011-09-20 09:57:20|9087|15:15|image|utils.pm:run_ssh_command(5380)|executing SSH command on vm1:
|9087|15:15|image| /usr/bin/ssh -i /etc/vcl/vcl.key  -o StrictHostKeyChecking=no -l root -p 22 -x vm1 'chmod +rx /etc/rc.local' 2>&1
2011-09-20 09:57:20|9087|15:15|image|Linux.pm:generate_rc_local(2235)|executed chmod +rx /etc/rc.local, exit status: 0
2011-09-20 09:57:20|9087|15:15|image|utils.pm:run_scp_command(5600)|attempting to copy file via SCP: 'vm1:/etc/ssh/sshd_config' --> '/tmp/15.external_sshd_config'
2011-09-20 09:57:20|9087|15:15|image|utils.pm:run_scp_command(5636)|copied file via SCP: 'vm1:/etc/ssh/sshd_config' --> '/tmp/15.external_sshd_config'
2011-09-20 09:57:20|9087|15:15|image|Linux.pm:generate_ext_sshd_config(2279)|copied sshd_config from vm1 for local processing
2011-09-20 09:57:20|9087|15:15|image|utils.pm:run_scp_command(5600)|attempting to copy file via SCP: '/tmp/15.external_sshd_config' --> 'vm1:/etc/ssh/external_sshd_config'
2011-09-20 09:57:20|9087|15:15|image|utils.pm:run_scp_command(5636)|copied file via SCP: '/tmp/15.external_sshd_config' --> 'vm1:/etc/ssh/external_sshd_config'
2011-09-20 09:57:20|9087|15:15|image|Linux.pm:generate_ext_sshd_config(2323)|copied /tmp/15.external_sshd_config to vm1:/etc/ssh/external_sshd_config
2011-09-20 09:57:20|9087|15:15|image|utils.pm:run_scp_command(5600)|attempting to copy file via SCP: 'vm1:/etc/init.d/sshd' --> '/tmp/15.ext_sshd'

|9087|15:15|image| ---- WARNING ----
|9087|15:15|image| 2011-09-20 09:57:21|9087|15:15|image|utils.pm:run_scp_command(5628)|failed to copy via SCP: 'vm1:/etc/init.d/sshd' --> '/tmp/15.ext_sshd'
|9087|15:15|image| command: /usr/bin/scp -B -i /etc/vcl/vcl.key -P 22 -p -r vm1:/etc/init.d/sshd /tmp/15.ext_sshd 2>&1
|9087|15:15|image| output:
|9087|15:15|image| scp: /etc/init.d/sshd: No such file or directory
|9087|15:15|image| ( 0) utils.pm, run_scp_command (line: 5628)
|9087|15:15|image| (-1) Linux.pm, generate_ext_sshd_init (line: 2359)
|9087|15:15|image| (-2) Linux.pm, pre_capture (line: 173)
|9087|15:15|image| (-3) VMware.pm, capture (line: 556)
|9087|15:15|image| (-4) image.pm, process (line: 162)
|9087|15:15|image| (-5) vcld, make_new_child (line: 568)

|9087|15:15|image| ---- WARNING ----
|9087|15:15|image| 2011-09-20 09:57:21|9087|15:15|image|Linux.pm:generate_ext_sshd_init(2363)|failed to copied sshd init script from vm1 for local processing
|9087|15:15|image| ( 0) Linux.pm, generate_ext_sshd_init (line: 2363)
|9087|15:15|image| (-1) Linux.pm, pre_capture (line: 173)
|9087|15:15|image| (-2) VMware.pm, capture (line: 556)
|9087|15:15|image| (-3) image.pm, process (line: 162)
|9087|15:15|image| (-4) vcld, make_new_child (line: 568)
|9087|15:15|image| (-5) vcld, main (line: 346)

|9087|15:15|image| ---- WARNING ----
|9087|15:15|image| 2011-09-20 09:57:21|9087|15:15|image|Linux.pm:pre_capture(174)|unable to generate /etc/init.d/ext_sshd on vm1
|9087|15:15|image| ( 0) Linux.pm, pre_capture (line: 174)
|9087|15:15|image| (-1) VMware.pm, capture (line: 556)
|9087|15:15|image| (-2) image.pm, process (line: 162)
|9087|15:15|image| (-3) vcld, make_new_child (line: 568)
|9087|15:15|image| (-4) vcld, main (line: 346)


|9087|15:15|image| ---- WARNING ----
|9087|15:15|image| 2011-09-20 09:57:21|9087|15:15|image|VMware.pm:capture(557)|failed to complete OS module's pre_capture tasks
|9087|15:15|image| ( 0) VMware.pm, capture (line: 557)
|9087|15:15|image| (-1) image.pm, process (line: 162)
|9087|15:15|image| (-2) vcld, make_new_child (line: 568)
|9087|15:15|image| (-3) vcld, main (line: 346)

|9087|15:15|image| ---- WARNING ----
|9087|15:15|image| 2011-09-20 09:57:21|9087|15:15|image|image.pm:process(166)|vmwarelinux-BaseBT5r16-v0 image failed to be captured by provisioning module
|9087|15:15|image| ( 0) image.pm, process (line: 166)
|9087|15:15|image| (-1) vcld, make_new_child (line: 568)
|9087|15:15|image| (-2) vcld, main (line: 346)

2011-09-20 09:57:21|9087|15:15|image|DataStructure.pm:get_computer_private_ip_address(1557)|returning private IP address previously retrieved: 172.16.20.100
2011-09-20 09:57:21|9087|15:15|image|utils.pm:is_inblockrequest(6163)|zero rows were returned from database select
2011-09-20 09:57:21|9087|15:15|image|DataStructure.pm:get_image_affiliation_name(2035)|image owner id: 1
2011-09-20 09:57:21|9087|15:15|image|utils.pm:getnewdbh(2709)|database requested (information_schema) does not match handle stored in $ENV{dbh} (vcl:localhost)
2011-09-20 09:57:21|9087|15:15|image|utils.pm:getnewdbh(2760)|database handle stored in $ENV{dbh}
2011-09-20 09:57:21|9087|15:15|image|DataStructure.pm:retrieve_user_data(1352)|attempting to retrieve and store data for user: user.id = '1'
2011-09-20 09:57:21|9087|15:15|image|utils.pm:getnewdbh(2709)|database requested (vcl) does not match handle stored in $ENV{dbh} (information_schema:localhost)
2011-09-20 09:57:21|9087|15:15|image|utils.pm:getnewdbh(2760)|database handle stored in $ENV{dbh}
2011-09-20 09:57:21|9087|15:15|image|DataStructure.pm:retrieve_user_data(1415)|data has been retrieved for user: admin (id: 1)
2011-09-20 09:57:21|9087|15:15|image|utils.pm:mail(1255)|SUCCESS -- Sending mail To: root@vclserver01.com, PROBLEM -- 15:15|image|image.pm|vm1>esxi|vmwarelinux-BaseBT5r16-v0|admin

|9087|15:15|image| ---- CRITICAL ----
|9087|15:15|image| 2011-09-20 09:57:21|9087|15:15|image|image.pm:reservation_failed(385)|vmwarelinux-BaseBT5r16-v0 image creation failed
|9087|15:15|image| ( 0) image.pm, reservation_failed (line: 385)
|9087|15:15|image| (-1) image.pm, process (line: 167)
|9087|15:15|image| (-2) vcld, make_new_child (line: 568)
|9087|15:15|image| (-3) vcld, main (line: 346)
2011-09-20 09:57:21|9087|15:15|image|utils.pm:mail(1255)|SUCCESS -- Sending mail To: root@localhost, VCL -- NOTICE DELAY Image Creation BaseBT5r1
2011-09-20 09:57:21|9087|15:15|image|utils.pm:mail(1255)|SUCCESS -- Sending mail To: root@vclserver01.com, VCL -- NOTICE FAILED Image Creation BaseBT5r1
2011-09-20 09:57:21|9087|15:15|image|utils.pm:update_request_state(1991)|request 15 state updated to: maintenance, laststate to: image
2011-09-20 09:57:21|9087|15:15|image|image.pm:reservation_failed(437)|request state set to maintenance, laststate to image
2011-09-20 09:57:21|9087|15:15|image|utils.pm:update_computer_state(2033)|computer 2 state updated to: maintenance
2011-09-20 09:57:21|9087|15:15|image|image.pm:reservation_failed(445)|vm1 state set to maintenance
2011-09-20 09:57:21|9087|15:15|image|image.pm:reservation_failed(452)|exiting
2011-09-20 09:57:21|9087|15:15|image|State.pm:DESTROY(829)|VCL::image destructor called, address: 23c9978
2011-09-20 09:57:21|9087|15:15|image|utils.pm:delete_computerloadlog_reservation(6742)|removing computerloadlog entries matching loadstate = begin
2011-09-20 09:57:21|9087|15:15|image|utils.pm:delete_computerloadlog_reservation(6789)|deleted rows from computerloadlog for reservation id=15
2011-09-20 09:57:21|9087|15:15|image|State.pm:DESTROY(848)|number of database handles state process created: 3
2011-09-20 09:57:21|9087|15:15|image|State.pm:DESTROY(876)|VCL::image process duration: 357 seconds
2011-09-20 09:57:21|13128|vcld:REAPER(718)|VCL process exited for reservation 15, PID: 9087, signal: CHLD