VMware Cloud Community
doubletake
Contributor
Contributor
Jump to solution

vmware-cmd persistent / nonpersistent does not work in vsphere / esx4 ?

Hi,

We have a problem with setting a non-persistent disk state with a script - something we used to be able to do with ESX 3.5

On ESX 3.5 this used to work :

# vmware-cmd XPROUTER.vmx setconfig scsi0:0.mode independent-nonpersistent

On ESX 4.0, statement runs as follows and does not return anything - i.e.:

# vmware-cmd XPROUTER.vmx setconfig scsi0:0.mode independent-nonpersistent

#

nor does not modify the .vmx or the state of SCSI0.0 in the gui.

Also, if I try to modify the .vmx line with text editor-

scsi0:0.mode = "independent-nonpersistent"

The change does not appear in the gui configuration..

Looking at vmware-cmd reference for V-Sphere, it appears the setconfig command is no longer there ?

What method can be used to set a machine disk to non-persistent / persistent from command line on ESX 4.0 ?

Thanks in advance!

0 Kudos
1 Solution

Accepted Solutions
lamw
Community Manager
Community Manager
Jump to solution

That's correct, that has been removed from vSphere, I think there might have been some oddities/issues in the past with the command and perhaps removed it all together. Technically the vmware-cmd is a deprecated utility. You'll probably want to take a look at using vCLI or PowerCLI to reconfigure your VM at set the disk to either persistent or non-persistent.

You can take a look at the vSphere SDK for Perl, there are a variety of scripts that allow for wide range of operations against your vCenter, host and VM(s): http://www.vmware.com/support/developer/viperltoolkit/viperl40/doc/vsperl_util_index.html. One that would be of interest is vmreconfig.pl http://www.vmware.com/support/developer/viperltoolkit/viperl40/doc/vmreconfig.html You'll find that you'll be able to update your disk mode.

=========================================================================

William Lam

VMware vExpert 2009

VMware ESX/ESXi scripts and resources at:

VMware Code Central - Scripts/Sample code for Developers and Administrators

If you find this information useful, please award points for "correct" or "helpful".

View solution in original post

0 Kudos
1 Reply
lamw
Community Manager
Community Manager
Jump to solution

That's correct, that has been removed from vSphere, I think there might have been some oddities/issues in the past with the command and perhaps removed it all together. Technically the vmware-cmd is a deprecated utility. You'll probably want to take a look at using vCLI or PowerCLI to reconfigure your VM at set the disk to either persistent or non-persistent.

You can take a look at the vSphere SDK for Perl, there are a variety of scripts that allow for wide range of operations against your vCenter, host and VM(s): http://www.vmware.com/support/developer/viperltoolkit/viperl40/doc/vsperl_util_index.html. One that would be of interest is vmreconfig.pl http://www.vmware.com/support/developer/viperltoolkit/viperl40/doc/vmreconfig.html You'll find that you'll be able to update your disk mode.

=========================================================================

William Lam

VMware vExpert 2009

VMware ESX/ESXi scripts and resources at:

VMware Code Central - Scripts/Sample code for Developers and Administrators

If you find this information useful, please award points for "correct" or "helpful".

0 Kudos