RE: Error at 473 in /var/www/html/vcl/.ht-inc/computers.php

2011-09-17 Thread Jeries, Ibrahim (Student)
Andy, 

Many thanks for all your support.
I figured that i disturbed the database by editing some fields via phpMyAdmin 
and therefore ended up deleting the VCL database and starting from scratch by 
recreating and importing the default vcl.sql db. 
I then fixed the DHCP on the public interface, recreated the base image and it 
all worked like a charm. 

Many thanks, 

Ibrahim


From: Andy Kurth [andy_ku...@ncsu.edu]
Sent: 15 September 2011 14:55
To: vcl-user@incubator.apache.org
Subject: Re: Error at 473 in /var/www/html/vcl/.ht-inc/computers.php

The reason your reservations are failing is because DHCP isn't working
correctly for the public interface.  The VM (vm2) appears to have
loaded successfully but was unable to get a valid DHCP-assigned public
IP address.  Make sure that your public DHCP server can assign an
address to the public MAC address assigned to the VM:
00:50:56:00:00:06.  The 'Failed to update private IP address' error in
the log file is actually a typo in the code.  It should say 'Failed to
update public IP address'.

I would troubleshoot by logging into the VM via the VMware console as
root -- the default password is in the vcld.conf file.  Run 'tail -f
/var/log/messages | grep dhcpd' on the DHCP server and then run
'ipconfig /release Public' and 'ipconfig /renew Public' on the VM.
There is no point in continuing to attempt to reload VMs via the VCL
interface until this is resolved.

I'm not sure what's causing the web page errors you are seeing.  In
addition to the table output you sent earlier, please also send the
contents of the vmhost, vmprofile, and resource tables.

Once DHCP is fixed, you can set the state of the VM to 'Available' via
the VCL website - Manage Computers  Computer Utilities.  Then try to
make a reservation.


-Andy



On Tue, Sep 13, 2011 at 5:32 PM, Jeries, Ibrahim (Student)
ibrahim.jeri...@student.anglia.ac.uk wrote:
 Ooops sorry I misread your post.
 Please find attached vcld.log. The “Failed to update private ip address” 
 error occurred on 2011-09-10 20:51:53

 Many thanks,

 Ibrahim

 
 From: Andy Kurth [andy_ku...@ncsu.edu]
 Sent: 13 September 2011 21:32
 To: vcl-user@incubator.apache.org
 Subject: Re: Error at 473 in /var/www/html/vcl/.ht-inc/computers.php

 No, the noimage image should NOT be deleted.  I said in the previous
 post that if you had deleted it that it needs to be added back.  I've
 seen this done before.

 Your database entries look correct.  Please send the vcld.log output
 from the reservation where the Failed to update private IP address
 error occurred.

 -Andy

 On Tue, Sep 13, 2011 at 3:07 PM, Jeries, Ibrahim (Student)
 ibrahim.jeri...@student.anglia.ac.uk wrote:
 Andy,
 Many thanks.
 I can confirm that id 4 in the image table is the “no image” as you 
 explained.
 However, I am unable to delete it when issuing the DELETE command while 
 using the VCL database.
 mysql DELETE FROM image WHERE id=4;
 ERROR 1451 (23000): Cannot delete or update a parent row: a foreign key 
 constraint fails (`vcl_db`.`computer`, CONSTRAINT `computer_ibfk_36` FOREIGN 
 KEY (`currentimageid`) REFERENCES `image` (`id`) ON UPDATE CASCADE)
 If attempted using phpMyAdmin, the following is displayed:
 Error
 SQL query:
 DELETE FROM `vcl_db`.`image` WHERE `image`.`id` =4
 MySQL said: Documentation
 #1451 - Cannot delete or update a parent row: a foreign key constraint fails 
 (`vcl_db`.`computer`, CONSTRAINT `computer_ibfk_36` FOREIGN KEY 
 (`currentimageid`) REFERENCES `image` (`id`) ON UPDATE CASCADE)
 Please note, the self created ESXi profile “image” field is currently 
 pointing to the XP base image for some reason should this make a difference?
 Please see table’s info below as requested.

 Regards,
 Ibrahim

 Database changed
 mysql SELECT * FROM computer;
 ++-+-++++-+-+---++---+-+--++--+---+---+++---+-+---+---+--+--++--++--+-+--+--+
 | id | stateid | ownerid | platformid | scheduleid | currentimageid | 
 nextimageid | imagerevisionid | RAM   | procnumber | procspeed | network | 
 hostname | IPaddress  | privateIPaddress | eth0macaddress| 
 eth1macaddress| type   | provisioningid | drivetype | deleted | 
 notes | lastcheck | location | dsa  | dsapub | rsa  | rsapub | host | 
 hostpub | vmhostid | vmtypeid

Re: Error at 473 in /var/www/html/vcl/.ht-inc/computers.php

2011-09-15 Thread Andy Kurth
The reason your reservations are failing is because DHCP isn't working
correctly for the public interface.  The VM (vm2) appears to have
loaded successfully but was unable to get a valid DHCP-assigned public
IP address.  Make sure that your public DHCP server can assign an
address to the public MAC address assigned to the VM:
00:50:56:00:00:06.  The 'Failed to update private IP address' error in
the log file is actually a typo in the code.  It should say 'Failed to
update public IP address'.

I would troubleshoot by logging into the VM via the VMware console as
root -- the default password is in the vcld.conf file.  Run 'tail -f
/var/log/messages | grep dhcpd' on the DHCP server and then run
'ipconfig /release Public' and 'ipconfig /renew Public' on the VM.
There is no point in continuing to attempt to reload VMs via the VCL
interface until this is resolved.

I'm not sure what's causing the web page errors you are seeing.  In
addition to the table output you sent earlier, please also send the
contents of the vmhost, vmprofile, and resource tables.

Once DHCP is fixed, you can set the state of the VM to 'Available' via
the VCL website - Manage Computers  Computer Utilities.  Then try to
make a reservation.


-Andy



On Tue, Sep 13, 2011 at 5:32 PM, Jeries, Ibrahim (Student)
ibrahim.jeri...@student.anglia.ac.uk wrote:
 Ooops sorry I misread your post.
 Please find attached vcld.log. The “Failed to update private ip address” 
 error occurred on 2011-09-10 20:51:53

 Many thanks,

 Ibrahim

 
 From: Andy Kurth [andy_ku...@ncsu.edu]
 Sent: 13 September 2011 21:32
 To: vcl-user@incubator.apache.org
 Subject: Re: Error at 473 in /var/www/html/vcl/.ht-inc/computers.php

 No, the noimage image should NOT be deleted.  I said in the previous
 post that if you had deleted it that it needs to be added back.  I've
 seen this done before.

 Your database entries look correct.  Please send the vcld.log output
 from the reservation where the Failed to update private IP address
 error occurred.

 -Andy

 On Tue, Sep 13, 2011 at 3:07 PM, Jeries, Ibrahim (Student)
 ibrahim.jeri...@student.anglia.ac.uk wrote:
 Andy,
 Many thanks.
 I can confirm that id 4 in the image table is the “no image” as you 
 explained.
 However, I am unable to delete it when issuing the DELETE command while 
 using the VCL database.
 mysql DELETE FROM image WHERE id=4;
 ERROR 1451 (23000): Cannot delete or update a parent row: a foreign key 
 constraint fails (`vcl_db`.`computer`, CONSTRAINT `computer_ibfk_36` FOREIGN 
 KEY (`currentimageid`) REFERENCES `image` (`id`) ON UPDATE CASCADE)
 If attempted using phpMyAdmin, the following is displayed:
 Error
 SQL query:
 DELETE FROM `vcl_db`.`image` WHERE `image`.`id` =4
 MySQL said: Documentation
 #1451 - Cannot delete or update a parent row: a foreign key constraint fails 
 (`vcl_db`.`computer`, CONSTRAINT `computer_ibfk_36` FOREIGN KEY 
 (`currentimageid`) REFERENCES `image` (`id`) ON UPDATE CASCADE)
 Please note, the self created ESXi profile “image” field is currently 
 pointing to the XP base image for some reason should this make a difference?
 Please see table’s info below as requested.

 Regards,
 Ibrahim

 Database changed
 mysql SELECT * FROM computer;
 ++-+-++++-+-+---++---+-+--++--+---+---+++---+-+---+---+--+--++--++--+-+--+--+
 | id | stateid | ownerid | platformid | scheduleid | currentimageid | 
 nextimageid | imagerevisionid | RAM   | procnumber | procspeed | network | 
 hostname | IPaddress      | privateIPaddress | eth0macaddress    | 
 eth1macaddress    | type           | provisioningid | drivetype | deleted | 
 notes | lastcheck | location | dsa  | dsapub | rsa  | rsapub | host | 
 hostpub | vmhostid | vmtypeid |
 ++-+-++++-+-+---++---+-+--++--+---+---+++---+-+---+---+--+--++--++--+-+--+--+
 |  1 |      20 |       1 |          1 |          1 |              4 |        
    4 |               4 | 12285 |          4 |      1990 |    1000 | esxi     
 | 172.16.20.20   | NULL             | NULL              | NULL              
 | blade          |              6 | hda       |       0 |       | NULL      
 | NULL     | NULL | NULL   | NULL | NULL   | NULL | NULL    |     NULL |     
 NULL |
 |  3 |      10 |       1 |          1 |          1 |              4 |        
    4 |               4 |  1024 |          1 |      1990 |    1000 | vm1

Re: Error at 473 in /var/www/html/vcl/.ht-inc/computers.php

2011-09-13 Thread Andy Kurth
This looks like it may be a problem in the database.  The line in
computers.php where error is occurring is attempting to print out the
name of the current image loaded on the computer.  The ID of the image
is 4 -- which should be the noimage image: Unkown error type: [8]
Undefined index: 4

By chance delete the noimage image from the database?  If so, you'll
need to add it back.  If not, please include the output from:
SELECT * FROM computer
SELECT * FROM image
SELECT * FROM imagerevision

Regards,
Andy



On Mon, Sep 12, 2011 at 2:25 PM, Jeries, Ibrahim (Student)
ibrahim.jeri...@student.anglia.ac.uk wrote:
 Dear all,



 Can anyone help with following issue?

 The network consist of:

 A CentOS 6.0 x64 server housing VCL 2.2.1 Management node, Web components
 and MySQL db. It is also a DHCP server serving both, the LAN (private) and
 WAN (public) networks.

 An ESXi 4.1 hypervisor housing 2 Virtual Machines (VMs) at the moment, 1 VM
 is an XP SP3, standard build with Cygwin fully functional. The 2nd VM is
 a BackTrack 5 r1 (Debian/Ubuntu based) with SSH enabled.

 Each machine have have 2 NICs, a public NIC connecting to the internet and a
 private NIC for the VCL management traffic as well as LAN connectivity.



 VCL was fully functional and allowed me to successfully create a base image
 of the XP VM. I then added the XP base image to a group (allVMImage) via the
 web interface using the default “admin” account.

 I then requested a “New reservation” of that XP image. 2 mins later while
 processing the reservation, it failed with error “Confirming image exists
 (22) Failed to update private IP address”.



 Since, the “New Reservation” page displays the normal reservation options
 but with a line of red text “Selection not currently available” and the
 “View Time Table” button instead of the “Reserve/submit” button.

 Clicking the “View time table” button shows a blank page with a single line:
 “There are currently no computers available that can run the application you
 selected.”

 I am unable to follow this mail archive suggestion:
 http://www.mail-archive.com/vcl-dev@incubator.apache.org/msg01706.html
 because if I navigate to Mange Computers - All VM Computers, or
 allComputers, or newvmimages (Edit computer information) I get the following
 error:

 Computers

 Error encountered
 Unkown error type: [8] Undefined index: 4
 Error at 473 in /var/www/html/vcl/.ht-inc/computers.php



 And if I try commenting out line 3720 through 3734 in utils.php as per:
 http://www.mail-archive.com/vcl-dev@incubator.apache.org/msg01588.html
 the VCL web portal does not load up (blank browser page), tested in FireFox
 6.0, IE 8 and Chrome 4.1.249..



 All of the above was setup according to VCL docs:
 https://cwiki.apache.org/VCL/vcl-221-installation.html.

 What I would really like, is to:

 1)   Be able to place new reservation again

 2)   Create a base image of the Backtrack VM and make it an available
 image for users to reserve and use.



 One last thing, I had to crate an additional ESXi profile to point to the
 correct Datastore should this matter.



 Any help/pointers are greatly appreciated.



 Kind regards,



 Ibrahim


RE: Error at 473 in /var/www/html/vcl/.ht-inc/computers.php

2011-09-13 Thread Jeries, Ibrahim (Student)
 |
++++-++--+-++---+--++---++-+--+-+-++-+---+--+---+++
|  4 | noimage| No Image   |   1 |  1 |2 |
NULL |  0 | 1 |0 | 10 |  NULL | 
 0 |   0 |0 | NULL|   0 |  0 | 
vcl |  1450 | x86  | NULL  | NULL   
|   
   0 |
|  7 | vmwarewinxp-xp7-v0 | xp |   1 |  1 |   16 |  
 6 |   1024 | 1 | 1990 |   1000 |  NULL |   
  10 |   0 |0 | 2011-09-10 18:39:56 |   1 |  0 | 
vcl | 10240 | x86  | MS Windows SP SP3 standard build. | RDP cannot 
be used at the moment due to networking permissions. VCL admin. |   
   4 |
++++-++--+-++---+--++---++-+--+-+-++-+---+--+---+++
2 rows in set (0.00 sec)

mysql
mysql SELECT * FROM imagerevision;
++-+--++-+-+-++--++
| id | imageid | revision | userid | datecreated | deleted | 
datedeleted | production | comments | imagename  |
++-+--++-+-+-++--++
|  4 |   4 |0 |  1 | 1980-01-01 00:00:00 |   0 | NULL   
 |  1 | NULL | noimage|
|  7 |   7 |0 |  1 | 2011-09-10 18:39:56 |   0 | NULL   
 |  1 | NULL | vmwarewinxp-xp7-v0 |
++-+--++-+-+-++--++
2 rows in set (0.00 sec)
mysql



From: Andy Kurth [andy_ku...@ncsu.edu]
Sent: 13 September 2011 17:19
To: vcl-user@incubator.apache.org
Subject: Re: Error at 473 in /var/www/html/vcl/.ht-inc/computers.php

This looks like it may be a problem in the database.  The line in
computers.php where error is occurring is attempting to print out the
name of the current image loaded on the computer.  The ID of the image
is 4 -- which should be the noimage image: Unkown error type: [8]
Undefined index: 4

By chance delete the noimage image from the database?  If so, you'll
need to add it back.  If not, please include the output from:
SELECT * FROM computer
SELECT * FROM image
SELECT * FROM imagerevision

Regards,
Andy



On Mon, Sep 12, 2011 at 2:25 PM, Jeries, Ibrahim (Student)
ibrahim.jeri...@student.anglia.ac.uk wrote:
 Dear all,



 Can anyone help with following issue?

 The network consist of:

 A CentOS 6.0 x64 server housing VCL 2.2.1 Management node, Web components
 and MySQL db. It is also a DHCP server serving both, the LAN (private) and
 WAN (public) networks.

 An ESXi 4.1 hypervisor housing 2 Virtual Machines (VMs) at the moment, 1 VM
 is an XP SP3, standard build with Cygwin fully functional. The 2nd VM is
 a BackTrack 5 r1 (Debian/Ubuntu based) with SSH enabled.

 Each machine have have 2 NICs, a public NIC connecting to the internet and a
 private NIC for the VCL management traffic as well as LAN connectivity.



 VCL was fully functional and allowed me to successfully create a base image
 of the XP VM. I then added the XP base image to a group (allVMImage) via the
 web interface using the default “admin” account.

 I then requested a “New reservation” of that XP image. 2 mins later while
 processing the reservation, it failed with error “Confirming image exists
 (22) Failed to update private IP address”.



 Since, the “New Reservation” page displays the normal reservation options
 but with a line of red text “Selection not currently available” and the
 “View Time Table” button instead of the “Reserve/submit” button.

 Clicking the “View time table” button shows a blank page with a single line:
 “There are currently no computers available that can run the application you
 selected.”

 I am unable to follow this mail archive suggestion:
 http://www.mail-archive.com/vcl-dev@incubator.apache.org/msg01706.html
 because if I navigate to Mange Computers - All VM Computers, or
 allComputers, or newvmimages (Edit computer information) I get the following
 error:

 Computers

 Error encountered
 Unkown error type: [8] Undefined index: 4
 Error at 473 in /var/www/html/vcl/.ht-inc/computers.php



 And if I try commenting out line 3720 through 3734 in utils.php as per:
 http://www.mail-archive.com/vcl-dev@incubator.apache.org/msg01588.html
 the VCL web

Error at 473 in /var/www/html/vcl/.ht-inc/computers.php

2011-09-12 Thread Jeries, Ibrahim (Student)
Dear all,

Can anyone help with following issue?
The network consist of:
A CentOS 6.0 x64 server housing VCL 2.2.1 Management node, Web components and 
MySQL db. It is also a DHCP server serving both, the LAN (private) and WAN 
(public) networks.
An ESXi 4.1 hypervisor housing 2 Virtual Machines (VMs) at the moment, 1 VM is 
an XP SP3, standard build with Cygwin fully functional. The 2nd VM is a 
BackTrack 5 r1 (Debian/Ubuntu based) with SSH enabled.
Each machine have have 2 NICs, a public NIC connecting to the internet and a 
private NIC for the VCL management traffic as well as LAN connectivity.

VCL was fully functional and allowed me to successfully create a base image of 
the XP VM. I then added the XP base image to a group (allVMImage) via the web 
interface using the default “admin” account.
I then requested a “New reservation” of that XP image. 2 mins later while 
processing the reservation, it failed with error “Confirming image exists (22) 
Failed to update private IP address”.

Since, the “New Reservation” page displays the normal reservation options but 
with a line of red text “Selection not currently available” and the “View Time 
Table” button instead of the “Reserve/submit” button.
Clicking the “View time table” button shows a blank page with a single line: 
“There are currently no computers available that can run the application you 
selected.”
I am unable to follow this mail archive suggestion: 
http://www.mail-archive.com/vcl-dev@incubator.apache.org/msg01706.html because 
if I navigate to Mange Computers - All VM Computers, or allComputers, or 
newvmimages (Edit computer information) I get the following error:
Computers
Error encountered
Unkown error type: [8] Undefined index: 4
Error at 473 in /var/www/html/vcl/.ht-inc/computers.php

And if I try commenting out line 3720 through 3734 in utils.php as per: 
http://www.mail-archive.com/vcl-dev@incubator.apache.org/msg01588.html the VCL 
web portal does not load up (blank browser page), tested in FireFox 6.0, IE 8 
and Chrome 4.1.249..

All of the above was setup according to VCL docs: 
https://cwiki.apache.org/VCL/vcl-221-installation.html.
What I would really like, is to:

1)   Be able to place new reservation again

2)   Create a base image of the Backtrack VM and make it an available image 
for users to reserve and use.

One last thing, I had to crate an additional ESXi profile to point to the 
correct Datastore should this matter.

Any help/pointers are greatly appreciated.

Kind regards,

Ibrahim