VirtualBox

Changes between Initial Version and Version 1 of Ticket #14977, comment 4


Ignore:
Timestamp:
Sep 3, 2019 2:13:44 PM (5 years ago)
Author:
Maxxim

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #14977, comment 4

    initial v1  
    1212
    1313I tested this and can confirm that it does NOT work this way. The compacted VDI expands to full size when re-encrypting.
     14
     15I came up with a different workaround:
     16- start VM, clean disk, defragment disk, zero free space, shutdown VM
     17- add new VDI of equal size to VM
     18- edit .vbox file of VM to add encryption to new VDI (refer to old VDI for format; could not find any way to do this via GUI)
     19- add live CD to VM (e.g. SystemRescueCD), start VM, boot into live CD
     20- transfer partition table + bootloader to new disk (e.g. 'dd if=/dev/sda of=/dev/sdb bs=512 count=63')
     21- transfer partition data using ntfsclone (e.g. 'ntfsclone --overwrite /dev/sdb1 /dev/sda1'; repeat for other partitions)
     22- shutdown VM, remove old VDI
     23
     24-> done. tested, works fine.

© 2023 Oracle
ContactPrivacy policyTerms of Use