You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@vcl.apache.org by Jose Higino <jo...@pt.ibm.com> on 2010/04/28 18:48:24 UTC

VCL 2.2 with VMware Server 2.x or ESXi 4.x

Hi,

I was wondering if VCL 2.2 ca be used now, because I would like to try out 
VMware Server 2.x or ESXi 4.x with it.

Where can I get the code, the SVN repository only has 2.1?

Regards
-- 
IBM IT Specialist - AIX & Linux
Red Hat Certified Technician
CiRBA Certified Virtualization Analyst
José Filipe Gonçalves Higino


Salvo disposto de outra forma acima: / Unless stated otherwise above:
Companhia IBM Portuguesa, S.A.
Sociedade Anónima com o Capital Social de 15.000.000 euros
Registada na Conservatória do Registo Comercial de Lisboa, sob o número 
15401, NIPC 500068801
Edifício ?Office Oriente?
Rua do Mar da China, Lote 1.07.2.3
Parque das Nações, 1990-138 LISBOA

Re: VCL 2.2 with VMware Server 2.x or ESXi 4.x

Posted by Andy Kurth <an...@ncsu.edu>.
I have committed the new VMware code.  It is not quite ready to be tested yet. 
It resides in managementnode/lib/VCL/Module/Provisioning/VMware so that it 
doesn't conflict with the existing VMware modules.  Many things need to be 
documented but here are a few notes:

VMware Support
The code should currently work with VMware Server 2.x and ESX/ESXi as long as 
the product isn't restricted by the licensing mode.  Additional utility modules 
will need to be written to support Server 1.x without VIX installed and "free" 
ESXi with SSH enabled.

VMware.pm
This is the main provisioning module.  It contains subroutines called by VCL 
state modules such as load(), capture(), get_image_size(), etc.  It also 
contains several other helper subroutines.

VM host OS object
An OS object is created when VMware.pm is initialized which is used to control 
the VM host.  This allows the code in Linux.pm and other OS modules to be used 
without duplication for both the OS of the reservation computer and the OS of 
the VM host.  The VM host OS object is accessed/controlled in the same manner as 
the normal OS object for the reservation computer.  This is accomplished by 
creating an additional DataStructure object containing the image and computer 
info of the VM host.  VM host OS functions can be accessed via $self->vmhost_os 
just as the reservation computer OS functions can be accessed via $self->os.

vSphere_SDK.pm and VIX_API.pm
These are utility modules which implement subroutines to utilize the VMware 
API/SDKs.  These modules are used to control the VMs and to control the 
VMware-specific functions on the VM host.  They contain subroutines such as 
get_registered_vms(), vm_register(), vm_power_on(), etc.  These subroutines are 
accessed from VMware.pm via $self->api.  For example, to retrieve an array 
containing the registered vmx paths on the VM host: 
$self->api->get_registered_vms().

vSphere_SDK.pm OS functions
The vShphere_SDK.pm module contains subroutines which allow it to be used as a 
VM host OS module if ESX/ESXi is being used.  In some configurations, the only 
way to access and control the VM host OS is by using the SDK.  For example, the 
vSphere SDK will allow you to determine if a file exists on an ESXi host which 
doesn't have SSH enabled.  A Linux OS module would not be able to do this.

VM Disk Conversion
The code can currently convert virtual disks created for other VMware products 
to a format compatible with ESX.  This should allow existing VMware Server 1.x 
images to be used on an ESX/ESXi host.

VM Naming / Base Image Creation
The code was written to relieve any naming assumptions in order to make base 
image creation easier.  An base image capture should work regardless of the name 
of the VM, vmx file, or vmdk file.  The only requirement is that the management 
node be able to SSH into the VM using the hostname configured in the VCL 
database.  The code retrieves the MAC addresses being used by the VM by 
gathering the networking configuration via SSH.  It then retrieves a list of all 
vmx files and matches up the MAC addresses being used by the VM to the addresses 
configured in a vmx file.  If a single vmx file is found with a matching MAC 
address, the vmdk path is retrieved from the vmx file.

Not done yet:
-Space checking on the VM host.
-retrieve_image subroutine not implemented yet.  I would like to move this up to 
Provisioning.pm as described in VCL-289.
-Semaphores when manipulating shared directories not used yet.  VMware.pm has 
get_lockfile() and release_lockfile() subroutines.  These will be used to ensure 
that only 1 process is manipulating a shared directory at a time.

-Andy


Jose Higino wrote:
> Hi,
> 
> I was wondering if VCL 2.2 ca be used now, because I would like to try out 
> VMware Server 2.x or ESXi 4.x with it.
> 
> Where can I get the code, the SVN repository only has 2.1?
> 
> Regards

Re: VCL 2.2 with VMware Server 2.x or ESXi 4.x

Posted by Vallard Benincosa <va...@benincosa.com>.
xCAT 2.5 which vcl can be based off automatically configures ESXi 4  
with ssh enabled.  This is for running diskless installs.



On May 29, 2010, at 10:14 AM, Andy Kurth <an...@ncsu.edu> wrote:

> It would be pretty easy to implement but requiring SSH poses some  
> legal/licensing questions, along with some technical problems.
>
> There's a thread that discusses whether or not it violates the  
> VMware EULA to enable and use SSH, with no definitive answer:
> http://communities.vmware.com/message/1418182
>
> Even if the EULA would not be violated by VCL managing "free" ESXi  
> via SSH, I'd be wary to devote much development time or make this  
> the recommended configuration because (a) the EULA may be changed in  
> the future to disallow it and (b) there is nothing preventing VMware  
> from taking away the SSH "Tech Support Mode" in the future, and (c)  
> there is no way to automate the enabling of SSH so every host will  
> have to be manually configured.
>
> That said, I have enabled SSH on my ESXi test hosts and have found  
> it very useful.  Instructions on how to enable SSH:
> http://kb.vmware.com/kb/1003677
>
> Once enabled, the VCL code could do everything it needs by running  
> vim-cmd and other commands.  This would be easy to implement.  The  
> new code is very modular and contains 2 utility modules, VIX_API.pm  
> and vSphere_SDK.pm.  These implement the functions to control the  
> VMs such as register, power_on, etc.  We would need to implement  
> another utility module to perform the same functions via ESXi/SSH.
>
> There will be some technical problems that will need to be  
> addressed. For example, you can create an authorized_keys file on  
> the ESXi host to login using an identity key but this file gets  
> deleted for some reason every time you reboot the ESXi host.
>
> -Andy
>
>
>
> Ryan Johnson wrote:
>> I was going through some of the posts on the vmware forums.   
>> Apparently one
>> could ssh into the ESXi host itself and use the vimsh wrapper to  
>> administer
>> virtual machines.  Not sure how hard this would be to implement.
>> http://communities.vmware.com/thread/203414

Re: VCL 2.2 with VMware Server 2.x or ESXi 4.x

Posted by Andy Kurth <an...@ncsu.edu>.
It would be pretty easy to implement but requiring SSH poses some 
legal/licensing questions, along with some technical problems.

There's a thread that discusses whether or not it violates the VMware 
EULA to enable and use SSH, with no definitive answer:
http://communities.vmware.com/message/1418182

Even if the EULA would not be violated by VCL managing "free" ESXi via 
SSH, I'd be wary to devote much development time or make this the 
recommended configuration because (a) the EULA may be changed in the 
future to disallow it and (b) there is nothing preventing VMware from 
taking away the SSH "Tech Support Mode" in the future, and (c) there is 
no way to automate the enabling of SSH so every host will have to be 
manually configured.

That said, I have enabled SSH on my ESXi test hosts and have found it 
very useful.  Instructions on how to enable SSH:
http://kb.vmware.com/kb/1003677

Once enabled, the VCL code could do everything it needs by running 
vim-cmd and other commands.  This would be easy to implement.  The new 
code is very modular and contains 2 utility modules, VIX_API.pm and 
vSphere_SDK.pm.  These implement the functions to control the VMs such 
as register, power_on, etc.  We would need to implement another utility 
module to perform the same functions via ESXi/SSH.

There will be some technical problems that will need to be addressed. 
For example, you can create an authorized_keys file on the ESXi host to 
login using an identity key but this file gets deleted for some reason 
every time you reboot the ESXi host.

-Andy



Ryan Johnson wrote:
> I was going through some of the posts on the vmware forums.  Apparently one
> could ssh into the ESXi host itself and use the vimsh wrapper to administer
> virtual machines.  Not sure how hard this would be to implement.
> 
> http://communities.vmware.com/thread/203414

Re: VCL 2.2 with VMware Server 2.x or ESXi 4.x

Posted by Ryan Johnson <rj...@gwmail.gwu.edu>.
I was going through some of the posts on the vmware forums.  Apparently one
could ssh into the ESXi host itself and use the vimsh wrapper to administer
virtual machines.  Not sure how hard this would be to implement.

http://communities.vmware.com/thread/203414

On Thu, May 27, 2010 at 5:35 PM, Andy Kurth <an...@ncsu.edu> wrote:

> Bingo.  I was hoping that only file/datastore operations were locked down.
>  I attempted to have a shared datastore mounted between the ESXi host and
> the management node so that the management node could manipulate the files.
>  This worked great.  I then tried to use VIX to register and power on the
> VM.  I was greeted with the same "RestrictedVersionFault" that the vSphere
> SDK returns.
>
> I committed some prerequisite changes this morning.  I hope to commit the
> VMware code tomorrow.
>
> -Andy
>
>
> Ryan Johnson wrote:
>
>> So the next version of the Vmware code will use VIX as well?  And I am
>> guessing Vmware locked down write operations for VIX?
>>
>> On Tue, May 25, 2010 at 3:46 PM, Peter Dimitrios <petedaguru@gmail.com
>> >wrote:
>>
>>  Andy,
>>>  How are you coming along with getting ESXi working with VCL?   Are
>>> you able to enable SSH by temporarily switching back to an evaluation
>>> license, then manage things via SSH?    See  "Managing ESXi without
>>> the VI client"  at
>>> http://www.vm-help.com/esx40i/manage_without_VI_client_2.php  for some
>>> details.
>>>
>>>  _peter
>>>
>>>
>>

Re: VCL 2.2 with VMware Server 2.x or ESXi 4.x

Posted by Andy Kurth <an...@ncsu.edu>.
Bingo.  I was hoping that only file/datastore operations were locked down.  I 
attempted to have a shared datastore mounted between the ESXi host and the 
management node so that the management node could manipulate the files.  This 
worked great.  I then tried to use VIX to register and power on the VM.  I was 
greeted with the same "RestrictedVersionFault" that the vSphere SDK returns.

I committed some prerequisite changes this morning.  I hope to commit the VMware 
code tomorrow.

-Andy

Ryan Johnson wrote:
> So the next version of the Vmware code will use VIX as well?  And I am
> guessing Vmware locked down write operations for VIX?
> 
> On Tue, May 25, 2010 at 3:46 PM, Peter Dimitrios <pe...@gmail.com>wrote:
> 
>> Andy,
>>  How are you coming along with getting ESXi working with VCL?   Are
>> you able to enable SSH by temporarily switching back to an evaluation
>> license, then manage things via SSH?    See  "Managing ESXi without
>> the VI client"  at
>> http://www.vm-help.com/esx40i/manage_without_VI_client_2.php  for some
>> details.
>>
>>   _peter
>>
> 

Re: VCL 2.2 with VMware Server 2.x or ESXi 4.x

Posted by Ryan Johnson <rj...@gwmail.gwu.edu>.
So the next version of the Vmware code will use VIX as well?  And I am
guessing Vmware locked down write operations for VIX?

On Tue, May 25, 2010 at 3:46 PM, Peter Dimitrios <pe...@gmail.com>wrote:

> Andy,
>  How are you coming along with getting ESXi working with VCL?   Are
> you able to enable SSH by temporarily switching back to an evaluation
> license, then manage things via SSH?    See  "Managing ESXi without
> the VI client"  at
> http://www.vm-help.com/esx40i/manage_without_VI_client_2.php  for some
> details.
>
>   _peter
>

Re: VCL 2.2 with VMware Server 2.x or ESXi 4.x

Posted by Peter Dimitrios <pe...@gmail.com>.
Andy,
  How are you coming along with getting ESXi working with VCL?   Are
you able to enable SSH by temporarily switching back to an evaluation
license, then manage things via SSH?    See  "Managing ESXi without
the VI client"  at
http://www.vm-help.com/esx40i/manage_without_VI_client_2.php  for some
details.

   _peter

Re: VCL 2.2 with VMware Server 2.x or ESXi 4.x

Posted by Andy Kurth <an...@ncsu.edu>.
This is just an update.  I have not committed the updated VMware code yet.  I 
have been trying to find out if there is any way for VCL to manage the latest 
free version of ESXi.  I don't think this will be possible.  Once a free license 
code is entered and the host leaves evaluation mode, most functions result in a 
"RestrictedVersion" fault.  The new code should work on ESX, Server 2.x, and 
ESXi if it is licensed or in evaluation mode.  I need to tidy some things up 
before committing, hopefully this week.

-Andy

Jose Higino wrote:
> Thanks Andy,
> 
> I was trying to get a try this week.... next week will be out of schedule 
> for me.. but nice to know about.. i will ramp up with that 3 weeks from 
> now.
> 
> Regards

Re: VCL 2.2 with VMware Server 2.x or ESXi 4.x

Posted by Jose Higino <jo...@pt.ibm.com>.
Thanks Andy,

I was trying to get a try this week.... next week will be out of schedule 
for me.. but nice to know about.. i will ramp up with that 3 weeks from 
now.

Regards
-- 
IBM IT Specialist - AIX & Linux
Red Hat Certified Technician
CiRBA Certified Virtualization Analyst
José Filipe Gonçalves Higino




From:
Andy Kurth <an...@ncsu.edu>
To:
vcl-dev@incubator.apache.org
Date:
28-04-2010 18:42
Subject:
Re: VCL 2.2 with VMware Server 2.x or ESXi 4.x



I would hold off for now.  I'm working on revamping the vmware.pm module 
to work 
with VMware Server 2.x and ESXi.  The code has not been committed to the 
repository yet.  I will probably commit some changes next week.

Regards,
Andy

Jose Higino wrote:
> Hi,
> 
> I was wondering if VCL 2.2 ca be used now, because I would like to try 
out 
> VMware Server 2.x or ESXi 4.x with it.
> 
> Where can I get the code, the SVN repository only has 2.1?
> 
> Regards




Salvo disposto de outra forma acima: / Unless stated otherwise above:
Companhia IBM Portuguesa, S.A.
Sociedade Anónima com o Capital Social de 15.000.000 euros
Registada na Conservatória do Registo Comercial de Lisboa, sob o número 
15401, NIPC 500068801
Edifício ?Office Oriente?
Rua do Mar da China, Lote 1.07.2.3
Parque das Nações, 1990-138 LISBOA

Re: VCL 2.2 with VMware Server 2.x or ESXi 4.x

Posted by Andy Kurth <an...@ncsu.edu>.
I would hold off for now.  I'm working on revamping the vmware.pm module to work 
with VMware Server 2.x and ESXi.  The code has not been committed to the 
repository yet.  I will probably commit some changes next week.

Regards,
Andy

Jose Higino wrote:
> Hi,
> 
> I was wondering if VCL 2.2 ca be used now, because I would like to try out 
> VMware Server 2.x or ESXi 4.x with it.
> 
> Where can I get the code, the SVN repository only has 2.1?
> 
> Regards