github.com/circular-dark/docker@v1.7.0/docs/articles/b2d_volume_resize.md (about)

     1  <!--[metadata]>
     2  +++
     3  title = "Resizing a Boot2Docker volume	"
     4  description = "Resizing a Boot2Docker volume in VirtualBox with GParted"
     5  keywords = ["boot2docker, volume,  virtualbox"]
     6  [menu.main]
     7  parent = "smn_win_osx"
     8  +++
     9  <![end-metadata]-->
    10  
    11  # Getting “no space left on device” errors with Boot2Docker?
    12  
    13  If you're using Boot2Docker with a large number of images, or the images you're
    14  working with are very large, your pulls might start failing with "no space left 
    15  on device" errors when the Boot2Docker volume fills up. The solution is to 
    16  increase the volume size by first cloning it, then resizing it using a disk 
    17  partitioning tool. 
    18  
    19  We recommend [GParted](http://gparted.sourceforge.net/download.php/index.php).
    20  The tool comes as a bootable ISO, is a free download, and works well with 
    21  VirtualBox.
    22  
    23  ## 1. Stop Boot2Docker
    24  
    25  Issue the command to stop the Boot2Docker VM on the command line:
    26  
    27      $ boot2docker stop
    28  
    29  ## 2. Clone the VMDK image to a VDI image
    30  
    31  Boot2Docker ships with a VMDK image, which can’t be resized by VirtualBox’s 
    32  native tools. We will instead create a VDI volume and clone the VMDK volume to 
    33  it. 
    34  
    35  Using the command line VirtualBox tools, clone the VMDK image to a VDI image:
    36  
    37      $ vboxmanage clonehd /full/path/to/boot2docker-hd.vmdk /full/path/to/<newVDIimage>.vdi --format VDI --variant Standard
    38  
    39  ## 3. Resize the VDI volume
    40  
    41  Choose a size that will be appropriate for your needs. If you’re spinning up a 
    42  lot of containers, or your containers are particularly large, larger will be 
    43  better:
    44  
    45      $ vboxmanage modifyhd /full/path/to/<newVDIimage>.vdi --resize <size in MB>
    46  
    47  ## 4. Download a disk partitioning tool ISO 
    48  
    49  To resize the volume, we'll use [GParted](http://gparted.sourceforge.net/download.php/). 
    50  Once you've downloaded the tool, add the ISO to the Boot2Docker VM IDE bus. 
    51  You might need to create the bus before you can add the ISO. 
    52  
    53  > **Note:** 
    54  > It's important that you choose a partitioning tool that is available as an ISO so 
    55  > that the Boot2Docker VM can be booted with it.
    56  
    57  <table>
    58  	<tr>
    59  		<td><img src="/articles/b2d_volume_images/add_new_controller.png"><br><br></td>
    60  	</tr>
    61  	<tr>
    62  		<td><img src="/articles/b2d_volume_images/add_cd.png"></td>
    63  	</tr>
    64  </table>
    65  
    66  ## 5. Add the new VDI image 
    67  
    68  In the settings for the Boot2Docker image in VirtualBox, remove the VMDK image 
    69  from the SATA controller and add the VDI image.
    70  
    71  <img src="/articles/b2d_volume_images/add_volume.png">
    72  
    73  ## 6. Verify the boot order
    74  
    75  In the **System** settings for the Boot2Docker VM, make sure that **CD/DVD** is 
    76  at the top of the **Boot Order** list.
    77  
    78  <img src="/articles/b2d_volume_images/boot_order.png">
    79  
    80  ## 7. Boot to the disk partitioning ISO
    81  
    82  Manually start the Boot2Docker VM in VirtualBox, and the disk partitioning ISO 
    83  should start up. Using GParted, choose the **GParted Live (default settings)** 
    84  option. Choose the default keyboard, language, and XWindows settings, and the 
    85  GParted tool will start up and display the VDI volume you created. Right click 
    86  on the VDI and choose **Resize/Move**. 
    87  
    88  <img src="/articles/b2d_volume_images/gparted.png">
    89  
    90  Drag the slider representing the volume to the maximum available size, click 
    91  **Resize/Move**, and then **Apply**. 
    92  
    93  <img src="/articles/b2d_volume_images/gparted2.png">
    94  
    95  Quit GParted and shut down the VM. Remove the GParted ISO from the IDE controller 
    96  for the Boot2Docker VM in VirtualBox.
    97  
    98  ## 8. Start the Boot2Docker VM 
    99  
   100  Fire up the Boot2Docker VM manually in VirtualBox. The VM should log in 
   101  automatically, but if it doesn't, the credentials are `docker/tcuser`. Using 
   102  the `df -h` command, verify that your changes took effect.
   103  
   104  <img src="/articles/b2d_volume_images/verify.png">
   105  
   106  You’re done!
   107