Results 1 to 3 of 3

Thread: vmbuilder generated disk file size

  1. #1
    Join Date
    Dec 2007
    Location
    Eastern Washington
    Beans
    Hidden!
    Distro
    Ubuntu 16.10 Yakkety Yak

    vmbuilder generated disk file size

    vmbuilder creates small disk files for kvm and vmw6 hypervisor machines and full-sized disk files for esxi hypervisor machines. I didn't specify any disk pre-allocation options (I don't even know if there is such a thing for vmbuilder).

    The following VMs were created using the same command, with the exception of the hypervisor choice.


    ubuntu-esxi:
    total 11G
    -rw-r--r-- 1 aaron.smith aaron.smith 3.0G Sep 11 16:55 tmpb9a4Ke-flat.vmdk
    -rwx---r-x 1 aaron.smith aaron.smith 487 Sep 11 16:55 tmpb9a4Ke.vmdk*
    -rw-r--r-- 1 aaron.smith aaron.smith 7.9G Sep 11 16:55 tmpsuqqPO-flat.vmdk
    -rwx---r-x 1 aaron.smith aaron.smith 490 Sep 11 16:56 tmpsuqqPO.vmdk*
    -rwx---r-x 1 aaron.smith aaron.smith 1.3K Sep 11 16:56 ubuntu.vmx*

    ubuntu-kvm:
    total 540M
    -rwxrwxr-x 1 aaron.smith aaron.smith 95 Sep 11 17:03 run.sh*
    -rw-r--r-- 1 aaron.smith aaron.smith 3.7M Sep 11 17:03 tmpXCjTMI.qcow2
    -rw-r--r-- 1 aaron.smith aaron.smith 537M Sep 11 17:03 tmpz8XMvm.qcow2

    ubuntu-vmw6:
    total 538M
    -rw-r--r-- 1 aaron.smith aaron.smith 4.2M Sep 11 17:19 tmpeUGwQZ.vmdk
    -rw-r--r-- 1 aaron.smith aaron.smith 550M Sep 11 17:18 tmpU_bTYR.vmdk
    -rwx---r-x 1 aaron.smith aaron.smith 672 Sep 11 17:19 ubuntu.vmx*



    Does anybody know why esxi disks are full-sized? Is it possible to create small disk files for all hypervisors, or specify if the disk should be sparse or fully pre-allocated?

    --
    @@ron

  2. #2
    Join Date
    Sep 2012
    Beans
    2

    Post Re: vmbuilder generated disk file size

    When ESXi 4 runs at its default installation and it detects a single 2TB RAID 5 volume, it sets up the datastore as one large volume. Judging from the disk options during the creation of new drive volumes, the largest allowable partition size under this configuration is 250GB. But you can still just delete the data store and recreate it, choosing a your preferred block size.

    I just managed to search a solution for you as following

    From the ESX console:

    1. Log in to the ESX console.
    2. Run the command:

      # vmkfstools -P <path to datastore>

      The block size is in bold in this line:

      Capacity 429228294144 (409344 file blocks * 1048576), 8896118784 (8484 blocks) available

      Where 1048576 is equivalent to a 1 MB block size on a VMFS datastore.

    Hope this helps you.

  3. #3
    Join Date
    Dec 2007
    Location
    Eastern Washington
    Beans
    Hidden!
    Distro
    Ubuntu 16.10 Yakkety Yak

    Re: vmbuilder generated disk file size

    Thank you for the response. I'm not sure it's relevant to what I'm doing, however. My question is not about configuring the datastores in ESXi, but using vmbuilder to create a virtual machine for use on ESXi.

    vmbuilder generates a vmdk file that is the full size of the virtual disk, which implies that the virtual disk space is pre-allocated rather than allocated on demand. Virtual machines generated for other hypervisors create disks that allocate space on demand.

    --
    @@ron

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •