Commit Graph

62 Commits

Author SHA1 Message Date
Pavel Hrdina 82eaf4742e virtinst.storage: improve detection of disk type
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2017-03-06 14:31:42 -05:00
Cole Robinson eb2a56f700 util: Move xml_indent to XMLBuilder 2016-08-24 15:56:13 -04:00
Tristan Helmich 27703ca379 storage: Enable creation of zfs storave volumes 2016-08-09 11:48:34 -04:00
Pavel Hrdina 9cdf78e94c translation: fix usage of translate function
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2016-07-26 09:34:20 +02:00
Cole Robinson 5398282e12 storage: Detect backing_store format automatically
By attempting to manage/import the passed path. This makes it
work via both virt-install and virt-manager

https://bugzilla.redhat.com/show_bug.cgi?id=1235406
2016-06-16 20:36:30 -04:00
Cole Robinson 8d4e58c501 cli: Add --disk backing_format= option 2016-06-16 20:09:37 -04:00
Cole Robinson f4dfb6de9d Fix recent pylint/pep8 output 2016-04-18 16:42:12 -04:00
Cole Robinson 95fd32dffd storage: Avoid some test suite noise on thread cleanup 2015-12-24 11:30:15 -05:00
Pavel Hrdina 0ccbcd8883 storage: remove attempt counter from disk allocation thread
Remove the lookup counter from _progress_thread, it's not necessary, the
loop is terminated by _install_finished boolean.

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1270277

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2015-11-19 15:09:59 +01:00
Charles Arnold f30975c3f8 storage: remove cow as supported format
Support for this format was removed about a year ago from
qemu with this commit,

commit 550830f9351291c585c963204ad9127998b1c1ce
Author: Stefan Hajnoczi <stefanha@redhat.com>
Date:   Tue Sep 16 15:24:24 2014 +0100

    block: delete cow block driver

Signed-off-by: Charles Arnold <carnold@suse.com>
2015-09-29 16:33:16 -04:00
Cole Robinson 697164f2e5 virtinst: Centralize urlgrabber meter lookup
We will eventually want to drop this dep since it's basically dead
upstream, this is a small step in that direction
2015-09-06 15:09:44 -04:00
Cole Robinson acfb988945 xmlbuilder: Make _add_child and _remove_child public
We have a lot of functions that are just wrappers around these, so
make it public for future use.
2015-09-04 15:47:43 -04:00
Charles Arnold eb92178e0c storage: fix default storage pool lookup
virt-convert fails when the storage pool is already present but
is not called 'default'.

If the 'default' pool has been removed but another pool uses the
default location of /var/lib/libvirt/images virt-convert will fail
to find the pool and attempt to create another one with the same
path. This causes the conversion to fail.

Signed-off-by: Charles Arnold <carnold@suse.com>

(crobinso: Remove now-redundant 'pass')
2015-08-31 18:25:37 -04:00
Cole Robinson e22aeac5ae storage: session path should be ~/.local/share/libvirt/images
Not .local/libvirt/images :/ App dirs aren't supposed to be in ~/.local
2015-08-10 12:35:13 -04:00
Pavel Hrdina 0fbe8e7a1f translation: fix wrong usage of _() function
All the strings have to be at first translated and then we can fill the
formated and translated string.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2015-06-05 16:33:51 -04:00
Cole Robinson 2d54949719 virtinst: Drop a bunch of uses of xmlbuilder make_xpath_cb
I'd like to drop that functionality from xmlbuilder, and just open
code it at the callers... this is most of the way there
2015-05-06 16:26:51 -04:00
Cole Robinson 252c216fb9 createpool: Don't unconditionally use /var/lib/libvirt
Doesn't make sense for session URIs
2015-05-02 19:54:14 -04:00
Cole Robinson 45e6cd4cac Remove redundant 'default dir' functions 2015-05-02 19:48:04 -04:00
Cole Robinson 015da05973 storage: Use .local/libvirt/images for session URIs
.config isn't really appropriate
2015-05-02 19:09:14 -04:00
Cole Robinson 8369c65966 storage: Use ~/.config/libvirt/images for qemu:///session
It doesn't create the annoying ~/VirtualMachines directory, and already
has proper labelling.
2015-04-24 21:01:55 -04:00
Giuseppe Scrivano 616df760be storage: copy allocation and capacity also on cross-pool clones
Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1210265

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2015-04-10 16:40:49 +02:00
Cole Robinson 45ae269950 storage: Use XMLBuilder for pool enumerate parsing
And kill the parse_node_helper function, since that paradigm is dead.
2015-04-03 16:45:43 -04:00
Giuseppe Scrivano bbb96bcaa8 clone: keep the same image format on a cross-pool clone
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2015-04-01 11:56:34 +02:00
Cole Robinson 6e2e43b178 storage: Fix some pylint on libvirt without REFLINK flag 2015-02-22 10:25:47 -05:00
Cole Robinson 271e248a41 storage: Fix test failures with reflink check 2015-02-22 10:13:27 -05:00
Chen Hanxiao 4622a0a8f8 virt-clone: introduce --reflink for btrfs COW copy
libvirt commit 466b29c8c3593b2dac92acad5dd8ec923c428259
introduce btrfsCloneFile() for COW copy.
This patch add support for --reflink option for virt-clone.
When specified --reflink, if src and dst images all on a btrfs
fs, we could take advantage of COW copy.
If not, error out.

Signed-off-by: Chen Hanxiao <chenhanxiao@cn.fujitsu.com>
2015-02-07 10:18:05 +08:00
Cole Robinson 9ae3dbe05b virt-install: Fix --disk pool=NETPOOL,size=... creation 2014-12-10 13:22:42 -05:00
Cole Robinson 626295a036 storage: Remove unused function 2014-12-09 17:42:01 -05:00
Cole Robinson e61311fc8a storage: More support for network pools
Including parsing multiple hosts, filling reasonably defaults, making
sure the createpool wizard does the correct thing, etc.
2014-12-09 16:12:47 -05:00
Cole Robinson 9f4d03d31a storage: Really don't use PREALLOC flag with test driver
Even if we are trying really hard to fake looking like qemu/kvm
2014-12-09 13:14:12 -05:00
Cole Robinson ba05e1cd43 diskbackend: Drop all pool source matching
It's only used to try and determine if a path actually exists, however
in the pool source case there isn't much we can actually do with that
info.
2014-12-04 20:10:37 -05:00
Cole Robinson eb7612356e virtinst: Switch to relative imports, fix cyclic import warnings 2014-09-12 16:28:38 -04:00
Cole Robinson 3064f4058d diskbackend: Simplify pool source lookup
Have it share logic with a similar routine
2014-09-12 16:28:38 -04:00
Chen Hanxiao 5f3ede96de storage: fix a typo
s/paramaters/parameters

Signed-off-by: Chen Hanxiao <chenhanxiao@cn.fujitsu.com>
2014-07-28 16:55:28 +08:00
Chen Hanxiao ddd88dac25 storage: fix another comment typo
s/explictly/explicitly

Thanks for Giuseppe's reminding.

Signed-off-by: Chen Hanxiao <chenhanxiao@cn.fujitsu.com>
2014-06-30 16:20:38 +08:00
Cole Robinson ceab99cf7b virtconv: Don't create default pool when in dry mode
We will still need to create pools to probe source storage if doing
--print-xml.
2014-05-31 16:30:00 -04:00
Giuseppe Scrivano 7a1ffff927 storage: add support for gluster fs pools.
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2014-02-12 15:46:25 +01:00
Giuseppe Scrivano a2706e9258 storage: add new attribute "source_dir"
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2014-02-12 15:46:25 +01:00
Giuseppe Scrivano dd0af85d5a storage: make "target_path" optional
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2014-02-12 15:46:25 +01:00
Cole Robinson c5f6c6852a VirtualDisk: Always use storage APIs for provisioning
This means if we are passed an unmanaged path, we try to create a
storage pool for the parent directory.

We skip directories like /dev where doing this might be problematic.

This makes things much friendlier to use for remote connections, and
means we can always rely on having libvirt's storage APIs to use
for format probing.
2014-02-08 19:24:14 -05:00
Cole Robinson 67743cbe31 storage: Only try lazy_refcounts with format=qcow2 2014-02-08 19:24:13 -05:00
Cole Robinson 0b4a72fd77 virt-convert: Reimplement it
We totally break CLI compat here, but the previous tool wasn't sustainable.
Instead, repurpose the tool as strictly converting external formats
like ovf/vmx to native libvirt XML, and launch the guest.

So we drop vmx/virt-image output, and virt-image input, and a slew of
command line options. I don't think anyone was depending on this in a
scripted fashion, so in practice I don't think anyone will care.

Add much more comprehensive unit tests while we are at it.
2014-02-07 21:16:09 -05:00
Cole Robinson 6f93d3decf Use .qcow2 extension when creating qcow2 files
Seems the be the practice these days
2014-02-04 17:30:24 -05:00
Cole Robinson cac593da8f storage: Use qcow2 lazy_refcounts if supported 2014-02-03 15:55:20 -05:00
Cole Robinson ffa9bb77b3 Fix some pylint 2014-01-25 15:52:34 -05:00
Cédric Bosdonnat beab40e3b1 Share the list of all disk image formats
(crobinso: Fix some trailing whitespace)
2014-01-25 11:59:32 -05:00
Cole Robinson 7f66926721 Fix first time remote URL installs from virt-manager (bz 1049852)
On first run, the remote URL install handling creates a storage pool
for /var/lib/libvirt/boot on the remote host. After this, it clears
the VirtualConnection's object cache, so the next time all pools are
fetched, it returns an accurate list.

However that clear_cache call wasn't propagated up to virt-manager's
cache. Add a new cb to fix it.
2014-01-18 14:57:39 -05:00
Cole Robinson 70f1f8df1e storage: Parse volume key 2013-12-05 09:17:12 -05:00
Giuseppe Scrivano 2a040ccd17 mass update: remove double spaces from comments
Updated by this script:

find -name '*.py' -exec sed -i "s|^\(#.*[^.?\!]\)  \(.*[^#]\)$|\1 \2|g" \{\} \;

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2013-10-28 17:22:31 +01:00
Cole Robinson 56b9f6187b Streamline support checks
Just use one function check_support
2013-10-06 10:08:04 -04:00