Skip to content

Chris' Laboratory

chrislee.kr – Personal blog as bookshelves

Menu
  • Home
  • Github
  • Contact Me
Menu

Vagrant Box 디스크 용량 늘리기

Posted on 15/10/201615/10/2016 by Chris Lee
Read Time:1 Minute, 15 Second

참고(Reference):

  • http://tuhrig.de/resizing-vagrant-box-disk-space/
  • http://derekmolloy.ie/resize-a-virtualbox-disk/
  • http://stackoverflow.com/questions/11659005/how-to-resize-a-virtualbox-vmdk-file

 

요약 

  • Vagrant는 디스크 용량을 바꿀수있는 옵션을 주지 않는다. 기본으로 40G(기본 이미지 10GB)를 제공하는데, 이 용량을 바꾸는 옵션을 제공하지 않는다.
  • Vagrant의 VirtualBox를 리사이징할려면 수동으로 리사이징을 해야한다.

 

순서

  1. Vagrant VM을 먼저 종료시킨다.
    $ vagrant halt
  2. 그리고 Vagrant VirtualBox VM이 어디에 위치한지 VirtualBox에서 찾는다.
    1-find-vm-location
  3. 해당 Virtualbox VM 폴더로 가서 VMDK disk를 VDI디스크로 변경시킨다.
    $ VBoxManage clonehd "box-disk1.vmdk" "cloned.vdi" --format vdi
  4. 이제 VDI디스크의 용량을 늘린다.
    $ VBoxManage modifyhd "cloned.vdi" --resize 51440
  5. VirtualBox에서 Settings -> Storage로 들어가 “box-disk1.vmdk”를 지우고 “Add Hard Disk”를 누른다음에 “cloned.vdi”를 추가한다.
    2-check-existing-hard-disk 3-add-cloned-vdi
  6. GParted ISO를 다운받는다. http://gparted.sourceforge.net/download.php
  7. VirtualBox -> System -> Boot Order에서 Optical을 선택하고 맨 위로 올린다.
    4-change-boot-order
  8. VirtualBox -> Settings -> Storage에서 “Add Optical Disk”를 누르고 다운로드한 GParted ISO를 추가한다.
    5-add-gparted-live-iso
  9. VirtualBox에서 Start를 눌러 GParted를 실행한다.
  10. 아래와 같은 화면이 나오면 GParted Live를 선택하고 엔터를 누른다.
    6-gparted-live-screen-1
  11. 아래와 같은 화면이 나오면 Don’t touch keymap을 선택하고 엔터를 누른다.
    6-gparted-live-screen-2
  12. 아래와 같은 화면이 나오면 엔터를 누른다.
    6-gparted-live-screen-3 6-gparted-live-screen-4
  13. GParted가 실행되면 /dev/sda1에서 오른쪽 마우스를 눌러 Resize/Move 메뉴를 선택한다.
    7-gparted-resize_move
  14. 오른쪽 화살표를 오른쪽 끝으로 끌어서 Free space following이 0이 되도록 한다. 그리고 Resize/Move 버튼을 누른다.
    8-gparted-resize-screen-1
  15. 메뉴 툴바에서 Apply버튼을 누르고 확인 메시지에서 Apply 버튼을 다시한번 누른다.
    8-gparted-resize-screen-2 8-gparted-resize-screen-38-gparted-resize-screen-4
  16. 적용이 모두 완료되고 나면 바탕화면에서 Exit 아이콘을 누르고 Shutdown을 선택한뒤 OK버튼을 누른다.
    8-gparted-exit
  17. Vagrant를 다시 켜서 용량을 확인한다.
    $ vagrant up
    $ df

    9-check-disk-size

  18. “box-disk1.vmdk”를 지운다.
    rm box-disk1.vmdk

     

Share

Facebook
Twitter
LinkedIn
Email

Related

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Categories

  • Databases (11)
    • MongoDB (4)
    • MS-SQL (1)
    • MySQL (6)
  • E-Commerce (8)
    • Magento (8)
  • Finance (2)
  • Frameworks (84)
    • Adobe Flex (1)
    • Angular (ngx) (3)
    • Codeigniter (6)
    • CSS (5)
    • Django (2)
    • Javascript (13)
    • Node.js (6)
    • PHP (17)
    • React Native (4)
    • React.js (1)
    • Sencha Touch (4)
    • Terraform (1)
    • Vue.js (1)
    • WordPress (4)
    • Yii2 (3)
  • General Documents (15)
  • Marketing (3)
  • Mobile Development (33)
    • Android (20)
    • iPhone (13)
  • Platforms (21)
    • Arduino (2)
    • Docker (5)
    • Google App Engine (5)
    • Raspberry Pi (5)
    • Samsung Smart TV (4)
  • Security (17)
  • Server (31)
    • Linux (13)
  • Tools (14)
    • SVN (7)
  • Uncategorized (2)

Search

Recent Posts

  • Bootstrapping Kubernetes cluster with kubeadm
  • Taint all resources in the one module
  • Alpine – Plugin caching_sha2_password could not be loaded
  • npm link with peerDependencies
  • How to setup Gitlab runner with KVM enabled

Recent Comments

  • Obayed on Binance Auto Trading Bot – Buy low/Sell high with stop loss limit/Trade multiple coins
  • Ari on How to install memcache.so/memcached.so for MAMP Pro (Mac)
  • Mida ali on Binance Auto Trading Bot – Buy low/Sell high with stop loss limit/Trade multiple coins
  • Chris Lee on How to install memcache.so/memcached.so for MAMP Pro (Mac)
  • Chris Lee on Setting Up A VPN Server On OSX 10.6

Tags

1 ajax amazon android android-addpart browser chrislee-kr codeigniter codeigniter-tcpdf com-apple-net-racoon CSS CSS history hack delpaigmail-com entity-addpart-double exception-printing-is-disabled-by-default-for-security-reasons ext-plugins-listpagingplugin ext-plugins-listpagingplugin-example f iphone javascript jquery-defaultchecked jquery-samsung-smart-tv listpagingplugin mac magento-exception-printing-is-disabled-by-default-for-security-reasons magento-sample-data-exception-printing-is-disabled-by-default-for-security-reasons nu-vot null-core-errors-confignotfound-config-mk9engine-ini php samsung-smart-tv-jquery samsung-smart-tv-sdk-ajax samsung-smart-tv-sdk-jquery samsung-tv-sdk samsung-tv-sdk-jquery samsung tv sencha-smart-tv sencha-touch-list-paging smart-tv-jquery sqlite subversion svn tcedook tcpdf-codeigniter uilinebreakmodecharacterwrap-is-deprecated unknown-column-link-area

Meta

  • Log in
  • Entries feed
  • Comments feed
  • WordPress.org
© 2023 Chris' Laboratory | Powered by Minimalist Blog WordPress Theme
 

Loading Comments...