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
Cole Robinson
98187eb4b7
util: Fix generate_name start_num logic
...
We would start at start_num+1 which was confusing, fix it to do
the right thing.
2013-10-05 10:22:27 -04:00
Cole Robinson
37350859ce
storage: Use qcow2 metadata preallocation if supported
2013-10-01 14:29:58 -04:00
Cole Robinson
34c502560f
storage: Drop unused static function
...
This allows us to simplify the parameters for find_free_name
2013-09-30 16:22:12 -04:00
Cole Robinson
74e8fff069
clone: Fix a few misc issues
2013-09-29 11:31:03 -04:00
Cole Robinson
a9a085340b
support: Rename SUPPORT_STORAGE to SUPPORT_POOL
...
It's more accurate. And fix up comments about back compat which no
longer apply.
2013-09-29 09:21:42 -04:00
Cole Robinson
7a5dc7c544
devicedisk: path_in_use_by: Check backing stores as well
...
Plumb through a fetch_all_vols helper for this, and do all the
caching bits.
2013-09-28 21:07:18 -04:00
Cole Robinson
bc34df1dc7
storage: Parse volume backingstore
2013-09-28 19:21:58 -04:00
Cole Robinson
166414dd57
storage: Add VDI to format list
2013-09-27 13:22:40 -04:00
Cole Robinson
9ec845af03
xmlbuilder: Unify make_xpath callbacks
2013-09-24 09:25:05 -04:00
Cole Robinson
a6d92c7001
Drop a lot of usage of utility XML functions
2013-09-22 17:34:53 -04:00
Cole Robinson
aff0ddb259
Use XMLBuilder for Storage object handling
...
Simplify the API a bunch while we are at it, add tests, etc.
2013-09-20 10:00:08 -04:00
Cole Robinson
952708f509
virtinst: Rename most files to be more sensible
...
- Lower case everything
- Virtual... -> device...
- A few other similar bits
2013-08-09 08:54:39 -04:00