<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=windows-1252">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <br>
    <div class="moz-forward-container"><br>
      <br>
      -------- Forwarded Message --------
      <table class="moz-email-headers-table" border="0" cellpadding="0"
        cellspacing="0">
        <tbody>
          <tr>
            <th align="RIGHT" nowrap="nowrap" valign="BASELINE">Subject:
            </th>
            <td>Re: [Libguestfs] Question: running appliance commands
              over guest fs (resize2fs -P).</td>
          </tr>
          <tr>
            <th align="RIGHT" nowrap="nowrap" valign="BASELINE">Date: </th>
            <td>Tue, 15 Sep 2015 17:17:16 +0300</td>
          </tr>
          <tr>
            <th align="RIGHT" nowrap="nowrap" valign="BASELINE">From: </th>
            <td>Maxim Perevedentsev <a class="moz-txt-link-rfc2396E" href="mailto:mperevedentsev@virtuozzo.com"><mperevedentsev@virtuozzo.com></a></td>
          </tr>
          <tr>
            <th align="RIGHT" nowrap="nowrap" valign="BASELINE">To: </th>
            <td>Richard W.M. Jones <a class="moz-txt-link-rfc2396E" href="mailto:rjones@redhat.com"><rjones@redhat.com></a></td>
          </tr>
        </tbody>
      </table>
      <br>
      <br>
      <pre>
On 09/15/2015 04:57 PM, Richard W.M. Jones wrote:
>> 2) More general, how to execute commands from appliance but make
>> them run over image (which may not have anything but filesystem) - I
>> saw something like that in source.
> Not sure I understand the question?
>
> Rich.
As I understand, guestfs runs its own kernel-like daemon that can run 
its own commands. It is used to run e.g. resize2fs or e2fsck over loaded 
disk images. But those two utilities require the partition not to be 
mounted, so they are run by daemon and do not require anything to exists 
on partition.

In API I found only the 'command' command which requires the partition 
to be mounted and have kernel image on it. This cannot operate on empty 
or non-mounted partition.

So I wonder if there is a legal way to run arbitrary commands from 
daemon but make them operate on non-mounted, possibly empty 
images/partitions.

(Maybe I am missing something, I just run guestfish in verbose mode and 
executed e2fsck and resize2fs).

-- 
Your sincerely,
Maxim Perevedentsev

</pre>
      <br>
    </div>
    <br>
  </body>
</html>