You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@vcl.apache.org by Mark Gardner <mk...@vt.edu> on 2011/08/04 22:50:42 UTC

VCL Bootcamp notes on creating base images

Are the notes from the recent VCL bootcamp discussing how to create base
images up somewhere?

Mark

-- 
Mark Gardner
--

Re: VCL Bootcamp notes on creating base images

Posted by Mark Gardner <mk...@vt.edu>.
Thanks Aaron,

I couldn't see anything wrong when I logged in so I tried it again and it
worked. In fact, I have been able to make successful two reservations to the
single VM instance I have available (after a suitable delay while the VM was
made ready again). Perhaps I was in to big of hurry last time. Anyway,
thanks for your help. I will be switching hats now and asking questions on
vcl-dev.

Mark

-- 
Mark Gardner
--

Re: VCL Bootcamp notes on creating base images

Posted by Aaron Peeler <aa...@ncsu.edu>.
Hi Mark,

Sorry on the delay I got wrapped up in the kvm module.

It appears something is happening on the OS to prevent logins. On line
493 it succeeds on the first pre-load command and reports to have
successfully changed the root passwd, but then it fails on other calls
through ssh - output at line 500 (ssh: connect to host vm-1 port 22:
Connection refused).

Can you try to ping and also try to ssh to the node? You may have to
login on the console and look at the /etc/rc.local file to compare
which IP is being set for the ListenAddress in the
/etc/ssh/sshd_config file.

Aaron



On Tue, Aug 16, 2011 at 10:09 AM, Mark Gardner <mk...@vt.edu> wrote:
> Anyone had a chance to look through the vcld log I sent? I am kind of stuck
> trying to figure out why the image I captured is failing when I make a
> reservation.
> Mark
>
> --
> Mark Gardner
> --
>



-- 
Aaron Peeler
Program Manager
Virtual Computing Lab
NC State University

All electronic mail messages in connection with State business which
are sent to or received by this account are subject to the NC Public
Records Law and may be disclosed to third parties.

Re: VCL Bootcamp notes on creating base images

Posted by Mark Gardner <mk...@vt.edu>.
Anyone had a chance to look through the vcld log I sent? I am kind of stuck
trying to figure out why the image I captured is failing when I make a
reservation.

Mark

-- 
Mark Gardner
--

Re: VCL Bootcamp notes on creating base images

Posted by Mark Gardner <mk...@vt.edu>.
That helped. I now have an image captured but it fails when I try to make a
reservation:

|4223|8:8|new| ---- CRITICAL ----
|4223|8:8|new| 2011-08-12
15:15:03|4223|8:8|new|State.pm:reservation_failed(213)|reservation failed on
vm-1: failed to update private IP address
|4223|8:8|new| ( 0) State.pm, reservation_failed (line: 213)
|4223|8:8|new| (-1) new.pm, reserve_computer (line: 894)
|4223|8:8|new| (-2) new.pm, process (line: 363)
|4223|8:8|new| (-3) vcld, make_new_child (line: 568)
|4223|8:8|new| (-4) vcld, main (line: 346)


I am including the portion of the log covering the attempt to make the
reservation.

I am confused as to why it failed. I log in to the machine (using ssh with
the /etc/vcl/vcl.key) and both private and public addresses are what I
expect. Not sure why it was trying to update the IP address and why it
failed.

Note: one wrinkle here is I have only one public IP address that I can use
for VMs. So I have configured the base image for that address to be
statically assigned. (My next task after getting this working is to adapt
VCL to use IPv6 so I have plenty of addresses!) I don't think that is the
problem since it is complaining that it cannot update the private IP
address.

Mark

-- 
Mark Gardner
--

Re: VCL Bootcamp notes on creating base images

Posted by Andy Kurth <an...@ncsu.edu>.
Hi Mark,
It looks like the MAC addresses aren't set for the VM computer that is
being loaded.  This will happen if you attempt to add a single
computer rather than selecting the "Add Multiple" option.  There isn't
currently a way to populate these values via the website so you'll
either have to
-edit the database to set the MAC address values for the VM computer
or
-delete the VM, then add multiple VMs back via the website.

The database can be updated with a query like this:
UPDATE computer SET eth0macaddress='00:50:56:01:01:01',
eth1macaddress='00:50:56:01:01:02' WHERE hostname = 'vm-1';

Hope this helps,
Andy

On Mon, Aug 8, 2011 at 3:45 PM, Mark Gardner <mk...@vt.edu> wrote:
> I appear to be sneaking up on it... However image capture failed again.
> I am enclosing an excerpt from the log. Not sure what the problem is but it
> appears that it found a vmdk when it didn't expect to find one. This may be
> due to my misconfiguration of the VMHost - local storage. I specified the
> Data Store Path to be /vmfs/volumes/datastore1/datastore and the Repository
> Path to be /vmfs/volumes/datastore1/repository and created those
> directories.
> Mark
>
> --
> Mark Gardner
> --
>

Re: VCL Bootcamp notes on creating base images

Posted by Mark Gardner <mk...@vt.edu>.
I appear to be sneaking up on it... However image capture failed again.

I am enclosing an excerpt from the log. Not sure what the problem is but it
appears that it found a vmdk when it didn't expect to find one. This may be
due to my misconfiguration of the VMHost - local storage. I specified the
Data Store Path to be /vmfs/volumes/datastore1/datastore and the Repository
Path to be /vmfs/volumes/datastore1/repository and created those
directories.

Mark

-- 
Mark Gardner
--

Re: VCL Bootcamp notes on creating base images

Posted by Aaron Peeler <aa...@ncsu.edu>.
You'll need to use mysql or phpmyadmin to change an active host's vmprofile.

The profile is assigned in the vmhost

Get the id from the vmprofile table - the VMware ESX - local storage
profile is id 4

The update the vmhost table for that host.
This query assumes that you only have one vmhost in your vmhost table
or it's ok to change all of them:

update vmhost SET vmprofileid =4;


I think the restriction on not being able change an active vmhosts
profile to another profile was an oversight or it was related to xcat
based hypervisor installs. Regardless, I added a jira issue for it to
get fixed.
https://issues.apache.org/jira/browse/VCL-495

Aaron

On Fri, Aug 5, 2011 at 12:55 PM, Mark Gardner <mk...@vt.edu> wrote:
> OK next problem: I selected VMware "ESX - local & network storage"
> originally for the VM host profile as that is what we used during the
> bootcamp but the paths are wrong (e.g., /vmfs/volumes/local-datastore vs
> /vmfs/volumes/datastore1). I can edit the profile but in reality it should
> be "VMware ESX - local storage" (I will still need to correct the path). How
> do I change which profile is associated with a VM host?
> Mark
> --
> Mark Gardner
> --
>



-- 
Aaron Peeler
Program Manager
Virtual Computing Lab
NC State University

All electronic mail messages in connection with State business which
are sent to or received by this account are subject to the NC Public
Records Law and may be disclosed to third parties.

Re: VCL Bootcamp notes on creating base images

Posted by Mark Gardner <mk...@vt.edu>.
OK next problem: I selected VMware "ESX - local & network storage"
originally for the VM host profile as that is what we used during the
bootcamp but the paths are wrong (e.g., /vmfs/volumes/local-datastore vs
/vmfs/volumes/datastore1). I can edit the profile but in reality it should
be "VMware ESX - local storage" (I will still need to correct the path). How
do I change which profile is associated with a VM host?

Mark

-- 
Mark Gardner
--

Re: VCL Bootcamp notes on creating base images

Posted by Aaron Peeler <aa...@ncsu.edu>.
It depends. I don't recall if the image capture request out right
fails and gets removed when vm-1 is in maintenance mode or not.

To check you can use mysql and run
select * from request;
If there is a request listed in maintenance state (statid=10) then you
could change the stateid back to image (stateid=16)

Or you can use vcld --setup again and give it a different image name.
(This is the easiest path and what I would recommend.)

Aaron


On Fri, Aug 5, 2011 at 12:11 PM, Mark Gardner <mk...@vt.edu> wrote:
> On Fri, Aug 5, 2011 at 10:49 AM, Aaron Peeler <aa...@ncsu.edu> wrote:
>>
>> Yes  Is this what your looking for:
>> https://cwiki.apache.org/confluence/display/VCL/Create+a+Linux+Base+Image
>>
>> Also I see vm-1 is in maintenance mode -
>> go to your Virtual Hosts tool on the VCL portal,
>> select the host - click the configure host
>> add vm-1 to esxi-host-1
>>
>> The image capture process will detect that vm-1 is in maintenance mode
>> and stop the process.
>>
>> Aaron
>
> I corrected that and started the image capture with vcld --setup. It stopped
> because I had forgotten to put vm-1 into /etc/hosts. I have fixed it but now
> vcld --setup complains "ERROR: failed to insert into image table" and won't
> continue. It seems like data that got entered into the database needs to be
> removed. Do I jump into mysql or is there a better way?
> Mark
> --
> Mark Gardner
> --
>



-- 
Aaron Peeler
Program Manager
Virtual Computing Lab
NC State University

All electronic mail messages in connection with State business which
are sent to or received by this account are subject to the NC Public
Records Law and may be disclosed to third parties.

Re: VCL Bootcamp notes on creating base images

Posted by Mark Gardner <mk...@vt.edu>.
On Fri, Aug 5, 2011 at 10:49 AM, Aaron Peeler <aa...@ncsu.edu> wrote:

> Yes  Is this what your looking for:
> https://cwiki.apache.org/confluence/display/VCL/Create+a+Linux+Base+Image
>
> Also I see vm-1 is in maintenance mode -
> go to your Virtual Hosts tool on the VCL portal,
> select the host - click the configure host
> add vm-1 to esxi-host-1
>
> The image capture process will detect that vm-1 is in maintenance mode
> and stop the process.
>
> Aaron


I corrected that and started the image capture with vcld --setup. It stopped
because I had forgotten to put vm-1 into /etc/hosts. I have fixed it but now
vcld --setup complains "ERROR: failed to insert into image table" and won't
continue. It seems like data that got entered into the database needs to be
removed. Do I jump into mysql or is there a better way?

Mark

-- 
Mark Gardner
--

Re: VCL Bootcamp notes on creating base images

Posted by Aaron Peeler <aa...@ncsu.edu>.
Yes  Is this what your looking for:
https://cwiki.apache.org/confluence/display/VCL/Create+a+Linux+Base+Image

Also I see vm-1 is in maintenance mode -
go to your Virtual Hosts tool on the VCL portal,
select the host - click the configure host
add vm-1 to esxi-host-1

The image capture process will detect that vm-1 is in maintenance mode
and stop the process.

Aaron



On Fri, Aug 5, 2011 at 10:26 AM, Mark Gardner <mk...@vt.edu> wrote:
> Thanks Aaron.
> On Fri, Aug 5, 2011 at 9:59 AM, Aaron Peeler <aa...@ncsu.edu> wrote:
>>
>> The first one means you have to have computer nodes and the exsi host
>> added to the vcl database.
>
> I think I have the ESXi host added to the database (through the web GUI). I
> also added a VM. They show up in Manage Computers->Computer Utilities as
> shown below:
> Hostname     IP Address  State        Owner        Schedule  Current Image
>  Next Image  VM Host
> esxi-host-1  <pubIP1>    vmhostinuse  admin@Local  VCL 24x7  No Image
>   No Image    N/A
> vm-1         <pubIP2>    maintenance  admin@Local  VCL 24x7  No Image
>   No Image    N/A
>>
>> The vcld --setup tool pulls the target node and esxi host information
>> from the database.
>>
>> Aaron
>
>
> I think I remembered another detail from the bootcamp. We were supposed to
> create an OS installation outside of VCL (in other words not using a
> reservation but directly in ESXi). That is the image that is pulled in
> through vcld --setup, right?
> Mark
> --
> Mark Gardner
> --
>



-- 
Aaron Peeler
Program Manager
Virtual Computing Lab
NC State University

All electronic mail messages in connection with State business which
are sent to or received by this account are subject to the NC Public
Records Law and may be disclosed to third parties.

Re: VCL Bootcamp notes on creating base images

Posted by Mark Gardner <mk...@vt.edu>.
Thanks Aaron.

On Fri, Aug 5, 2011 at 9:59 AM, Aaron Peeler <aa...@ncsu.edu> wrote:

> The first one means you have to have computer nodes and the exsi host
> added to the vcl database.
>

I think I have the ESXi host added to the database (through the web GUI). I
also added a VM. They show up in Manage Computers->Computer Utilities as
shown below:

Hostname     IP Address  State        Owner        Schedule  Current Image
 Next Image  VM Host
esxi-host-1  <pubIP1>    vmhostinuse  admin@Local  VCL 24x7  No Image
  No Image    N/A
vm-1         <pubIP2>    maintenance  admin@Local  VCL 24x7  No Image
  No Image    N/A

The vcld --setup tool pulls the target node and esxi host information
> from the database.
>
> Aaron


I think I remembered another detail from the bootcamp. We were supposed to
create an OS installation outside of VCL (in other words not using a
reservation but directly in ESXi). That is the image that is pulled in
through vcld --setup, right?

Mark

-- 
Mark Gardner
--

Re: VCL Bootcamp notes on creating base images

Posted by Aaron Peeler <aa...@ncsu.edu>.
The first one means you have to have computer nodes and the exsi host
added to the vcl database.

The vcld --setup tool pulls the target node and esxi host information
from the database.

Aaron

On Fri, Aug 5, 2011 at 8:38 AM, Mark Gardner <mk...@vt.edu> wrote:
> Thanks. I was aware of that page. I am having troubles with the first
> requirement. What does it mean for the "computer being captured has been
> added to the VCL database"? I can do the rest once I figure out how to do
> that.
> Perhaps a little background will help... I have installed ESXi, installed
> CentOS in a VM configured to be the management/web/database/DNS server as we
> did in the bootcamp, have configured a VM server (pointing back ESXi as per
> bootcamp), and have added a VM through the web interface (only one because
> the hardware is pretty anemic). I don't know what to do next.
> I think I need to create a new reservation, install CentOS and configure it
> as a base image, then capture it with vcld --setup. But I am not sure.
> BTW, I have been taking copious notes and am willing to put them on the
> wiki, perhaps under a newly created How-To page, if that would help. It
> seems a good way for me to give back considering my still limited
> understanding of many of the VCL details. How do I submit changes to the
> wiki?
> Mark
>
> On Fri, Aug 5, 2011 at 8:10 AM, Aaron Peeler <aa...@ncsu.edu> wrote:
>>
>> Hi Mark,
>>
>> Yes,  https://cwiki.apache.org/confluence/display/VCL/Base+Image+Creation
>>
>> On the top level wiki page it would be under the User  Documentation,
>> Documentation for VCL Administrators section.
>>
>> Aaron
>>
>>
>> On Thu, Aug 4, 2011 at 4:50 PM, Mark Gardner <mk...@vt.edu> wrote:
>> > Are the notes from the recent VCL bootcamp discussing how to create base
>> > images up somewhere?
>> >
>> > Mark
>> >
>> > --
>> > Mark Gardner
>> > --
>> >
>>
>>
>>
>> --
>> Aaron Peeler
>> Program Manager
>> Virtual Computing Lab
>> NC State University
>>
>> All electronic mail messages in connection with State business which
>> are sent to or received by this account are subject to the NC Public
>> Records Law and may be disclosed to third parties.
>
>
>
> --
> Mark Gardner
> --
>



-- 
Aaron Peeler
Program Manager
Virtual Computing Lab
NC State University

All electronic mail messages in connection with State business which
are sent to or received by this account are subject to the NC Public
Records Law and may be disclosed to third parties.

Re: VCL Bootcamp notes on creating base images

Posted by Mark Gardner <mk...@vt.edu>.
Thanks. I was aware of that page. I am having troubles with the first
requirement. What does it mean for the "computer being captured has been
added to the VCL database"? I can do the rest once I figure out how to do
that.

Perhaps a little background will help... I have installed ESXi, installed
CentOS in a VM configured to be the management/web/database/DNS server as we
did in the bootcamp, have configured a VM server (pointing back ESXi as per
bootcamp), and have added a VM through the web interface (only one because
the hardware is pretty anemic). I don't know what to do next.

I think I need to create a new reservation, install CentOS and configure it
as a base image, then capture it with vcld --setup. But I am not sure.

BTW, I have been taking copious notes and am willing to put them on the
wiki, perhaps under a newly created How-To page, if that would help. It
seems a good way for me to give back considering my still limited
understanding of many of the VCL details. How do I submit changes to the
wiki?

Mark

On Fri, Aug 5, 2011 at 8:10 AM, Aaron Peeler <aa...@ncsu.edu> wrote:

> Hi Mark,
>
> Yes,  https://cwiki.apache.org/confluence/display/VCL/Base+Image+Creation
>
> On the top level wiki page it would be under the User  Documentation,
> Documentation for VCL Administrators section.
>
> Aaron
>
>
> On Thu, Aug 4, 2011 at 4:50 PM, Mark Gardner <mk...@vt.edu> wrote:
> > Are the notes from the recent VCL bootcamp discussing how to create base
> > images up somewhere?
> >
> > Mark
> >
> > --
> > Mark Gardner
> > --
> >
>
>
>
> --
> Aaron Peeler
> Program Manager
> Virtual Computing Lab
> NC State University
>
> All electronic mail messages in connection with State business which
> are sent to or received by this account are subject to the NC Public
> Records Law and may be disclosed to third parties.
>



-- 
Mark Gardner
--

Re: VCL Bootcamp notes on creating base images

Posted by Aaron Peeler <aa...@ncsu.edu>.
Hi Mark,

Yes,  https://cwiki.apache.org/confluence/display/VCL/Base+Image+Creation

On the top level wiki page it would be under the User  Documentation,
Documentation for VCL Administrators section.

Aaron


On Thu, Aug 4, 2011 at 4:50 PM, Mark Gardner <mk...@vt.edu> wrote:
> Are the notes from the recent VCL bootcamp discussing how to create base
> images up somewhere?
>
> Mark
>
> --
> Mark Gardner
> --
>



-- 
Aaron Peeler
Program Manager
Virtual Computing Lab
NC State University

All electronic mail messages in connection with State business which
are sent to or received by this account are subject to the NC Public
Records Law and may be disclosed to third parties.