Code: Select all
Error: Shrink hard disk operation is not implemented!I know that this works. I have done this some time before.
Code: Select all
Error: Shrink hard disk operation is not implemented!You would need to install an old version.Soulatial wrote:What happens if I use the vboxmanage.exe from an older virtualbox version, will that work or what can happen?
Sorry no.Soulatial wrote:Do you have more Tutorials especially for VHD or VMDK. I'm curious what are the differences / advantages of each.
You have to remember that fragmentation can occur at three levels: on the host FS, within the VDI mapping, and within the guest FS. In my experience (especially on Windows OSs, the VDI fragmentation is the least of these. I've got a defrag written in Perl, which I am going to port to python and publish on the forum.Soulatial wrote:Last but not least. I'm very interested in writing my own VDI defrag program (in C++), not compacting. Of course your tutorial is good, but a technical document with datatypes (e.g. int or __int64 or float,...) would help me very much. Where can I find a technical doc about the VDI format.
I tried it there http://www.virtualbox.org/wiki/VirtualBox_architecture but didn't find anything.
I know, but I could do that inside a VM or on another PC and so just gain the vboxmanage.exe and nothing more. So I'd like to know what happens when I have this pure file from the old version and the rest on the system is from the new version without the compacting support.You would need to install an old version.
Or even at for levels, cause I encrypt them with TrueCrypt. So I have the container file that is also fragmented on my harddisk and can't be defragmented.You have to remember that fragmentation can occur at three levels: on the host FS, within the VDI mapping, and within the guest FS.
I know you've written that program, but python is still a interpreted programming language and therefore not very efficient and you need to install a python interpreter, so I prefer C(++).I've got a defrag written in Perl, which I am going to port to python and publish on the forum.
You are correct in saying that the VDI uses 1Mbyte pages, but if you look at the source, if the guest does an N cluster read, then this is mapped directly onto the host file system as an N*<cluster size> read. The only time that this is split into multiple reads is if the read spans a 1Mbyte page boundary.Soulatial wrote:Can you really say that VDI fragmentation is only a minor concern? So suggest you have inside the guest a file system with 4 KB clusters. The VDI file is lying unfragmented on the host FS. Now you have a file with 1 MB in the guest FS, that means 256 clusters. These 256 clusters are spread all over the guest filesystems. That means you have to read 256 blocks in the VDI, that means 256 MB. Suppose the VDI file is internally unfragmented, now you read 256 MB from the host, you position the drive head once and then you read the next 256 MB, lasting 3-4 seconds on modern harddisks.
Sorry but you are wrong here. First Python is compiled into bytecodes which are then executed by the Python RTS and is therefore its runtime comparable in runtime to Java, and hence on a modern PC can run at anything between 1-50M Bytecode instructions per second. The basic loop which copies a 1Mbyte block is about 50 bytecode instructions so even if we take the worst case, this is 1-50 ?S per Mbyte copied. So the Python overhead is truly negligible.Soulatial wrote:I know you've written that program, but python is still a interpreted programming language and therefore not very efficient and you need to install a python interpreter, so I prefer C(++).I've got a defrag written in Perl, which I am going to port to python and publish on the forum.
Thank you. That's a good idea to defrag (when you have the necessary space), but OpenSuse won't boot from the clone. I think its because of the changed UUID.Incidentally the new version 2.1 clone algorithm just copies the entire content from the source disk to the destination disk from sector 0 to the last sector. Clearly reads from unallocated pages return zeros and zero writes to unallocated pages are optimised out. Hence doing a clonehd effectively defragments the disk and compacts it .
I don't mind, is that all, would that work ?TerryE wrote:You would need to install an old version.Soulatial wrote:What happens if I use the vboxmanage.exe from an older virtualbox version, will that work or what can happen?