Scroll to navigation

guestfs-examples(3) Virtualization Support guestfs-examples(3)
 

名前

guestfs-examples - C から libguestfs を使用する例

書式

#include <guestfs.h>
guestfs_h *g = guestfs_create ();
guestfs_add_drive_ro (g, "disk.img");
guestfs_launch (g);
 cc prog.c -o prog -lguestfs
or:
 cc prog.c -o prog `pkg-config libguestfs --cflags --libs`

説明

このマニュアルページは C プログラミング言語から libguestfs を呼び出す例があります。 libguestfs を使用することに慣れていなければ、 guestfs(3) を読む必要もあります。

例: ディスクイメージの作成

@CREATE_DISK@

例: 仮想マシンのディスクイメージの検査

@INSPECT_VM@

例: デバッグおよびロギングの有効化

@DEBUG_LOGGING@

例: 仮想マシンにあるオペレーティングシステムのアイコンの表示

@DISPLAY_ICON@

例: libvirt 認証 API

@LIBVIRT_AUTH@

例: ローカル API のマウント

@MOUNT_LOCAL@

例: 複数のハンドルおよびスレッド

@COPY_OVER@

例: 仮想マシンからの DHCP アドレスの取得

@VIRT_DHCP_ADDRESS@

関連項目

guestfs(3), guestfs-erlang(3), guestfs-golang(3), guestfs-java(3), guestfs-lua(3), guestfs-ocaml(3), guestfs-perl(3), guestfs-python(3), guestfs-recipes(1), guestfs-ruby(3), http://libguestfs.org/.

著者

Richard W.M. Jones ("rjones at redhat dot com")

COPYRIGHT

Copyright (C) 2010-2014 Red Hat Inc.

LICENSE

BUGS

To get a list of bugs against libguestfs, use this link: https://bugzilla.redhat.com/buglist.cgi?component=libguestfs&product=Virtualization+Tools
To report a new bug against libguestfs, use this link: https://bugzilla.redhat.com/enter_bug.cgi?component=libguestfs&product=Virtualization+Tools
When reporting a bug, please supply:
The version of libguestfs.
Where you got libguestfs (eg. which Linux distro, compiled from source, etc)
Describe the bug accurately and give a way to reproduce it.
Run libguestfs-test-tool(1) and paste the complete, unedited output into the bug report.
2014-10-18 libguestfs-1.28.1