VMware vSphere

 View Only
Expand all | Collapse all

How to change ESXi scratch location

  • 1.  How to change ESXi scratch location

    Posted Jan 12, 2011 09:08 AM

    Hi,

    We had several servers with ESX installed on local disks. We decided to migrate to ESXi 4.1 on USB key and not use local disks anymore.

    We reinstalled them with ESXi 4.1. In one of the servers local disks were not removed before the installation of ESXi.

    Now I see that it uses the local vmfs partition as a scratch location (".locker" folder has been created).

    In advanced settings I see the following location for scratch /vmfs/volumes/<uuid>/.locker.

    If I remove the setting, it reverts back.

    I have rebooted the server and removed the disks, but the setting still refers to the same (now not existing) location.

    Is it OK? Can this affect some functionality?

    And how can I get it configured to default (/tmp/scratch)?

    Thanks,

    Michael.



  • 2.  RE: How to change ESXi scratch location

    Posted Jan 12, 2011 09:40 AM

    Hi friend,

    I hope the below info gives you some idea

    1 To get the current state of the scratch partition, use the following command.
    vicfg-advcfg --server <ip-address> --username username --password <password> -g
    ScratchConfig.ConfiguredScratchLocation
    2 To set the scratch location, use the following command.
    vicfg-advcfg --server <ip-address> --username username --password <password> -s <path to
    folder> ScratchConfig.ConfiguredScratchLocation
    3 Reboot the host for the changes to take effect.

    If the scratch partition is not present, vm-support output is stored in a ramdisk. This might
    be problematic in low-memory situations.

    For ESXi Installable, the partition is created during installation and is thus selected. VMware recommends that
    you leave it unchanged.

    Thanks



  • 3.  RE: How to change ESXi scratch location

    Posted Jan 12, 2011 10:41 AM

    Hi,

    thanks for your answer.

    If I want to configure the location to the default /tmp/scratch, what should I do?

    When I try to change it to /tmp/scratch from the GUI, I get an error about invalid value. Do I have first to create the directory "scratch" inside /tmp?

    Michael.



  • 4.  RE: How to change ESXi scratch location

    Posted Jan 12, 2011 12:54 PM

    Is there any reason why you want to set the scratch location to your USB device? When installing ESXi on an USB device the usual configuration is to configure the scratch location on a vmfs volume.

    For the reason of the error message, please read http://kb.vmware.com/kb/1026453

    André



  • 5.  RE: How to change ESXi scratch location

    Posted Jan 12, 2011 03:47 PM

    Actually I just want to set it to the default (/tmp/scratch).

    So, I created the directory under /tmp and configured scratch location to /tmp/scratch in advanced settings.

    After the reboot I see that the change was applied and sub-folders were created under /tmp/scratch directory.

    Now the issue is when I open iLO and go to Tech Support Mode screen (Alt+F1) I see that screen is flooded with vmkernel log messages. They appear even while I am typing something. On other servers this doesn't happen. This is really strange and annoying.

    Does someone know how to fix this?



  • 6.  RE: How to change ESXi scratch location

    Posted Jan 12, 2011 07:00 PM

    The /tmp directory is actually a RAM disk and when you reboot anything in /tmp is lost. If you set the scratch location from the vSphere client to /tmp/scratch it will be recreated on reboot. I would however, recommend as others have, that you chage the location of scratch to a datastore location.



  • 7.  RE: How to change ESXi scratch location

    Posted Jan 12, 2011 07:11 PM

    with virtual center, goto the host, click on configuration, then on advanced settings.  Near bottom of list, look for StratchConfig.  Set it to use one of the VMFS volumes.



  • 8.  RE: How to change ESXi scratch location

    Posted Jan 13, 2011 08:08 AM

    Thank for the answers so far.

    But if I do want to revert to the default /tmp/scratch and don't want to put the scratch on VMFS, how can this be done?

    So far:

    I have manually created a folder named "scratch" in /tmp.

    I have changed scratch location setting to /tmp/scratch.

    Rebooted the server.

    The setting was applied (i can see it in advanced settings)

    Sub-folders are created in /tmp/scratch.

    However,

    All sub-folders are empty - why?

    The Local Tech Support mode screen (Alt+F1) is not usable because it is flooded with vmkernel messages - how can I fix this?

    Thanks



  • 9.  RE: How to change ESXi scratch location

    Posted Jan 13, 2011 08:28 AM
    But if I do want to revert to the default /tmp/scratch...

    This might be configured on an HDD installation, however you have installed ESXi to an USB device. If I'm not mistaken, the scratch location needs at least 1 GB (and up to 4 GB) of free disk space. Do you have this in the tmp dir?

    André



  • 10.  RE: How to change ESXi scratch location

    Posted Jan 13, 2011 08:37 AM

    Vmware actuially recommends it go on vmfs in one of the kb’s 9or at least used the words datastore)

    The only time on esxi it ends up truly on the local disk is if you accept the default partition…which is a 1MB block size. Most times people are moving to 8MB block size (since its mostly large files on the vmfs volumes anyhow) and you have less scsi reservations as your snapshots don’t grow as fast.

    BBoth of my servers I had to blow away the default vmfs volume created during install (which also killed the dos partition) and created them to be larger block sizes.



  • 11.  RE: How to change ESXi scratch location

    Posted Jan 13, 2011 08:51 AM

    I am not sure about this. The USB's capacity is 2GB.

    But other servers that have been installed with identical USBs do have scratch configured to /tmp/scratch. Or it is just a dummy folder?



  • 12.  RE: How to change ESXi scratch location

    Posted Jan 13, 2011 09:17 AM

    I don't have an USB installation on which I could verify this right now. However, AFAIK the scratch partition is created during the first reboot after the installation if there's sufficient ( ~4 GB) space on the installation disk. Otherwise you have to either create it manually on another disk or redirect the location to a VMFS datatsore (VMware recommended).

    André