Thanks, Klaus.<br><br>I understand that it's not 100% safe way :) <br><br>Thanks again<br><br><div class="gmail_quote">30 ÍÁÒÔÁ 2010 Ç. 16:43 ÐÏÌØÚÏ×ÁÔÅÌØ Klaus Espenlaub <span dir="ltr"><<a href="mailto:Klaus.Espenlaub@sun.com">Klaus.Espenlaub@sun.com</a>></span> ÎÁÐÉÓÁÌ:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><div class="im">Sergey Malykhin wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
Thanks, Nikolay,<br>
<br>
I meant that I hacked kernel a little to get information about file, data buffer, buffer size and offset in file. And it's ok. I'm only not sure that I'll have working backup if do it while VB is running. I understand that the best solution - suspend VB and copy, but it's less interestin, because I'll have pauses in VB work.<br>

</blockquote>
<br></div>
Sorry to sound a little annoyed, but I really don't understand why adding a little virtualization makes people think they're looking at something they never did before.<br>
<br>
Creating a copy of the VDI file (no matter how smart is it done by intercepting file writes and what not) is just like creating a sector-based copy of a hard disk without knowledge of the running guest OS. Without taking special measures (for most OSes I wouldn't know what to do actually) there cannot be any guarantee that the resulting copy is consistent. Even pausing a VM will not fundamentally change this, because the guest OS could have unwritten changes in its filesystem cache, i.e. in RAM. It'll frequently work without noticeable corruption, but it remains a "keep fingers crossed" solution.<br>

<br>
The only safe ways to create backups are those which the guest OS is aware of (file-based or guest OS based snapshotting like Nikolay suggested), or completely shut down the guest OS. Using mechanisms like saving state in VirtualBox would require backing up the VM state file as well.<br>

<br>
Klaus<br>
<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
Sergey<br>
<br>
2010/3/30 Nikolay Igotti <<a href="mailto:Nikolay.Igotti@sun.com" target="_blank">Nikolay.Igotti@sun.com</a> <mailto:<a href="mailto:Nikolay.Igotti@sun.com" target="_blank">Nikolay.Igotti@sun.com</a>>><div class="im">
<br>
<br>
 š š Hi Sergey,<br>
<br>
 š šNot sure what you mean by "I'm controlling write function to vdi<br>
 š šfile from kernel", but in general it's possible to use FS's (such as<br>
 š šZFS) snapshotting capability to take snapshots of live VMs image.<br>
 š šOTOH to be 100% safe, I would pause VM, flush OS write buffers with<br>
 š š'sync', and then copy underlying .vdi.<br>
 š šIf you assume image to change insignificantly, maybe it would make<br>
 š šsense to take snapshot once image stabilized, and only backup<br>
 š šdifferences.<br>
<br>
 š šHope that'll help,<br>
 š šNikolay<br>
<br>
<br>
<br>
 š šSergey Malykhin ÐÉÛÅÔ:<br>
<br>
 š š š šHello,<br>
<br>
 š š š šI have VB running and want to make backup for vdi file. But I<br>
 š š š šonly need to have changed sectors. I'm controlling write<br>
 š š š šfunction to vdi file from kernel. Can you please answer is it<br>
 š š š šenough just copy it while VM is running or I need to suspend it?<br>
<br>
 š š š šTIA<br>
 š š š š------------------------------------------------------------------------<br>
<br>
 š š š š_______________________________________________<br>
 š š š švbox-dev mailing list<br></div>
 š š š š<a href="mailto:vbox-dev@virtualbox.org" target="_blank">vbox-dev@virtualbox.org</a> <mailto:<a href="mailto:vbox-dev@virtualbox.org" target="_blank">vbox-dev@virtualbox.org</a>><div class="im"><br>
 š š š š<a href="http://vbox.innotek.de/mailman/listinfo/vbox-dev" target="_blank">http://vbox.innotek.de/mailman/listinfo/vbox-dev</a><br>
 š š š š <br>
<br>
<br>
<br>
------------------------------------------------------------------------<br>
<br>
_______________________________________________<br>
vbox-dev mailing list<br>
<a href="mailto:vbox-dev@virtualbox.org" target="_blank">vbox-dev@virtualbox.org</a><br>
<a href="http://vbox.innotek.de/mailman/listinfo/vbox-dev" target="_blank">http://vbox.innotek.de/mailman/listinfo/vbox-dev</a><br>
</div></blockquote>
<br>
<br>
-- <br>
Dr. Klaus Espenlaub<br>
Sun Microsystems GmbH<br>
Werkstrasse 24<br>
71384 Weinstadt<br>
Germany<br>
<br>
=====================================================================<br>
Sitz der Gesellschaft:<br>
Sun Microsystems GmbH, Sonnenallee 1, D-85551 Kirchheim-Heimstetten<br>
Amtsgericht Muenchen: HRB 161028<br>
Geschaeftsfuehrer: Thomas Schroeder<br>
=====================================================================<br>
</blockquote></div><br>