VMware Cloud Community
swinster
Enthusiast
Enthusiast
Jump to solution

Features avalibale in the Free ESXi version - auto VM startup, and script shoutdown?

Hey All,

The 60 evaluation has expired on my ESXi host (5.0.0.623860) which runs a couple of VMs. The VMs were setup to autostart when the Host stated, but now the evaluation has finished, the VM no longer autostart.

In addiiton, I ran a simple scipt using PowerCLI. All this did was to shot down issue a Host shutdown command, which in turn shutdown the VMs gracfully, then shut down the host: The script command were:

Connect-VIServer -server mysESXiHost -User root -Password xxxxxxx
Stop-VMHost mysESXiHost -Confirm:$false -force

If I run these command from the PowerCLI propmt, I see the following error:

Stop-VMHost : 08/12/2012 17:01:52    Stop-VMHost        fault.RestrictedVersion
.summary
At line:1 char:12
+ Stop-VMHost <<<< 
mysESXiHost -Confirm:$false -force
    + CategoryInfo          : NotSpecified: (:) [Stop-VMHost], RestrictedVersi
   on
    + FullyQualifiedErrorId : Client20_VmHostServiceImpl_ShutdownVmHost_ViErro
   r,VMware.VimAutomation.ViCore.Cmdlets.Commands.StopVMHost

From what I have read, I thought ESXi even running in the Free licence should still allow these things to happen, or am I mistaken?

Chris

Reply
0 Kudos
1 Solution

Accepted Solutions
lamw
Community Manager
Community Manager
Jump to solution

Reply
0 Kudos
8 Replies
lamw
Community Manager
Community Manager
Jump to solution

There's two things to note:

1) The fault.RestrictedVersion.summary details can be found here http://www.virtuallyghetto.com/2011/06/dreaded-faultrestrictedversionsummary.html

2) Regarding Auto Start, tale a look here http://blogs.vmware.com/vsphere/2012/07/clarification-on-the-auto-start-issues-in-vsphere-51-update-...

Reply
0 Kudos
powermatt
Contributor
Contributor
Jump to solution

I wasn't aware that there was a time limit on the free licenses. You have applied the license to your server, right?

Reply
0 Kudos
swinster
Enthusiast
Enthusiast
Jump to solution

Hey lamw,

Thanks for both of these. Tis a shame that simple scipting is diasable. As with a lot of these installs that people run ESXi as the FREE licence, I use this for a home system and essentially help me understand running the system.

The only two features I really use extensivly are the autostart option (which can be set in the client) and the shutdown script. I don't really want these home server running 24/7 so this enables me to automate simple startup and shutdown.

I think you can get around these issue be re-installing the ESXi hypervisor - looks like I will need to upgrade the current version in any case to get around the autostart bug. Setup of the Hypervisor again is a bit of a pain, but not the end of the world. Looks like this will need to be done every 2 months.

Cheers

Reply
0 Kudos
lamw
Community Manager
Community Manager
Jump to solution

You can still login to the host and perform CLI operations to shutdown VMs, take a look at using the vim-cmd interface http://www.virtuallyghetto.com/p/vmware-vimsh_9940.html

swinster
Enthusiast
Enthusiast
Jump to solution

@powermatt

Essentially, the ESXi system is installed with ful functioality for 60 days. In that time frame you need to register and you will then get a licence for the free version. If you don't apply this licence, the host will simply stops working. Once the licence is applied, it does not time out, but as can bee seen above, the functionality - at least for me - is not quite what is needed., as I can no longer auotmaticlly shut down the host from a timed script.

Reply
0 Kudos
swinster
Enthusiast
Enthusiast
Jump to solution

Thanks again lamw

I will have a look at this. The reason I liked the PowerCLI is because I could set up a scheduled task on one of the Windows VMs, the ran a BAT file that started the PowerCLI enviroment and passed in the two line scritp file as seen above.

I will read through the the link you provided, but do you know off the top of your head if it would be possible to automate the this in a similar fashion?

Reply
0 Kudos
lamw
Community Manager
Community Manager
Jump to solution

There is a cron daemon on ESXi, for some more details, take a look at the cron section here http://communities.vmware.com/docs/DOC-8760

You can also just schedule it outside of ESXi and have it SSH in and run a script. If you're more familiar with Windows, check out plink and you can then continue using Windows scheduler. Many ways of accomplishing this Smiley Happy

Reply
0 Kudos
swinster
Enthusiast
Enthusiast
Jump to solution

Once again thanks.

Firstly, after upgrading to ESXi 5.1, the autostartup is now functioing

Initiallially, I thought that the "vim-cmd" wasn't going to work as I couldn't find any refernce to shuting down or powering off the actual host, only the VM. However, after a bit of searching, I found a simple command to do this, when logged into the Host via SSH

/sbin/poweroff

This does the same as the PowerCLI command (as far as I can tell), and VM with VMTools installed power down gracefully before the Host powers down - nice and simple, just how I like it.

So, quick install of Putty on the relevant VM, create a BAT file with the following line:

plink "root@myESXiHost" -pw xxxxxx /sbin/poweroff

then create a scheduled task pointing to the BAT file, and it now looks like I'm good to go.

I do need to check out the link you sent which goes through to the ghettoVCB backup - been meaning to sort this out for a while, but it got left.

Reply
0 Kudos