Re: [Libguestfs] [Qemu-devel] Cubietruck: cannot create KVM guests: "kvm_init_vcpu failed: Invalid argument"
by Richard W.M. Jones
On Tue, Dec 09, 2014 at 05:48:04PM +0100, Kashyap Chamarthy wrote:
> On Tue, Dec 09, 2014 at 11:27:02AM +0000, Richard W.M. Jones wrote:
> > On Tue, Dec 09, 2014 at 10:53:41AM +0000, Peter Maydell wrote:
> > > On 9 December 2014 at 10:50, Kashyap Chamarthy <kchamart(a)redhat.com> wrote:
> > > > Booting a minimal KVM guest throws the below error on Cubietruck:
> > > >
> > > > "kvm_init_vcpu failed: Invalid argument"
>
> [. . .]
>
> > > > So that's the answer really, it's a qemu bug. Actually it looks as
> > > > if qemu contains some code to try to get the host CPU type, but it
> > > > doesn't work, or maybe we need to pass a -cpu option ..."
> > >
> > > Yes, you need to pass a -cpu option. For KVM on ARM, you
> > > always need to either:
> > > * pass a -cpu option matching the host CPU
> > > * pass "-cpu host"
> > >
> > > The CubieTruck is a Cortex-A7, which we don't have specific
> > > support for in QEMU, so you will need "-cpu host".
> >
> > Kashyap ^^ can you try this? Should be a trivial one-liner change
> > in src/launch-direct.c.
>
> Yes it works with it :-)
>
> With the below diff in `libguestfs`:
>
> $ git diff src/launch.c
> diff --git a/src/launch.c b/src/launch.c
> index 9fadce8..ce71a8e 100644
> --- a/src/launch.c
> +++ b/src/launch.c
> @@ -400,7 +400,7 @@ const char *
> guestfs___get_cpu_model (int kvm)
> {
> #if defined(__arm__) /* 32 bit ARM. */
> - return NULL;
> + return "host";
>
> #elif defined(__aarch64__)
> /* With -M virt, the default -cpu is cortex-a15. Stupid. */
>
>
> I can boot a KVM guest successfully on Cubietruck, invoked via
> libguestfs appliance:
>
> . . .
> [01433ms] /bin/qemu-system-arm \
> -global virtio-blk-device.scsi=off \
> -nodefconfig \
> -enable-fips \
> -nodefaults \
> -display none \
> -M vexpress-a15 \
> -cpu host \
> -machine accel=kvm:tcg \
> -m 500 \
> -no-reboot \
> -rtc driftfix=slew \
> -global kvm-pit.lost_tick_policy=discard \
> -kernel /home/kashyapc/src/libguestfs/tmp/.guestfs-1000/appliance.d/kernel \
> -dtb /home/kashyapc/src/libguestfs/tmp/.guestfs-1000/appliance.d/dtb \
> -initrd /home/kashyapc/src/libguestfs/tmp/.guestfs-1000/appliance.d/initrd \
> -device virtio-scsi-device,id=scsi \
> -drive file=/home/kashyapc/src/libguestfs/tmp/libguestfsRMfHzO/scratch.1,cache=unsafe,format=raw,id=hd0,if=none \
> -device scsi-hd,drive=hd0 \
> -drive file=/home/kashyapc/src/libguestfs/tmp/.guestfs-1000/appliance.d/root,snapshot=on,id=appliance,cache=unsafe,if=none \
> -device scsi-hd,drive=appliance \
> -device virtio-serial-device \
> -serial stdio \
> -chardev socket,path=/home/kashyapc/src/libguestfs/tmp/libguestfsRMfHzO/guestfsd.sock,id=channel0 \
> -device virtserialport,chardev=channel0,name=org.libguestfs.channel.0 \
> -append 'panic=1 mem=500M console=ttyAMA0 udevtimeout=6000 udev.event-timeout=6000 no_timer_check acpi=off printk.time=1 cgroup_disable=memory root=/dev/sdb selinux=0 guestfs_verbose=1 TERM=vt102'
> . . .
Kashyap, how about the following patch as discussed on IRC ...
Rich.
--
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
virt-top is 'top' for virtual machines. Tiny program with many
powerful monitoring features, net stats, disk stats, logging, etc.
http://people.redhat.com/~rjones/virt-top
9 years, 9 months
[PATCH] inspection: Not an installer if there are multiple partitions (RHBZ#1171666).
by Richard W.M. Jones
Regular EFI disks have /EFI on the first (VFAT) partition, but they
are not installers.
Fix this by only considering something to be an installer if it has a
single partition (or whole disks like ISOs).
Implementing this is quite complex since when checking a filesystem,
we don't have information about whether we are even looking at a
partition, nor about whether it's the first partition out of how many.
The majority of the commit is changing the code to collect that
information.
---
src/guestfs-internal.h | 1 +
src/inspect-fs-unix.c | 31 ++++---------------------------
src/inspect-fs.c | 44 ++++++++++++++++++++++++++++++++++++++------
src/inspect.c | 22 ++++++++++++++++++++++
4 files changed, 65 insertions(+), 33 deletions(-)
diff --git a/src/guestfs-internal.h b/src/guestfs-internal.h
index 0a4a6f2..0b25407 100644
--- a/src/guestfs-internal.h
+++ b/src/guestfs-internal.h
@@ -766,6 +766,7 @@ extern int guestfs___set_backend (guestfs_h *g, const char *method);
extern void guestfs___free_inspect_info (guestfs_h *g);
extern char *guestfs___download_to_tmp (guestfs_h *g, struct inspect_fs *fs, const char *filename, const char *basename, uint64_t max_size);
extern struct inspect_fs *guestfs___search_for_root (guestfs_h *g, const char *root);
+extern int guestfs___is_partition (guestfs_h *g, const char *partition);
/* inspect-fs.c */
extern int guestfs___is_file_nocase (guestfs_h *g, const char *);
diff --git a/src/inspect-fs-unix.c b/src/inspect-fs-unix.c
index 750c27b..5ba8beb 100644
--- a/src/inspect-fs-unix.c
+++ b/src/inspect-fs-unix.c
@@ -96,7 +96,6 @@ static char *resolve_fstab_device (guestfs_h *g, const char *spec,
Hash_table *md_map,
enum inspect_os_type os_type);
static int inspect_with_augeas (guestfs_h *g, struct inspect_fs *fs, const char **configfiles, int (*f) (guestfs_h *, struct inspect_fs *));
-static int is_partition (guestfs_h *g, const char *partition);
/* Hash structure for uuid->path lookups */
typedef struct md_uuid {
@@ -1431,7 +1430,7 @@ resolve_fstab_device_xdev (guestfs_h *g, const char *type, const char *disk,
ITER_DRIVES (g, i, drv) {
if (drv->name && STREQ (drv->name, name)) {
device = safe_asprintf (g, "%s%s", devices[i], part);
- if (!is_partition (g, device)) {
+ if (!guestfs___is_partition (g, device)) {
free (device);
return 0;
}
@@ -1458,7 +1457,7 @@ resolve_fstab_device_xdev (guestfs_h *g, const char *type, const char *disk,
*/
if (i < count) {
device = safe_asprintf (g, "%s%s", devices[i], part);
- if (!is_partition (g, device)) {
+ if (!guestfs___is_partition (g, device)) {
free (device);
return 0;
}
@@ -1491,7 +1490,7 @@ resolve_fstab_device_cciss (guestfs_h *g, const char *disk, const char *part,
if (drv->name && STREQ (drv->name, disk)) {
if (part) {
device = safe_asprintf (g, "%s%s", devices[i], part);
- if (!is_partition (g, device)) {
+ if (!guestfs___is_partition (g, device)) {
free (device);
return 0;
}
@@ -1536,7 +1535,7 @@ resolve_fstab_device_diskbyid (guestfs_h *g, const char *part,
/* Make the partition name and check it exists. */
device = safe_asprintf (g, "/dev/sda%s", part);
- if (!is_partition (g, device)) {
+ if (!guestfs___is_partition (g, device)) {
free (device);
return 0;
}
@@ -1786,25 +1785,3 @@ make_augeas_path_expression (guestfs_h *g, const char **configfiles)
debug (g, "augeas pathexpr = %s", ret);
return ret;
}
-
-static int
-is_partition (guestfs_h *g, const char *partition)
-{
- CLEANUP_FREE char *device = NULL;
-
- guestfs_push_error_handler (g, NULL, NULL);
-
- if ((device = guestfs_part_to_dev (g, partition)) == NULL) {
- guestfs_pop_error_handler (g);
- return 0;
- }
-
- if (guestfs_device_index (g, device) == -1) {
- guestfs_pop_error_handler (g);
- return 0;
- }
-
- guestfs_pop_error_handler (g);
-
- return 1;
-}
diff --git a/src/inspect-fs.c b/src/inspect-fs.c
index e9cc2e9..7b116db 100644
--- a/src/inspect-fs.c
+++ b/src/inspect-fs.c
@@ -48,6 +48,7 @@ static int check_filesystem (guestfs_h *g, const char *mountable,
const struct guestfs_internal_mountable *m,
int whole_device);
static int extend_fses (guestfs_h *g);
+static int get_partition_context (guestfs_h *g, const char *partition, int *partnum_ret, int *nr_partitions_ret);
/* Find out if 'device' contains a filesystem. If it does, add
* another entry in g->fses.
@@ -140,17 +141,18 @@ check_filesystem (guestfs_h *g, const char *mountable,
const struct guestfs_internal_mountable *m,
int whole_device)
{
+ int partnum = -1, nr_partitions = -1;
/* Not CLEANUP_FREE, as it will be cleaned up with inspection info */
char *windows_systemroot = NULL;
if (extend_fses (g) == -1)
return -1;
- int partnum = -1;
- if (!whole_device && m->im_type == MOUNTABLE_DEVICE) {
- guestfs_push_error_handler (g, NULL, NULL);
- partnum = guestfs_part_to_partnum (g, m->im_device);
- guestfs_pop_error_handler (g);
+ if (!whole_device && m->im_type == MOUNTABLE_DEVICE &&
+ guestfs___is_partition (g, m->im_device)) {
+ if (get_partition_context (g, m->im_device,
+ &partnum, &nr_partitions) == -1)
+ return -1;
}
struct inspect_fs *fs = &g->fses[g->nr_fses-1];
@@ -285,7 +287,7 @@ check_filesystem (guestfs_h *g, const char *mountable,
* Skip these checks if it's not a whole device (eg. CD) or the
* first partition (eg. bootable USB key).
*/
- else if ((whole_device || partnum == 1) &&
+ else if ((whole_device || (partnum == 1 && nr_partitions == 1)) &&
(guestfs_is_file (g, "/isolinux/isolinux.cfg") > 0 ||
guestfs_is_dir (g, "/EFI/BOOT") > 0 ||
guestfs_is_file (g, "/images/install.img") > 0 ||
@@ -330,6 +332,36 @@ extend_fses (guestfs_h *g)
return 0;
}
+/* Given a partition (eg. /dev/sda2) then return the partition number
+ * (eg. 2) and the total number of other partitions.
+ */
+static int
+get_partition_context (guestfs_h *g, const char *partition,
+ int *partnum_ret, int *nr_partitions_ret)
+{
+ int partnum, nr_partitions;
+ CLEANUP_FREE char *device = NULL;
+ CLEANUP_FREE_PARTITION_LIST struct guestfs_partition_list *partitions = NULL;
+
+ partnum = guestfs_part_to_partnum (g, partition);
+ if (partnum == -1)
+ return -1;
+
+ device = guestfs_part_to_dev (g, partition);
+ if (device == NULL)
+ return -1;
+
+ partitions = guestfs_part_list (g, device);
+ if (partitions == NULL)
+ return -1;
+
+ nr_partitions = partitions->len;
+
+ *partnum_ret = partnum;
+ *nr_partitions_ret = nr_partitions;
+ return 0;
+}
+
int
guestfs___is_file_nocase (guestfs_h *g, const char *path)
{
diff --git a/src/inspect.c b/src/inspect.c
index bdb45c3..8c00f80 100644
--- a/src/inspect.c
+++ b/src/inspect.c
@@ -638,3 +638,25 @@ guestfs___search_for_root (guestfs_h *g, const char *root)
root);
return NULL;
}
+
+int
+guestfs___is_partition (guestfs_h *g, const char *partition)
+{
+ CLEANUP_FREE char *device = NULL;
+
+ guestfs_push_error_handler (g, NULL, NULL);
+
+ if ((device = guestfs_part_to_dev (g, partition)) == NULL) {
+ guestfs_pop_error_handler (g);
+ return 0;
+ }
+
+ if (guestfs_device_index (g, device) == -1) {
+ guestfs_pop_error_handler (g);
+ return 0;
+ }
+
+ guestfs_pop_error_handler (g);
+
+ return 1;
+}
--
2.1.0
9 years, 9 months
[PATCH 0/8] btrfs support part2: qgroup commands
by Hu Tao
Hi,
This series adds support to btrfs qgroup related commands, inclduing
quota commands, and two leftover of subvolume commands.
Regards,
Hu
Hu Tao (8):
New API: btrfs_subvolume_get_default
New API: btrfs_subvolume_show
New API: btrfs_quota_enable
New API: btrfs_quota_disable
New API: btrfs_quota_rescan
New API: btrfs_qgroup_limit
New API: btrfs_qgroup_create
New API: btrfs_qgroup_destroy
daemon/btrfs.c | 412 +++++++++++++++++++++++++++++++++++++++++++++++++++
generator/actions.ml | 73 +++++++++
src/MAX_PROC_NR | 2 +-
3 files changed, 486 insertions(+), 1 deletion(-)
--
1.9.3
9 years, 9 months
Re: [Libguestfs] virt-df error, help
by Richard W.M. Jones
[Please keep replies on the mailing list]
On Tue, Dec 09, 2014 at 10:44:17AM +0800, cuimingwen(a)incito.com.cn wrote:
> Hi, Rich, my /tmp size is sufficient
> My OS version:
> NAME="Ubuntu"
> VERSION="14.04.1 LTS, Trusty Tahr"
> ID=ubuntu
> ID_LIKE=debian
> PRETTY_NAME="Ubuntu 14.04.1 LTS"
> VERSION_ID="14.04"
> HOME_URL="http://www.ubuntu.com/"
> SUPPORT_URL="http://help.ubuntu.com/"
> BUG_REPORT_URL="http://bugs.launchpad.net/ubuntu/"
>
> I get libguestfs from "apt-get install libguestfs-tools"
>
> my libguestfs version:
> supermin 5.1.0
This is the wrong version of supermin for libguestfs 1.24.5, which
would explain why it did't work. This would be an Ubuntu packaging bug.
> when I install libguestfs-1.26.5 , after make install,
> the errors
> ” ocamlfind: Package guestfs is already installed
You really should *not* run 'make install' when building libguestfs
from source. Use the './run' script in the top directory. See the
README file which explains this.
> - (file /usr/lib/ocaml/guestfs/META already exists)
> make[3]: *** [install-data-hook] Error 2
> make[3]: Leaving directory `/home/incito/libguestfs-1.26.5/ocaml'
> make[2]: *** [install-data-am] Error 2
> make[2]: Leaving directory `/home/incito/libguestfs-1.26.5/ocaml'
> make[1]: *** [install-am] Error 2
> make[1]: Leaving directory `/home/incito/libguestfs-1.26.5/ocaml'
> make: *** [install-recursive] Error 1 “
>
> when I run ”libguestfs-test-tool" errors below
> "root@06MYRC5:/home/incito/libguestfs-1.26.5# libguestfs-test-tool
> Display all 101 possibilities? (y or n)
> root@06MYRC5:/home/incito/libguestfs-1.26.5# libguestfs-test-tool
> ************************************************************
> * IMPORTANT NOTICE
> *
> * When reporting bugs, include the COMPLETE, UNEDITED
> * output below in your bug report.
> *
> ************************************************************
> PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
> SELinux: sh: 1: getenforce: not found
> guestfs_get_append: (null)
> guestfs_get_autosync: 1
> guestfs_get_backend: direct
> libguestfs-test-tool: symbol lookup error: libguestfs-test-tool: undefined symbol: guestfs_get_backend_settings"
You've now got two conflicting versions of libguestfs installed.
You'll have to either reinstall the OS from scratch, or very carefully
try to work out what the 'make install' command installed and remove
it by hand.
Rich.
--
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
virt-top is 'top' for virtual machines. Tiny program with many
powerful monitoring features, net stats, disk stats, logging, etc.
http://people.redhat.com/~rjones/virt-top
9 years, 9 months
[PATCH] p2v: wait for qemu-nbd before starting conversion (RHBZ#1167774)
by John Eckersberg
Wait up to 10 seconds for qemu-nbd to start up and respond to clients.
Otherwise the conversion server may attempt to connect before qemu-nbd
is ready to serve it.
---
p2v/conversion.c | 72 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
p2v/p2v.h | 1 +
2 files changed, 73 insertions(+)
diff --git a/p2v/conversion.c b/p2v/conversion.c
index cb2deed..1aefcc6 100644
--- a/p2v/conversion.c
+++ b/p2v/conversion.c
@@ -31,6 +31,8 @@
#include <libintl.h>
#include <sys/types.h>
#include <sys/wait.h>
+#include <arpa/inet.h>
+#include <netinet/in.h>
#include <glib.h>
@@ -49,6 +51,7 @@ struct data_conn {
static int send_quoted (mexp_h *, const char *s);
static pid_t start_qemu_nbd (int nbd_local_port, const char *device);
+static int wait_qemu_nbd (int nbd_local_port, int timeout_seconds);
static void cleanup_data_conns (struct data_conn *data_conns, size_t nr);
static char *generate_libvirt_xml (struct config *, struct data_conn *);
static const char *map_interface_to_network (struct config *, const char *interface);
@@ -156,6 +159,12 @@ start_conversion (struct config *config,
if (data_conns[i].nbd_pid == 0)
goto out;
+ /* Wait for qemu-nbd to listen */
+ if (wait_qemu_nbd (data_conns[i].nbd_local_port, WAIT_QEMU_NBD_TIMEOUT) == -1) {
+ set_conversion_error("unable to connect to qemu-nbd");
+ goto out;
+ }
+
#if DEBUG_STDERR
fprintf (stderr,
"%s: data connection for %s: SSH remote port %d, local port %d\n",
@@ -371,6 +380,69 @@ start_qemu_nbd (int port, const char *device)
return pid;
}
+static int
+wait_qemu_nbd (int nbd_local_port, int timeout_seconds)
+{
+ int sockfd;
+ int result = 0;
+ struct sockaddr_in addr;
+ time_t start_t, now_t;
+ struct timeval timeout = { .tv_usec = 0 };
+ char magic[8]; /* NBDMAGIC */
+ size_t bytes_read = 0;
+ ssize_t recvd;
+
+ time (&start_t);
+
+ sockfd = socket (AF_INET, SOCK_STREAM, 0);
+ if (sockfd == -1) {
+ perror ("socket");
+ return -1;
+ }
+
+ memset(&addr, 0, sizeof (struct sockaddr_in));
+ addr.sin_family = AF_INET;
+ addr.sin_port = htons(nbd_local_port);
+ inet_pton(AF_INET, "localhost", &addr.sin_addr);
+
+ for (;;) {
+ time (&now_t);
+
+ if (now_t - start_t >= timeout_seconds) {
+ perror("connect");
+ result = -1;
+ goto cleanup;
+ }
+
+ if (connect (sockfd, (struct sockaddr *) &addr, sizeof addr) == 0)
+ break;
+ }
+
+ time (&now_t);
+ timeout.tv_sec = (start_t + timeout_seconds) - now_t;
+ setsockopt(sockfd, SOL_SOCKET, SO_RCVTIMEO, &timeout, sizeof(struct timeval));
+
+ do {
+ recvd = recv (sockfd, magic, sizeof(magic)-bytes_read, 0);
+
+ if (recvd == -1) {
+ perror("recv");
+ result = -1;
+ goto cleanup;
+ }
+
+ bytes_read += recvd;
+ } while (bytes_read < sizeof magic);
+
+ if (strncmp(magic, "NBDMAGIC", sizeof magic))
+ result = -1;
+
+cleanup:
+ close(sockfd);
+
+ return result;
+}
+
static void
cleanup_data_conns (struct data_conn *data_conns, size_t nr)
{
diff --git a/p2v/p2v.h b/p2v/p2v.h
index c3ca0f6..7c4c115 100644
--- a/p2v/p2v.h
+++ b/p2v/p2v.h
@@ -98,6 +98,7 @@ extern int start_conversion (struct config *, void (*notify_ui) (int type, const
#define NOTIFY_STATUS 3 /* stage in conversion process */
extern const char *get_conversion_error (void);
extern void cancel_conversion (void);
+#define WAIT_QEMU_NBD_TIMEOUT 10
/* ssh.c */
extern int test_connection (struct config *);
--
1.9.3
9 years, 9 months
[PATCH] resize: fix 'No space left on device' problem when copying to an extended partition (RHBZ#1169015)
by Hu Tao
Because of the size of an extended partition reported by Linux is always 1024
bytes, so it will always fail to copy to an extended partition.
This patch fixes this problem by copying to the offset of an extended
partition in the destination disk.
Signed-off-by: Hu Tao <hutao(a)cn.fujitsu.com>
---
resize/resize.ml | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/resize/resize.ml b/resize/resize.ml
index 363e2b6..ca5f87d 100644
--- a/resize/resize.ml
+++ b/resize/resize.ml
@@ -1139,9 +1139,15 @@ read the man page virt-resize(1).
* source = "/dev/sda2", because the device name only covers
* the first 1K of the partition. Instead, copy the
* source bytes from the parent disk (/dev/sda).
+ *
+ * You can't write directly to the extended partition,
+ * because the size of it reported by Linux is always 1024
+ * bytes. Instead, write to the offset of the extended
+ * partition in the destination disk (/dev/sdb).
*)
let srcoffset = p.p_part.G.part_start in
- g#copy_device_to_device ~srcoffset ~size:copysize "/dev/sda" target
+ let destoffset = p.p_target_start *^ 512L in
+ g#copy_device_to_device ~srcoffset ~destoffset ~size:copysize "/dev/sda" "/dev/sdb"
)
| OpIgnore | OpDelete -> ()
in
--
1.9.3
9 years, 9 months
Re: [Libguestfs] virt-df error, help
by Richard W.M. Jones
On Thu, Dec 04, 2014 at 04:53:21PM +0800, cuimingwen(a)incito.com.cn wrote:
> Hello, Richard,
> I run command as example: " virt-df -d `virsh domuuid 5`"
> some errors show :
> libguestfs: warning: supermin-helper -f checksum returned a short string
> libguestfs: error: cannot find any suitable libguestfs supermin, fixed or old-style appliance on LIBGUESTFS_PATH (search path: /usr/lib/guestfs)
>
> when I run this command as root , the result is correct ,
> but I must run the command as not-root, so , how can I do ?, please help , thanks!
Enable debugging:
http://libguestfs.org/guestfs-faq.1.html#debugging-libguestfs
Provide the complete output when debugging is enabled, sending it
to the mailing list (mailto:libguestfs@redhat.com)
Rich.
--
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
virt-df lists disk usage of guests without needing to install any
software inside the virtual machine. Supports Linux and Windows.
http://people.redhat.com/~rjones/virt-df/
9 years, 9 months
[PATCH] customize, sysprep: add a short SELinux note
by Pino Toscano
Add a short paragraph about SELinux, mostly to point to the
documentation about it provided in the documentation of virt-builder.
---
customize/virt-customize.pod | 8 ++++++++
sysprep/virt-sysprep.pod | 8 ++++++++
2 files changed, 16 insertions(+)
diff --git a/customize/virt-customize.pod b/customize/virt-customize.pod
index a666be7..8dbdfef 100644
--- a/customize/virt-customize.pod
+++ b/customize/virt-customize.pod
@@ -209,6 +209,14 @@ Enable tracing of libguestfs API calls.
__CUSTOMIZE_OPTIONS__
+=head1 SELINUX
+
+For guests which make use of SELinux, special handling for them might
+be needed when using operations which create new files or alter
+existing ones.
+
+For further details, see L<virt-builder(1)/SELINUX>.
+
=head1 EXIT STATUS
This program returns 0 on success, or 1 if there was an error.
diff --git a/sysprep/virt-sysprep.pod b/sysprep/virt-sysprep.pod
index 5b88863..970abce 100644
--- a/sysprep/virt-sysprep.pod
+++ b/sysprep/virt-sysprep.pod
@@ -509,6 +509,14 @@ module:
cp template.img newguest.img
virt-sysprep --enable customize -a newguest.img
+=head1 SELINUX
+
+For guests which make use of SELinux, special handling for them might
+be needed when using operations which create new files or alter
+existing ones.
+
+For further details, see L<virt-builder(1)/SELINUX>.
+
=head1 WINDOWS 8
Windows 8 "fast startup" can prevent virt-sysprep from working.
--
1.9.3
9 years, 9 months
[PATCH] fish: fix build warning when readline-devel is missing
by Hu Tao
Signed-off-by: Hu Tao <hutao(a)cn.fujitsu.com>
---
fish/fish.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/fish/fish.c b/fish/fish.c
index 0432774..20511f8 100644
--- a/fish/fish.c
+++ b/fish/fish.c
@@ -641,10 +641,12 @@ shell_script (void)
#define FISH "><fs> "
+#ifdef HAVE_LIBREADLINE
static char *ps1 = NULL; /* GUESTFISH_PS1 */
static char *ps_output = NULL; /* GUESTFISH_OUTPUT */
-static char *ps_restore = NULL; /* GUESTFISH_RESTORE */
static char *ps_init = NULL; /* GUESTFISH_INIT */
+#endif /* HAVE_LIBREADLINE */
+static char *ps_restore = NULL; /* GUESTFISH_RESTORE */
static char *line_read = NULL;
static char *
@@ -698,10 +700,12 @@ script (int prompt)
struct parsed_command pcmd;
if (prompt) {
+#ifdef HAVE_LIBREADLINE
if (ps_init) { /* GUESTFISH_INIT */
CLEANUP_FREE char *pi = decode_ps1 (ps_init);
printf ("%s", pi);
}
+#endif /* HAVE_LIBREADLINE */
printf (_("\n"
"Welcome to guestfish, the guest filesystem shell for\n"
@@ -739,6 +743,7 @@ script (int prompt)
}
}
+#ifdef HAVE_LIBREADLINE
if (prompt) {
printf ("\n");
if (ps_restore) { /* GUESTFISH_RESTORE */
@@ -746,6 +751,7 @@ script (int prompt)
printf ("%s", pr);
}
}
+#endif /* HAVE_LIBREADLINE */
}
/* Parse a command string, splitting at whitespace, handling '!', '#' etc.
--
1.9.3
9 years, 9 months