VMware Communities
robert-on-the-g
Contributor
Contributor
Jump to solution

Shrink not enabled for linux guest and win host with growable disks

I've searched this but can't find this particular answer after \*many* hours, so any help appreciated.

On a WinXP host with a Linux guest installed using growable vdisks with no snapshots and no cloning and with vmtools, the vm-toolbox shrink panel says that shrink is not enabled.

I've scoured the requirements in Help and I seem to meet them. I'm a little confused about the Independent/Persistent comment. My original config had Independent unchecked, but I've also tried with Independent-Persistant.

I've tried the disk mount utility on the host, but it can't mount my ext3 disk. I've tried the dd zero fill, the vdiskmanager -d and -k options to little avail. I've tried vmshrink from the vmw backdoor approach, but it stops because shrinking is "disabled."

I've tried the beta VM Converter, but it says that the machine cannot be configured.

Does anyone see what I'm missing here? The shrinking should be enabled as far as I can see.

0 Kudos
1 Solution

Accepted Solutions
RDPetruska
Leadership
Leadership
Jump to solution

>What tells you snapshot is "quite active"?

This line... "03/14/2007 08:07 AM 15,476,654,080 Red Hat Linux-000002.vmdk"

View solution in original post

0 Kudos
18 Replies
Peter_vm
Immortal
Immortal
Jump to solution

Posting .vmx file would help (as a start...)

0 Kudos
robert-on-the-g
Contributor
Contributor
Jump to solution

vmx file

\----


config.version = "8"

virtualHW.version = "4"

scsi0.present = "TRUE"

memsize = "1400"

MemAllowAutoScaleDown = "FALSE"

scsi0:0.present = "FALSE"

scsi0:0.fileName = "Red Hat Linux.vmdk"

ide1:0.present = "TRUE"

ide1:0.fileName = "auto detect"

ide1:0.deviceType = "cdrom-raw"

floppy0.present = "FALSE"

ethernet0.present = "TRUE"

usb.present = "TRUE"

sound.present = "TRUE"

sound.virtualDev = "es1371"

sound.fileName = "-1"

sound.autodetect = "TRUE"

displayName = "G Demo"

guestOS = "redhat"

nvram = "Red Hat Linux.nvram"

scsi0:0.redo = ""

ethernet0.addressType = "generated"

uuid.location = "56 4d ba ae a0 2e 31 39-xxxxxxxxxxxxxx"

uuid.bios = "56 4d ba ae a0 2e 31 39-xxxxxxxxxxxx"

ide1:0.autodetect = "TRUE"

ethernet0.generatedAddress = "00:0c:29:3f:73:90"

ethernet0.generatedAddressOffset = "0"

numvcpus = "1"

workingDir = "."

toolScripts.afterPowerOn = "TRUE"

tools.remindInstall = "FALSE"

ide0:0.present = "TRUE"

ide0:0.fileName = "Red Hat Linux-000002.vmdk"

ide0:0.redo = ""

ide1:0.startConnected = "TRUE"

sharedFolder.maxNum = "3"

sharedFolder0.present = "TRUE"

sharedFolder0.enabled = "TRUE"

sharedFolder0.readAccess = "TRUE"

sharedFolder0.writeAccess = "TRUE"

sharedFolder0.hostPath = "C:\Documents and Settings\xxxxx\My Documents\Vm Shared Folder\"

sharedFolder0.guestName = "vm-shared"

sharedFolder0.expiration = "never"

tools.syncTime = "TRUE"

checkpoint.vmState = ""

ethernet0.connectionType = "bridged"

ethernet0.vnet = "VMnet8"

sharedFolder1.present = "TRUE"

sharedFolder1.enabled = "TRUE"

sharedFolder1.readAccess = "TRUE"

sharedFolder1.writeAccess = "TRUE"

sharedFolder1.hostPath = "C:\Virtual Machines\download\"

sharedFolder1.guestName = "download"

sharedFolder1.expiration = "never"

powerType.powerOff = "soft"

isolation.tools.dnd.disable = "TRUE"

isolation.tools.copy.disable = "TRUE"

isolation.tools.paste.disable = "TRUE"

sharedFolder2.present = "TRUE"

sharedFolder2.enabled = "TRUE"

sharedFolder2.readAccess = "TRUE"

sharedFolder2.writeAccess = "TRUE"

sharedFolder2.hostPath = "C:\Virtual Machines\local\"

sharedFolder2.guestName = "local"

sharedFolder2.expiration = "never"

checkpoint.vmState.readOnly = "FALSE"

uuid.action = "keep"

snapshot.disabled = "TRUE"

ide0:0.mode = "independent-persistent"

extendedConfigFile = "Red Hat Linux.vmxf"

0 Kudos
RDPetruska
Leadership
Leadership
Jump to solution

Have you run the vmware-toolbox applet in the guest as root? If not, then shrink is disabled.

0 Kudos
Peter_vm
Immortal
Immortal
Jump to solution

Thanks, now can you post a detailed directory of your VM folder ( where .vmx file was)?

0 Kudos
robert-on-the-g
Contributor
Contributor
Jump to solution

I did run toolbox as root... meant to mention that.

0 Kudos
robert-on-the-g
Contributor
Contributor
Jump to solution

contents of vm folder (thanks Peter)

\----


Directory of C:\Virtual Machines\Demo

03/14/2007 08:07 AM

.
03/14/2007 08:07 AM

    ..

    03/14/2007 08:07 AM 15,476,654,080 Red Hat Linux-000002.vmdk

    03/13/2007 05:09 PM 8,664 Red Hat Linux.nvram

    03/13/2007 05:10 PM 12,687,900,672 Red Hat Linux.vmdk

    02/22/2007 12:43 PM 435 Red Hat Linux.vmsd

    03/14/2007 08:06 AM 2,387 Red Hat Linux.vmx

    03/13/2007 04:26 PM 133,986 vmware-0.log

    03/13/2007 04:13 PM 233,693 vmware-1.log

    03/13/2007 12:27 PM 37,353 vmware-2.log

    03/13/2007 05:09 PM 273,973 vmware.log

    9 File(s) 28,165,245,243 bytes

    0 Kudos
    Peter_vm
    Immortal
    Immortal
    Jump to solution

    Also, any of those conditions apply to you? Do you have any snapshots active?

    \----


    The shrink feature is not enabled if the virtual machine

    . Contains a snapshot

    . Is a parent of a linked clone

    . Is a linked clone

    The shrink feature is not enabled for a virtual machine if any of its virtual disks are

    . Preallocated when created

    . Not used in independent-persistent mode

    . Legacy disks that are not in persistent mode

    . Booted as independent disks

    Note: You can change the mode of a virtual disk before the virtual machine is

    powered on. See Excluding Disks from Snapshots on page 280 for a discussion of independent disks.

    \----


    Please post a content of that file:

    02/22/2007 12:43 PM 435 Red Hat Linux.vmsd

    0 Kudos
    robert-on-the-g
    Contributor
    Contributor
    Jump to solution

    \- No snapshots (see dir contents)

    \- No cloning

    \- Not preallocatted

    \- Not a legacy disk (created in VMW WS 5.5)

    Now, I don't understand the double negative "not enable" if "not used in independent-persistant mode". For enabled, should I disable "independent" (under Edit Settings/Advanced for those following along), or should I enable both independent AND persistent ?

    In my original setup, I had independent unchecked (default setting, I believe). In trying to parse the Help, I also tried with Independent and Persistent, but there was no change so I put that back.

    I don't think I do this (except when changed experimentally above), but what does "Booted as independent disks" mean?

    0 Kudos
    robert-on-the-g
    Contributor
    Contributor
    Jump to solution

    contents of vmsd file

    \----


    snapshot.lastUID = "1"

    snapshot.numSnapshots = "0"

    snapshot.current = "0"

    snapshot0.uid = "1"

    snapshot0.filename = "Red Hat Linux-Snapshot1.vmsn"

    snapshot0.displayName = "Booted up and logged in"

    snapshot0.type = "1"

    snapshot0.createTimeHigh = "271591"

    snapshot0.createTimeLow = "172832064"

    snapshot0.numDisks = "1"

    snapshot0.disk0.fileName = "Red Hat Linux.vmdk"

    snapshot0.disk0.node = "ide0:0"

    snapshot.mru0.uid = "1"

    \----


    This was a snapshot created some time ago, but I deleted all snapshots. Doesn't snapshot.numSnapshots = "0" indicate this? Should I delete the snapshot0.* lines?

    0 Kudos
    Peter_vm
    Immortal
    Immortal
    Jump to solution

    By looking at your directory, it seems that snapshot file is still quite active and was not merged into a base disk. In that situation I would backup VM first, before exercising more options to get rid of the snapshot.

    robert-on-the-g
    Contributor
    Contributor
    Jump to solution

    Backup done and has been used repeatedly ;-). (Just a straight copy of the vm dir.)

    What tells you snapshot is "quite active"? Contents of the vmsd file alone? What about the absence of the -Snapshot file?

    0 Kudos
    Peter_vm
    Immortal
    Immortal
    Jump to solution

    Sorry, I did not look at the right thing.

    When you use Virtual Machine Settings Editor and point to your IDE disk, what does it report for "Disk information" section?

    0 Kudos
    RDPetruska
    Leadership
    Leadership
    Jump to solution

    >What tells you snapshot is "quite active"?

    This line... "03/14/2007 08:07 AM 15,476,654,080 Red Hat Linux-000002.vmdk"

    0 Kudos
    robert-on-the-g
    Contributor
    Contributor
    Jump to solution

    From Disk Information

    \----


    Disk space is not preallocated for this virtual disk.

    Virtual disk contents are stored in a single file.

    0 Kudos
    robert-on-the-g
    Contributor
    Contributor
    Jump to solution

    Boy would I like to get rid of that. I thought that was the disk splitting.

    I double checked the Snapshot Manager and it says zero. It has the You Are Here to the right of the machine icon.

    0 Kudos
    RDPetruska
    Leadership
    Leadership
    Jump to solution

    No, disk splitting should be "xxx-s001.vmdk" files (or -f if preallocated disks).

    robert-on-the-g
    Contributor
    Contributor
    Jump to solution

    ok, I now see this thread that I will try on a copy of the machine to get rid of the snapshot using vdiskmanager.

    http://www.vmware.com/community/thread.jspa?messageID=593415&#593415

    I'll report back if this worked.

    Message was edited by:

    robert-on-the-go

    0 Kudos
    robert-on-the-g
    Contributor
    Contributor
    Jump to solution

    ok, that worked. I eliminated the snapshot using the info from the link above and performing some surgery on the vmx file.

    Back inside the guest, a partition now appears under the toolbox Shrink tab, and I can run the shrink.

    I found the vmshrink command was the easiest to use here.

    Bottom line: my confusion stemmed from being told in the GUI that there were no snapshots.

    Thanks, so much, peter_vm and RDPetruska for the help here. I hope this thread helps others, too.

    0 Kudos