VirtualBox VM no unallocated space shown in Gparted - virtualbox

I resized a .vdi file to a new size, which registers correctly in VirtualBox. Now I want to resize the partition through GParted, but GParted doesn't show any unallocated space. How can I get GParted to recognize the new space?

Ok, I solved it. I figured out that I needed to delete all Snapshots. But this wouldnt work for some reasons. So I made a clone with not Snapshots and then I could use Gparted in a proper way.

Related

How do you clear the persistent storage for a notebook instance on AWS SageMaker?

So I'm running into the following error on AWS SageMaker when trying to save:
Unexpected error while saving file: untitled.ipynb [Errno 28] No space left on device
If I remove my notebook, create a new identical one and run it, everything works fine. However, I'm suspecting the Jupyter checkpoint takes up too much space if I save the notebook while it's running and therefore I'm running out of space. Sadly, getting more storage is not an option for me, so I'm wondering if there's any command I can use to clear the storage before running my notebook?
More specifically, clearing the persistent storage in the beginning and at the end of the training process.
I have googled like a maniac but there is no suggestion aside from "just increase the amount of storage bro" and that's why I'm asking the question here.
Thanks in advance!
If you don't want your data to be persistent across multiple notebook runs, just store them in /tmp which is not persistent. You have at least 10GB. More details here.
I had the exact same problem, and was not unable to find a decent answer to it online. However, I was fortunately able to resolve the issue.
I use an R kernel, so the solution might be slightly different.
You can check the storage going in the terminal and typing db -kh
You are likely mounted on the /home/ec2-user/SageMaker and can see its "Size" "Used" "Avail" and "Use%".
There are hidden folders that function as a recycle bin. When I use R command list.dirs() it reveals a folder named ./.Trash-1000/ which kept a lot of random things that had been supposedly removed from the storage.
I just deleted the folder unlink('./.Trash-1000/', recursive = T) and it the entire storage was freed.
Hope it helps.

gparted and partition ubuntu server

I want to add the unallocated space to my partition /dev/sda1 but Gparted seems to prevent this
how to fix this problem?
I solved the problem by delteting /dev/sda5 (it has no data already) then a recreate it in the end of partion

How to reduce the physical size of the disk in VirtualBox VDI

The size of VDI virtual disk file of a virtual machine was increased by the amount of files saved in it.
Now I released disk space, leaving less than half the previous space, but the VDI file does not decrease. (Obviously does not increase)
Is there any way to reduce the VDI file?
I know that by cloning is reduced, but there is another one easier to do?
Thank you in advance
Thank you to lewis4u for the words i need to find the solution. vboxmanage, resize, etc
I working in linux, and I don't need to make a resize.
The solution is fill with zeroes and compact it.
See this link for more details
https://superuser.com/questions/529149/how-to-compact-virtualboxs-vdi-file-size

edit & compile source without a copy being stored in disk memory

I want to keep only a few copies of source of password hashing and logins for the database & other sites physically with me for maximum security.
How can I edit and compile the source without a copy ever making it onto disk. In other words, is there an unix editor that won't copy the file automatically to disk memory, and can g++ be prevented from storing a copy on the disk during compilation?
If you absolutely need to do this I suggest that you do two things.
Install drive encryption software and use the strongest algorithm possible. Then encrypt a USB stick and stash the private key in a safe deposit box. This takes care of accessing and storing the sensitive data in a portable "take it with me" fashion.
If you want to be excessively paranoid and prevent the file from being copied to an unsecure drive the second thing you can do install a RAM disk and do all of your work on that. You may still have some data stored on disk through virtual memory (which you can turn off if you like) but all operations to the file will occur in RAM. You can then copy the changed files back over to the USB stick or do some sort of syncing. Perhaps a Git repository on the USB stick so you can do a pull into the RAM disk and push changes back out to whatever your active development branch is.
A third option. Get a cheap laptop, encrypt the entire drive and take that with you. It's everything all wrapped up into one!

Restoration from snapshots in virtualbox

I am using virtual box and maintaining a regular back by taking snapshots and storing it in an external hard disk.Now the system in which my virtual box was installed have crashed. How can i recover my last work from the snapshots that have stored in the external hard disk.
Snapshots are essentially "diff files" meaning that this file documents the changes between sessions (or within a session).
You can't diff a non existing base.
Example:
Lets look at the following set of commands:
Pick a number
Add 3
Substract 4
Multiply by 2
Now the outcome would change according to the first number you've picked so if the base is unknown the set of "diff" doesn't really help.
Try putting your hands on the vmdk/vhd/vdi file again, this might do the trick more easily.
Kind regards,
Yaron Shahrabani.
The way I did is that you copy the snapshot to the default Snapshot folder of that vm e.g. for my Windows 2000 "Snapshot" folder is in /home/mian/VirtualBox VMs/Windows_Professional_2000_sp4_x86/Snapshots
Once copied run this command
vboxmanage snapshot Windows_professional_2000_sp4_x86 restore Snapshot5
If the name contain space e.g Snapshot 5 then run this command
vboxmanage snapshot Windows_professional_2000_sp4_x86 restore Snapshot\ 5
It is for linux but you can almost similar for windows too like changing vboxmanage to vboxmanage.exe