search for: add_drive_opts

Displaying 20 results from an estimated 154 matches for "add_drive_opts".

2020 Feb 19
1
[PATCH] ruby: change value of 'readonly' drive toption to Boolean in doc/example/test
...t a/ruby/examples/guestfs-ruby.pod b/ruby/examples/guestfs-ruby.pod index bd8bb3108..cb9bfd0e7 100644 --- a/ruby/examples/guestfs-ruby.pod +++ b/ruby/examples/guestfs-ruby.pod @@ -7,7 +7,7 @@ guestfs-ruby - How to use libguestfs from Ruby require 'guestfs' g = Guestfs::Guestfs.new() g.add_drive_opts("disk.img", - :readonly => 1, :format => "raw") + :readonly => true, :format => "raw") g.launch() =head1 DESCRIPTION diff --git a/ruby/examples/inspect_vm.rb b/ruby/examples/inspect_vm.rb index abf227901..d444e01a2 1006...
2012 Jan 24
1
example script for GObject
I tried using Javascript (gjs) with GObject-Introspection and did a port of the create_disk example which is attached below. Quite a bit of time was spent looking up stuff in the GLib reference and guessing how certain idioms translate to gjs. I used the traditional add_drive_opts method since I haven't been able to find how to specify the optional arguments to add_drive_opts. How does that work? Cheers, -Hilko -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: not available URL: <http://listman.redhat.com/archives...
2012 Jul 14
6
[PATCH 0/6] Allow non-optargs functions to gain optional arguments.
This rather complex set of patches allow non-optargs functions to gain optional arguments, while preserving source and binary backwards compatibility. The problem is that we cannot add an optional argument to an existing function. For example, we might want to add flags to the 'lvresize' API which currently has no optional arguments.
2014 Aug 06
2
python-guestfs rbd
how to use python-guestfs to access rbd device? The function i found is g.add_drive_opts, but i dono know how it receive ceph's configuration. I found this link http://rwmj.wordpress.com/2013/03/12/accessing-ceph-rbd-sheepdog-etc-using-libguestfs/ Is that the only way i should use to access ceph rbd? Can we use python-guestfs to get the same effect? Thanks
2012 Feb 23
1
[PATCH v2] Add a flag to make some functions called only at CONFIG state(RHBZ796520)
..., [], + ("add_drive", (RErr, [String "filename"], []), -1, [ConfigOnly], [], "add an image to examine or modify", "\ @@ -158,7 +158,7 @@ this security hole. Therefore you should think about replacing calls to this function with calls to C<guestfs_add_drive_opts>, and specifying the format."); - ("add_cdrom", (RErr, [String "filename"], []), -1, [DeprecatedBy "add_drive_opts"], + ("add_cdrom", (RErr, [String "filename"], []), -1, [DeprecatedBy "add_drive_opts"; ConfigOnly], [],...
2013 Feb 06
2
Issues with p2v & virt-v2v Windows
...ed up with the same error. This is what I ran: LIBGUESTFS_TRACE=1 LIBGUESTFS_DEBUG=1 virt-v2v -i libvirtxml -os external --network default window2008_r1.xml 2>&1 | tee virt-v2v.log This is the log file that was produced: " libguestfs: new guestfs handle 0x32df9a0 libguestfs: trace: add_drive_opts "/run/media/jkates/WD-3TB-DSK-B/p2v/window2008_r1-cciss_c0d0" "format:raw" "iface:ide" "name:hda" libguestfs: trace: add_drive_opts = 0 libguestfs: trace: add_drive_opts "/tmp/JxIRaWzMVf" "readonly:true" "format:raw" "iface:...
2017 May 04
1
[PATCH] perl: drop %guestfs_introspection stuff
...ve = %{$Sys::Guestfs::guestfs_introspection{add_drive}}; -ok(1); - -is ($add_drive{ret}, "void"); -is ($add_drive{args}[0][0], "filename"); -is ($add_drive{args}[0][1], "string"); -is ($add_drive{args}[0][2], 0); - -# In libguestfs >= 1.19.19, this is an alias. -my %add_drive_opts = %{$Sys::Guestfs::guestfs_introspection{add_drive_opts}}; -ok(1); - -ok (exists $add_drive_opts{optargs}); -ok (exists $add_drive_opts{optargs}->{readonly}); -is ($add_drive_opts{optargs}->{readonly}[0], "readonly"); -is ($add_drive_opts{optargs}->{readonly}[1], "bool"...
2011 Oct 10
1
Child process died
...I have installed libguestfs on RHEL 5.5 64 bit. 3 packages i have installed. libguestfs-tools-c-1.9.10-1.1 libguestfs-tools-1.9.10-1.1 libguestfs-1.9.10-1.1 When i am trying to run virt-resize it gives me error: virt-resize -expand /dev/sda1 vm01.scilab vm01.scilab-15GB -d libguestfs: trace: add_drive_opts "vm01.scilab" "readonly:true" libguestfs: trace: add_drive_opts = 0 libguestfs: trace: add_drive_opts "vm01.scilab-15GB" libguestfs: trace: add_drive_opts = 0 libguestfs: trace: launch sh: /home/rjones/d/qemu/qemu-wrapper: No such file or directory /home/rjones/d/qemu/...
2015 Oct 20
1
[PATCH v3 10/13] v2v: factor out opening and populating guestfs handle
...le. *) message (f_"Opening the overlay"); - let g = new G.guestfs () in - g#set_identifier "v2v"; - if trace () then g#set_trace true; - if verbose () then g#set_verbose true; - g#set_network true; - List.iter ( - fun ({ov_overlay_file = overlay_file}) -> - g#add_drive_opts overlay_file - ~format:"qcow2" ~cachemode:"unsafe" ~discard:"besteffort" - ~copyonread:true - ) overlays; + let g = open_guestfs () in + populate_overlays g overlays; g#launch (); @@ -261,6 +251,24 @@ and init_targets overlays source output outp...
2013 May 31
3
Re: How to use libguestfs access LVM as non-root user?
...nd the debug message shows it failed to open the LVM device node. I've already set up the group permission ('disk' and 'fuse') for the 'stack' user. Could you shed some lights of what else should I look into? Thanks! $ cat test.py import guestfs g = guestfs.GuestFS() g.add_drive_opts("/dev/xenvg/123", format="qcow2") g.launch() $ id uid=501(stack) gid=504(stack) groups=504(stack),6(disk),498(fuse) $ ll /dev/mapper/xenvg-123 lrwxrwxrwx 1 root root 7 May 31 17:16 /dev/mapper/xenvg-123 -> ../dm-2 $ ll /dev/dm-2 brw-rw---- 1 root disk 253, 2 May 31 18:06 /d...
2012 Dec 15
1
virt-resize Fatal error: exception Guestfs.Error("e2fsck_f
...z /dev/vg0/kvm105_img command line: virt-resize -d --resize /dev/sda2=512M --expand /dev/sda1 /home/solusvm/kvm/template/linux-ubuntu-12.04-server-x86_64-min-gen2-v1.gz /dev/vg0/kvm105_img Examining /home/solusvm/kvm/template/linux-ubuntu-12.04-server-x86_64-min-gen2-v1.gz ... libguestfs: trace: add_drive_opts "/home/solusvm/kvm/template/linux-ubuntu-12.04-server-x86_64-min-gen2-v1.gz" "readonly:true" libguestfs: trace: add_drive_opts = 0 libguestfs: trace: add_drive_opts "/dev/vg0/kvm105_img" "readonly:false" libguestfs: trace: add_drive_opts = 0 libguestfs: t...
2013 May 31
2
Re: How to use libguestfs access LVM as non-root user?
On Fri, May 31, 2013 at 3:55 PM, Richard W.M. Jones <rjones@redhat.com>wrote: > On Fri, May 31, 2013 at 10:58:30AM +0800, Qiu Yu wrote: > > Unfortunately, the standard 'disk' group permission only applies to > > /dev/sdX device nodes, not to device mapper nodes created by LVM > commands. > > Actually, it depends on udev rules. On my machine device mapper
2015 Oct 20
0
Re: [PATCH v3 11/13] v2v: add --in-place mode
...type annotation here should not be necessary. But if it is necessary, then put some spaces in, ie: ... (g : G.guestfs) ... > + List.iter ( > + fun ({s_qemu_uri = qemu_uri; s_format = format}) -> > + match format with > + | None -> > + g#add_drive_opts qemu_uri ~cachemode:"unsafe" ~discard:"besteffort" > + | Some fmt -> > + g#add_drive_opts qemu_uri ~format:fmt ~cachemode:"unsafe" > + ~discard:"besteffort" You don't need the match statement here, just us...
2013 May 30
2
How to use libguestfs access LVM as non-root user?
...'Permission denied' RuntimeError. Could someone kindly guide me the correct way to handle LVM disk as non-root user? Cause as http://libguestfs.org homepage claims, "libguestfs doesn't need root permissions." A little confused somehow. import guestfs g = guestfs.GuestFS() g.add_drive_opts("/dev/vg0/disk1", format="raw") Thanks! -- Qiu Yu
2015 Oct 20
2
[PATCH v3 11/13] v2v: add --in-place mode
...#as_options; @@ -269,6 +299,17 @@ and populate_overlays (g:G.guestfs) overlays = ~copyonread:true ) overlays +and populate_disks (g:G.guestfs) src_disks = + List.iter ( + fun ({s_qemu_uri = qemu_uri; s_format = format}) -> + match format with + | None -> + g#add_drive_opts qemu_uri ~cachemode:"unsafe" ~discard:"besteffort" + | Some fmt -> + g#add_drive_opts qemu_uri ~format:fmt ~cachemode:"unsafe" + ~discard:"besteffort" + ) src_disks + and inspect_source g root_choice = let roots =...
2012 May 15
1
[PATCH] po: update POTFILES
...1 file changed, 39 insertions(+) diff --git a/po/POTFILES b/po/POTFILES index 2b4b586..789279a 100644 --- a/po/POTFILES +++ b/po/POTFILES @@ -131,6 +131,45 @@ fish/time.c fish/virt.c format/format.c fuse/guestmount.c +gobject/guestfs-gobject-optargs-add_domain.c +gobject/guestfs-gobject-optargs-add_drive_opts.c +gobject/guestfs-gobject-optargs-btrfs_filesystem_resize.c +gobject/guestfs-gobject-optargs-compress_device_out.c +gobject/guestfs-gobject-optargs-compress_out.c +gobject/guestfs-gobject-optargs-copy_device_to_device.c +gobject/guestfs-gobject-optargs-copy_device_to_file.c +gobject/guestfs-gobjec...
2013 Sep 04
2
python-guestfs
...uot;vm1935028.nbregion.ec2.cloudkc.cn" >>> os.system("echo " + vdi_name + ">" + sheepfs_dir + "/vdi/mount") 0 >>> import guestfs >>> g=guestfs.GuestFS() >>> imgfile=sheepfs_dir + "/volume/" + vdi_name >>> g.add_drive_opts(imgfile, format="raw", readonly=0) >>> g.launch() >>> root = g.inspect_os() >>> print root [] >>> g.list_filesystems() [('/dev/vda1', 'ntfs'), ('/dev/vda2', 'ntfs')]
2012 Apr 26
1
[PATCH] gobject: Move headers into a subdirectory
...-gobject-struct-inotify_event.h \ - guestfs-gobject-struct-partition.h \ - guestfs-gobject-struct-application.h \ - guestfs-gobject-struct-isoinfo.h \ - guestfs-gobject-struct-mdstat.h \ - guestfs-gobject-struct-btrfssubvolume.h \ - guestfs-gobject-optargs-test0.h \ - guestfs-gobject-optargs-add_drive_opts.h \ - guestfs-gobject-optargs-add_domain.h \ - guestfs-gobject-optargs-inspect_get_icon.h \ - guestfs-gobject-optargs-mount_local.h \ - guestfs-gobject-optargs-umount_local.h \ - guestfs-gobject-optargs-mkfs_opts.h \ - guestfs-gobject-optargs-mount_9p.h \ - guestfs-gobject-optargs-ntfsresize...
2015 Oct 13
2
[PATCH v2 4/4] v2v: reuse main guestfs for virtio win drivers iso
...l +++ b/v2v/convert_windows.ml @@ -294,13 +294,25 @@ echo uninstalling Xen PV driver ) else if is_regular_file virtio_win then ( try - let g2 = new Guestfs.guestfs () in - if trace () then g2#set_trace true; - if verbose () then g2#set_verbose true; - g2#add_drive_opts virtio_win ~readonly:true; - g2#launch (); - let vio_root = "/" in - g2#mount_ro "/dev/sda" vio_root; + let label = "viowin" in + let vio_root = "/virtio-win-iso" in + let g2 = + (* not all backends support h...
2015 Oct 21
1
[PATCH] v2v: fix identifier
...windows.ml +++ b/v2v/convert_windows.ml @@ -296,7 +296,7 @@ echo uninstalling Xen PV driver else if is_regular_file virtio_win then ( try let g2 = open_guestfs () in - g#set_identifier "virtio_win"; + g2#set_identifier "virtio_win"; g2#add_drive_opts virtio_win ~readonly:true; g2#launch (); let vio_root = "/" in -- 2.1.0