search for: guestfs_list_partit

Displaying 20 results from an estimated 70 matches for "guestfs_list_partit".

2013 Mar 14
1
guestfs_list_partitions with vdi
I'm using a Windows raw disk image that is "converted" to the VDI format by custom code that prepends a header to the image. I use 'vdi' for GUESTFS_ADD_DRIVE_OPTS_FORMAT of guestfs_add_drive_opts(). After launching the appliance, the call to guestfs_list_partitions() results in an empty list. Is there a way to add the drive but have an offset into the image file as a "starting point"? So that it could skip the header which apparently is causing the issue. If I use the image without the vdi customization (and use 'raw' for add_drive_opts...
2014 Dec 15
3
does guestfs_list_partitions() work with Windows 95 images?
Hello, Been a long time since I broke out your libguestfs tools. Current employer has some old machines they want to virtualize before they croak. I was able to virtualize a Win2000 box but when I tried the same with a Windows 95 machine the call to guestfs_list_partitions returned null. I did make that image with a different tool (my linux box wasn't available so I wound up using Macrium Reflect on Windows) - but I don't believe the image was corrupted. Thanks, Skippy
2017 Jan 19
0
[PATCH 2/2] daemon: Return MD partitions in guestfs_list_partitions (RHBZ#1414510).
From: Pino Toscano <ptoscano@redhat.com> --- daemon/devsparts.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/daemon/devsparts.c b/daemon/devsparts.c index b764f63..852ee99 100644 --- a/daemon/devsparts.c +++ b/daemon/devsparts.c @@ -20,6 +20,7 @@ #include <stdio.h> #include <stdlib.h> +#include <stdbool.h> #include
2014 Dec 16
0
Re: does guestfs_list_partitions() work with Windows 95 images?
[Let's keep all replies on the list] On Tue, Dec 16, 2014 at 12:43:21AM -0500, Skippy VonDrake wrote: > Looks like that returned an empty array. Could the image be corrupt? > > Here's the output: > > # guestfish -v -x --ro -a /home/skippy/disk_images/[...]/old.img run : list-partitions [...] > [ 0.558351] scsi2 : Virtio SCSI HBA > [ 0.560916] scsi 2:0:0:0:
2014 Dec 16
0
Re: does guestfs_list_partitions() work with Windows 95 images?
On Tue, Dec 16, 2014 at 10:29:25AM -0500, Skippy VonDrake wrote: > > > > The appliance kernel couldn't find any partitions at all on the disk. > > > > Is it a raw format disk image, or some other format that qemu can > > reasonably be expected to read? > > > I used the "Advanced Options" of Macrium Reflect (on Windows 7) to do a raw > byte
2014 Dec 17
0
Re: does guestfs_list_partitions() work with Windows 95 images?
On Tue, Dec 16, 2014 at 11:33:00AM -0500, Skippy VonDrake wrote: > > > > Looks like a disk sector to me too. However the partition table > > is further on. See: > > > > https://en.wikipedia.org/wiki/Master_boot_record#Sector_layout > > > So that reference says the "classical generic MBR" partition entry # 1 is > offset 0x1BE. > Which in
2014 Dec 22
1
Re: does guestfs_list_partitions() work with Windows 95 images?
> > > It's possible that the disk is not partitioned, ie. that what you've > got here is a straight filesystem. You could see if libguestfs can > mount it: > > guestfish --ro -a disk.img -m /dev/sda > ><fs> ll / > > That worked! Thanks for the help. Now I'm tweaking my old code and just replacing my guestfs_mount() call with a hard-coded
2014 Dec 16
2
Re: does guestfs_list_partitions() work with Windows 95 images?
> > The appliance kernel couldn't find any partitions at all on the disk. > > Is it a raw format disk image, or some other format that qemu can > reasonably be expected to read? I used the "Advanced Options" of Macrium Reflect (on Windows 7) to do a raw byte copy. If it is, then yes I'd say the image is corrupted. However you'd > probably want to hexdump
2014 Dec 16
2
Re: does guestfs_list_partitions() work with Windows 95 images?
> > Looks like a disk sector to me too. However the partition table > is further on. See: > > https://en.wikipedia.org/wiki/Master_boot_record#Sector_layout So that reference says the "classical generic MBR" partition entry # 1 is offset 0x1BE. Which in this image is right in the error strings (?) section. 00000170 13 59 5A 58 72 09 40 75 01 42 03 5E 0B E2 CC C3
2016 Feb 05
2
[PATCHv2] inspect: get windows drive letters for GPT disks.
...d by a 16 byte binary GUID. --- changes since v1: * applied style changes from review * use guestfs_list_partitions instead of guestfs_list_filesystems * do the GUID endianness conversion correctly * check all API calls for errors * do not call guestfs_canonical_device_name to prevent from changing * block device names, i.e /dev/vda1 a...
2011 Nov 22
2
[PATCH] inspection: Handle MD devices in fstab
This patch fixes inspection when fstab contains devices md devices specified as /dev/mdN. The appliance creates these devices without reference to the guest's mdadm.conf so, for e.g. /dev/md0 in the guest will often be created as /dev/md127 in the appliance. With this patch, we match the uuids of detected md devices against uuids specified in mdadm.conf, and map them appropriately when we
2020 Jan 22
2
Re: [PATCH] mltools, options: support --allow-discards when decrypting LUKS devices
...onst char *device, char *mapname, size_t len) > * encryption schemes. > */ > void > -inspect_do_decrypt (guestfs_h *g, struct key_store *ks) > +inspect_do_decrypt (guestfs_h *g, struct key_store *ks, int allowdiscards) > { > CLEANUP_FREE_STRING_LIST char **partitions = guestfs_list_partitions (g); > if (partitions == NULL) > @@ -101,7 +101,8 @@ inspect_do_decrypt (guestfs_h *g, struct key_store *ks) > * is set? This might break 'mount_ro'. > */ > guestfs_push_error_handler (g, NULL, NULL); > - r = guestfs_luks_open (g...
2016 Feb 05
1
Re: [PATCH] inspect: get windows drive letters for GPT disks.
...ST char **fses = NULL; > > +  size_t i; > > + > > +  fses = guestfs_list_filesystems (g); > > +  if (fses == NULL) > > +    return NULL; > > Did you really mean to call guestfs_list_filesystems here?  If you're > trying to get the list of partitions, then guestfs_list_partitions is > what you should be calling. > First, thank you for a prompt review. Yes, I meant to use guestfs_list_filesystems for save myself from doing nested loops - one to pull list of devices (guestfs_list_devices) and another to loop through partitions on each device. If that's a probl...
2016 Sep 19
0
[PATCH 1/3] fish: move disk decryption helpers in own file
...n: look for any C<crypto_LUKS> + * partitions and decrypt them, then rescan for VGs. This only works + * for Fedora whole-disk encryption. WIP to make this work for other + * encryption schemes. + */ +void +inspect_do_decrypt (guestfs_h *g) +{ + CLEANUP_FREE_STRING_LIST char **partitions = guestfs_list_partitions (g); + if (partitions == NULL) + exit (EXIT_FAILURE); + + int need_rescan = 0; + size_t i; + for (i = 0; partitions[i] != NULL; ++i) { + CLEANUP_FREE char *type = guestfs_vfs_type (g, partitions[i]); + if (type && STREQ (type, "crypto_LUKS")) { + char mapname...
2020 Jan 22
0
Re: [PATCH] mltools, options: support --allow-discards when decrypting LUKS devices
...len) > > * encryption schemes. > > */ > > void > > -inspect_do_decrypt (guestfs_h *g, struct key_store *ks) > > +inspect_do_decrypt (guestfs_h *g, struct key_store *ks, int > allowdiscards) > > { > > CLEANUP_FREE_STRING_LIST char **partitions = guestfs_list_partitions > (g); > > if (partitions == NULL) > > @@ -101,7 +101,8 @@ inspect_do_decrypt (guestfs_h *g, struct key_store > *ks) > > * is set? This might break 'mount_ro'. > > */ > > guestfs_push_error_handler (g, NULL, NULL); &gt...
2012 Feb 08
2
[PATCH v3 0/2] Add a new api wipefs
Hi Rich: This is a alternative patch, if you like the api name called wipefs ;-P Thanks -Wanlong Gao Wanlong Gao (2): NEW API: add a new api wipefs virt-format: erase the filesystem signatures before erase partitions TODO | 2 -- daemon/zero.c | 17 +++++++++++++++++ format/format.c | 19 ++++---------------
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.
2012 Feb 10
3
[PATCH-v4 0/2] Add a new api wipefs
Hi Rich: This is a latest patch. ;-P Comments? Thanks -Wanlong Gao Wanlong Gao (2): NEW API: add a new api wipefs virt-format: erase the filesystem signatures before erase partitions TODO | 2 -- daemon/zero.c | 17 +++++++++++++++++ format/format.c | 19 ++++--------------- generator/generator_actions.ml | 14
2012 Jan 16
1
[PATCH] generator: Add an explicit Cancellable flag
...[]), 244, [], + ("checksums_out", (RErr, [String "csumtype"; Pathname "directory"; FileOut "sumsfile"], []), 244, + [Cancellable], [], "compute MD5, SHAx or CRC checksum of files in a directory", "\ @@ -5933,7 +5946,8 @@ from C<guestfs_list_partitions>. See also C<guestfs_part_to_partnum>."); - ("upload_offset", (RErr, [FileIn "filename"; Dev_or_Path "remotefilename"; Int64 "offset"], []), 273, [Progress], + ("upload_offset", (RErr, [FileIn "filename"; Dev_or_Pa...
2020 Jan 22
0
[PATCH] mltools, options: support --allow-discards when decrypting LUKS devices
...c @@ -71,7 +71,7 @@ make_mapname (const char *device, char *mapname, size_t len) * encryption schemes. */ void -inspect_do_decrypt (guestfs_h *g, struct key_store *ks) +inspect_do_decrypt (guestfs_h *g, struct key_store *ks, int allowdiscards) { CLEANUP_FREE_STRING_LIST char **partitions = guestfs_list_partitions (g); if (partitions == NULL) @@ -101,7 +101,8 @@ inspect_do_decrypt (guestfs_h *g, struct key_store *ks) * is set? This might break 'mount_ro'. */ guestfs_push_error_handler (g, NULL, NULL); - r = guestfs_luks_open (g, partitions[i], keys[j], mapn...