SHRINK Ổ ĐĨA VMWARE
Source: https://kingtam.win/archives/vmdk-shrink.html
Dùng lệnh cd vào thư mục chứa file
ví dụ: cd /vmfs/volumes/652a35e3-852aa600-7ec9-d4f5ef622278/PC-TEST1
Vào phần quản lý datastore tìm đường dẫn chính xác như hình bên dưới, lưu ý có phân biệt chữ hoa chữ thường
Dùng lệnh vi để edit file ổ cứng
ví dụ: vi PC-TEST1.vmdk
Để ý phần con số sau chữ RW, đây là dung lượng tính theo bit
167.772.160 = 80 * (2 * 1.024 * 1024) => ổ 80GB
Để giảm còn 60GB, nghĩa là: 167.772.160 - 20 * (2 * 1.024 * 1024) = 125.829.120
Cập nhật số này vào file, save lại là xong.
Tìm hiểu thêm bộ lệnh vi editor
- $ vi <filename> — Open or edit a file.
- i — Switch to Insert mode.
- Esc — Switch to Command mode.
- :w — Save and continue editing.
- :wq or ZZ — Save and quit/exit vi.
- :q! — Quit vi and do not save changes.
- yy — Yank (copy) a line of text.
- p — Paste a line of yanked text below the current line.
Comments
Post a Comment