search for: guestfs_part_disk

Displaying 20 results from an estimated 31 matches for "guestfs_part_disk".

2013 Dec 23
2
[PATCH] tests/mountable: skip if btrfs is not available
...(g == NULL) { @@ -48,6 +49,12 @@ main (int argc, char *argv[]) if (guestfs_launch (g) == -1) goto error; + if (!guestfs_feature_available (g, (char **) feature)) { + printf ("skipping test because btrfs is not available\n"); + guestfs_close (g); + exit (77); + } + if (guestfs_part_disk (g, "/dev/sda", "mbr") == -1) goto error; if (guestfs_pvcreate (g, "/dev/sda1") == -1) goto error; -- 1.8.3.1
2013 Dec 23
1
[PATCH] tests/mountable: skip if btrfs is not available
...ping test because btrfs is not available\n"); + guestfs_close (g); + exit (77); + } + + if (!guestfs_filesystem_available (g, "btrfs")) { + printf ("skipping test because btrfs filesystem is not available\n"); + guestfs_close (g); + exit (77); + } + if (guestfs_part_disk (g, "/dev/sda", "mbr") == -1) goto error; if (guestfs_pvcreate (g, "/dev/sda1") == -1) goto error; -- 1.8.3.1
2014 Mar 18
2
[PATCH 1/2] php: make the test suite failures fatal
So far the failure of some test would have not reported a non-zero return value by run-tests.php. Since now all the PHP tests pass, we can ask for failures to be fatal, by exporting REPORT_EXIT_STATUS=1 for run-tests.php. --- php/run-php-tests.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/php/run-php-tests.sh b/php/run-php-tests.sh index 6f9ae10..e498987 100755 ---
2012 Nov 14
1
Notes on compiling libguestfs 1.19.59 on Debian 7 (Wheezy) beta
In no particular order. Some of these need further investigation. ---------------------------------------------------------------------- I had to patch libguestfs not to use febootstrap-supermin-helper --copy-kernel option. See attachment #1. This could be avoided by providing a newer febootstrap in Wheezy. I had to patch libguestfs to make it not use the (not working) virtio-scsi in old
2013 Dec 23
0
Re: [PATCH] tests/mountable: skip if btrfs is not available
...har *argv[]) > > if (guestfs_launch (g) == -1) goto error; > > + if (!guestfs_feature_available (g, (char **) feature)) { > + printf ("skipping test because btrfs is not available\n"); > + guestfs_close (g); > + exit (77); > + } > + > if (guestfs_part_disk (g, "/dev/sda", "mbr") == -1) goto error; > > if (guestfs_pvcreate (g, "/dev/sda1") == -1) goto error; > -- > 1.8.3.1 ACK. You might want to test for btrfs *filesystem*_available too ... The two are different things (userspace tools vs kernel module...
2015 May 26
6
[PATCH 0/6] Update the way that API versions are generated for the man page.
The existing mechanism was clunky, slow and used ~ 10 MB of local disk. Rich.
2015 May 06
0
Re: libguestfs init problem
...gt; exit (EXIT_FAILURE); > if (devices[0] == NULL || devices[1] != NULL) { > fprintf (stderr, "error: expected a single device from list-devices\n"); > exit (EXIT_FAILURE); > } > > /* Partition the disk as one single MBR partition. */ > if (guestfs_part_disk (g, devices[0], "mbr") == -1) > exit (EXIT_FAILURE); > > /* Get the list of partitions. We expect a single element, which > * is the partition we have just created. > */ > char **partitions = guestfs_list_partitions (g); > if (partitions == NUL...
2012 Jan 31
2
[PATCH 1/2] examples: code cleanups
do a code cleanup by removing the tailing spaces Signed-off-by: Wanlong Gao <gaowanlong at cn.fujitsu.com> --- examples/create_disk.c | 2 +- examples/inspect_vm.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/create_disk.c b/examples/create_disk.c index f4b9044..bcad6d8 100644 --- a/examples/create_disk.c +++ b/examples/create_disk.c @@ -7,7 +7,7
2016 Feb 12
0
[PATCH] php: restructure and expand tests
...+0,0 @@ ---TEST-- -Launch the appliance and run basic tests. ---FILE-- -<?php -$g = guestfs_create (); -if ($g == false) { - echo ("Failed to create guestfs_php handle.\n"); - exit; -} - -if (! guestfs_add_drive_scratch ($g, 100 * 1024 * 1024) || - ! guestfs_launch ($g) || - ! guestfs_part_disk ($g, "/dev/sda", "mbr") || - ! guestfs_pvcreate ($g, "/dev/sda1") || - ! guestfs_vgcreate ($g, "VG", array ("/dev/sda1")) || - ! guestfs_lvcreate ($g, "LV", "VG", 64) || - ! guestfs_mkfs ($g, "ext2", "/...
2018 Aug 20
1
[PATCH nbdkit] tests: Add a root only test of the file plugin with
In libguestfs we have a few tests that require root privileges and they are skipped by default (normally you should not build or test as root), but you can do this to run them: sudo make check-root In nbdkit I wanted to check that the file plugin works with block devices (this is not tested), and the only way I can sensibly think to do this is using a loopback device and root. This commit
2015 May 05
3
libguestfs init problem
Hi ,all : thanks for helping me ! I am using libguestfs-1.28.1 on ubuntu 12.04 to manage vm disk created by KVM. I downloaded libguestfs-1.28.1.tar.gz ,and then executed (1) ./autogen.sh (2) ./configure (3) make (4) make check .there is the error. /usr/Libvmi/libguestfs-1.28.1/run --test guest-aux/make-fedora-img.pl md_create: feature 'mdadm' is not available in this
2013 Feb 12
7
Remaining btrfs patches
[PATCH 1/7] mount: Add mount_vfs_nochroot This is significantly reworked from before. umount is gone as discussed, and variable motion is minimised. [PATCH 2/7] btrfs: Update btrfs_subvolume_list to take Already provisionally ACKed. Previous comment was that cleanup could be tidier. I looked into creating a new cleanup function for fs_buf, but it isn't possible (or simple, anyway) in this
2019 Apr 01
1
[PATCH nbdkit v2] Add readahead filter.
Simpler, and including tests. Rich.
2019 Aug 12
1
[PATCH] Fix small issues in documentations of APIs
...gt; is a list of lines that we feed to C<sfdisk>. For more +C<lines> is a list of lines that we feed to L<sfdisk(8)>. For more information refer to the L<sfdisk(8)> manpage. To create a single partition occupying the whole disk, you would @@ -370,10 +370,10 @@ and C<guestfs_part_disk>" }; deprecated_by = Replaced_by "file"; shortdesc = "determine file type inside a compressed file"; longdesc = "\ -This command runs F<file> after first decompressing C<path> -using C<method>. +This command runs L<file(1)> aft...
2012 Jan 17
2
[PATCH v2] New tool: virt-format
This is the same as the previous patch, but the partition type is now chosen automatically from mbr or gpt, unless the user expresses a preference. https://gb.redhat.com/archives/libguestfs/2012-January/msg00136.html Rich.
2017 Apr 20
1
[PATCH] tests: Replace test-max-disks with several tests.
...exit (EXIT_FAILURE); + } + if (guestfs_part_add (g, devices[i], "p", 64*15, -64) == -1) + exit (EXIT_FAILURE); + if (asprintf (&part, "%s15", devices[i]) == -1) + error (EXIT_FAILURE, errno, "asprintf"); + } + else { + if (guestfs_part_disk (g, devices[i], "mbr") == -1) + exit (EXIT_FAILURE); + if (asprintf (&part, "%s1", devices[i]) == -1) + error (EXIT_FAILURE, errno, "asprintf"); + } + + if (guestfs_mkfs (g, "ext2", part) == -1) + exit (EXIT_FAILURE); + if...
2012 Jan 17
2
[PATCH] New tool: virt-format
Rather than me explaining over again what it does, I've included the man page below. Rich. ---------------------------------------------------------------------- virt-format(1) Virtualization Support virt-format(1) NAME virt-format - Erase and make a blank disk SYNOPSIS virt-format [--options] -a disk.img [-a disk.img ...] DESCRIPTION
2017 Mar 03
2
[PATCH] generator: Allow actions to be deprecated with no replacement.
...es"], []; - deprecated_by = Some "part_add"; + deprecated_by = Replaced_by "part_add"; shortdesc = "create partitions on a block device"; longdesc = "\ This is a simplified interface to the C<guestfs_sfdisk> @@ -367,7 +367,7 @@ and C<guestfs_part_disk>" }; { defaults with name = "zfile"; added = (1, 0, 59); style = RString "description", [String "meth"; Pathname "path"], []; - deprecated_by = Some "file"; + deprecated_by = Replaced_by "file"; shortdesc =...
2016 Apr 04
0
[PATCH 2/2] Use 'error' function for fprintf followed by exit.
..., - _("libguestfs-test-tool: failed to launch appliance\n")); + if (guestfs_launch (g) == -1) exit (EXIT_FAILURE); - } alarm (0); @@ -289,36 +262,22 @@ main (int argc, char *argv[]) fflush (stdout); /* Create the filesystem and mount everything. */ - if (guestfs_part_disk (g, "/dev/sda", "mbr") == -1) { - fprintf (stderr, - _("libguestfs-test-tool: failed to run part-disk\n")); + if (guestfs_part_disk (g, "/dev/sda", "mbr") == -1) exit (EXIT_FAILURE); - } - if (guestfs_mkfs (g, "ext2&quo...
2012 Oct 08
5
[PATCH v4 0/5] Finish hotplugging support.
This rounds off hotplugging support by allowing you to add and remove drives at any stage (before and after launch). Rich.