<html><body><div style="color:#000; background-color:#fff; font-family:times new roman, new york, times, serif;font-size:12pt"><div>hi Mr Rich.</div><div>I`m new to programming on Linux, new to Perl, Python.</div><div>How long do you think it will take me to finish the script ?</div><div>Thank you.</div><div>Comment if you have time :)<br></div><div style="font-family: times new roman, new york, times, serif; font-size: 12pt;"> <div style="font-family: times new roman, new york, times, serif; font-size: 12pt;"> <div dir="ltr"> <font face="Arial" size="2"> <hr size="1">  <b><span style="font-weight:bold;">From:</span></b> Richard W.M. Jones <rjones@redhat.com><br> <b><span style="font-weight: bold;">To:</span></b> Tho Huynh <feeliwood@yahoo.com>; libguestfs@redhat.com <br> <b><span style="font-weight: bold;">Sent:</span></b> Friday, 9 March 2012, 1:23<br> <b><span style="font-weight: bold;">Subject:</span></b> Re: mounting using guestfish<br>
 </font> </div> <br>[Please remember to post all questions on the mailing list]<br><br>On Thu, Mar 08, 2012 at 09:41:19PM +0700, Tho Huynh wrote:<br>> Can I mount the guest's file system into a folder/path (mountpoint)<br>> in the host machine using guestfish?<br><br>No, but you don't need to.<br><br>> And accessing that folder equal to accessing the guest's file<br>> system.  What I'm trying to do is to copy a file from one guest to<br>> another directly but to achieve full disk speed.<br><br>Guestfish cannot connect to two guests at the same time, so you would<br>need to download the file from one guest and upload it to the other.<br>(I'm still assuming here that you are using libguestfs live).  eg:<br><br>  guestfish --live -d Source download /some/file /tmp/file<br>  guestfish --live -d Destination upload /tmp/file /some/file<br><br>If that isn't fast enough or you need to avoid the local copy, it is<br>possible to
 connect two handles together and copy the file directly<br>between them, but you'd have to write a script against the API (eg. in<br>Perl/Python/etc).<br><br>    .  .  .<br><br>In the *non-live* case, there is another method: add the disks of both<br>guests, 'launch', and copy the file between mountpoints (see the<br>'mkmountpoint' command).  Surprisingly, this is not necessarily going<br>to be faster than downloading and uploading.  This method also has<br>some limitations -- it's not possible to use two guests that have<br>conflicting volume group names; and even security issues -- a<br>malicious guest could interfere with the other guest.<br><br>Rich.<br><br>-- <br>Richard Jones, Virtualization Group, Red Hat <a href="http://people.redhat.com/%7Erjones" target="_blank">http://people.redhat.com/~rjones</a><br>virt-df lists disk usage of guests without needing to install any<br>software inside the virtual
 machine.  Supports Linux and Windows.<br><a href="http://et.redhat.com/%7Erjones/virt-df/" target="_blank">http://et.redhat.com/~rjones/virt-df/</a><br><br><br> </div> </div>  </div></body></html>