App-FuguVM

 view release on metacpan or  search on metacpan

man/fuguvm/fuguvm.1  view on Meta::CPAN

.Pa src
component.
The bytes move over the SFTP channel.
.Pp
The tool writes each file to a temporary name beside its destination,
and then publishes every file with
.Xr mv 1 .
A failure removes every temporary file.
Thus a failed run leaves no partial destination file.
A directory copy is not atomic as a whole:
a failure can leave files that an earlier batch published.
.Pp
.Fl Fl mode
sets the mode of each written file,
as 3 or 4 octal digits.
Without the option,
each file keeps its local permission bits,
masked with 0777,
so no setuid bit and no setgid bit arrives.
The option does not apply to a directory:
.Ql mkdir -p
gives each directory the mode that the remote umask allows.
.Pp
The tool refuses a source with a symbolic link,
a device node,
a socket,
or a fifo,
and a file above 64 MiB,
before it writes one byte.
.It Cm get Ar remote local
Copy one regular guest file at the absolute path
.Ar remote
to the host file
.Ar local .
The tool reads the whole file first,
and then writes
.Ar local
atomically,
mode 0644.
Thus a failure leaves no partial local file.
One call copies one file:
the tool lists no remote directory.
.Ar local
must not be an existing directory.
The command needs a Fugu release with
.Ql Fugu::SSH->read_file ;
with an older release it names the needed release and exits with
code 1.
.It Cm console
Attach the terminal of the operator to the VM serial console,
with
.Xr telnet 1 ,
at the connect address of the guest:
the
.Ar bind_address ,
or
.Li 127.0.0.1
when the ports bind to
.Li 0.0.0.0 .
The guest never closes the console.
End the session with the telnet escape key,
.Ql Ctrl-\&] ,
and then
.Ic quit .
The tool restores the terminal on every exit path.
.Pp
The console takes one client.
An installation and
.Cm expect
each hold the same port,
so do not attach while one runs.
.It Cm expect Ar script Op Ar argument ...
Run an
.Xr expect 1
script against the VM console.
.It Cm wait Op Fl Fl timeout Ns = Ns Ar seconds
Block until the VM accepts SSH connections
(default timeout: 120 seconds).
.It Cm cache Cm list | clear Op Fl Fl stale
Manage all data under
.Ar cache_dir :
the installed-image cache that
.Sx IMAGE CACHE
describes,
and the downloads that the built-in proxy keeps for the installer.
.Cm list
shows one line for each cached image
.Pq key, size, creation time, snapshot count .
It puts a mark on the entry that the invoked VM's configuration
derives at this time.
Then it shows the proxy's downloads by
.Ox
version,
and one
.Ql Distfiles
line with the size of the distfile tree and the
.Ar distfile_cache
cap.
The line stays absent while the tree is empty.
.Cm clear
removes each image and each download,
the distfile tree included.
.Fl Fl stale
keeps only the image that the invoked VM derives,
and only the downloads for the
.Ox
.Ar version
that it installs.
It keeps the distfile tree,
because a distfile carries no version and a refill is expensive,
and it re-applies the
.Ar distfile_cache
cap.
Both forms also remove temporary trees that an interrupted save leaves
behind.
.Pp
This removal is the only limit on the downloads.
Their key is the
.Ox
version alone,
and it has no input in common with the image keys.



( run in 0.817 second using v1.01-cache-2.11-cpan-54e63673c56 )