Commit Graph

24 Commits

Author SHA1 Message Date
Pavel Hrdina 5e2b63c1ff virt-clone: add support to clone nvram VARS
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1243335

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2017-03-07 13:06:20 +01:00
Kothapally Madhu Pavan d107762880 Error out cleanly when autoclone or destination file is not specified
When virt-clone is used without autoclone or destination file, libvirt
errors with message "ERROR    missing source information for device vda".
This doesn't convey what is missing. This patch will indicate which
options to use.

Signed-off-by: Kothapally Madhu Pavan <kmp@linux.vnet.ibm.com>
2016-09-02 14:10:17 -04:00
Cole Robinson 118bf85cba Apparently -tt doesn't work with #!/usr/bin/env ... 2016-06-17 16:38:57 -04:00
Cole Robinson 47dd38eb3e Use #!/usr/bin/env for python scripts
This is recommended for upstream, but not for downstream, like Fedora.
So change /usr/bin/env to /usr/bin/python2 at RPM install time to
match the ideal Fedora config.

https://fedoraproject.org/wiki/Features/SystemPythonExecutablesUseSystemPython
https://bugzilla.redhat.com/show_bug.cgi?id=1303282
2016-06-17 12:56:14 -04:00
Cole Robinson 93f826a8b2 cli: Replace add --check option (bz 1063471)
For fine grained enabling/disabling validation checks. Use this to
replace the heavy handed --force option.
2015-04-11 19:48:35 -04: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
Chen Hanxiao 6811bbfaac virt-clone: remove rarely used option --original-xml in fail message
Also replace the short options by long options.

Signed-off-by: Chen Hanxiao <chenhanxiao@cn.fujitsu.com>
2014-12-10 11:36:23 +08:00
Chen Hanxiao 9e6eaf5d18 virt-clone: improve some error prompts
Signed-off-by: Chen Hanxiao <chenhanxiao@cn.fujitsu.com>
2014-12-09 16:10:35 +08:00
Cole Robinson 196ff823b3 Fix warnings with latest pep8 2014-05-02 10:20:59 -04:00
Martin Kletzander 4196f4287b Use proper python version
since we work with python2 only, mentioning it in all shebangs make
the commands from git work even when python3 is set as default.

This also fixes one test where command being ran is 'virt-xml' through
subprocess.Popen().

While at that, add '-tt' where possible in order to make everyone use
same indentation characters.

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
2014-02-12 21:55:32 +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 4e4fb15a2f virt-*: Drop all --prompt handling
This stuff is not very helpful and a pain to maintain. Let's drop it once
and for all. We still accept the CLI options and log a warning so people
hopefully take the hint.
2014-02-04 17:01:27 -05:00
Cole Robinson 4ade419002 virt-clone: Fix typo 2014-02-02 15:36:33 -05:00
Cole Robinson 37122dbc20 clone: Mention virt-sysprep everywhere (bz 878170, bz 912993) 2014-02-01 15:20:37 -05:00
Cole Robinson d1edce1ca5 cli: Drop dest= from most arguments, it was redundant 2014-01-22 10:36:14 -05:00
Cole Robinson c426a30511 Convert all command line handling to argparse
Allows us to drop some hacks, and we may need it for a new upcoming
tool.
2014-01-19 11:32:08 -05:00
Cole Robinson 4c15da439b cli: Combine registering a bunch of common options 2013-09-28 11:27:26 -04:00
Cole Robinson b3a72bcb95 cli: Remove unneeded parameter to optparse.add_option 2013-09-28 10:03:08 -04:00
Cole Robinson e973f34c41 virtinst: Remove User module
I'm sure the solaris support is totally broken, so just drop this
overcomplicated abstraction.

Also fix a bug where we were using usermode networking in a bunch of
places where it isn't supported.
2013-07-02 21:17:07 -04:00
Cole Robinson 802ed1cba6 clone: Bunch of API cleanup
Simplify imports, drop back compat stuff, drop needless property handling.
2013-07-02 18:54:03 -04:00
Cole Robinson b6fa7d16e5 Add epilog and description for virt-* --help 2013-06-30 15:03:53 -04:00
Cole Robinson 0d243983d0 Revive pep8 and clean up the code
autopep8 is pretty cool :)
2013-04-13 15:22:43 -04:00
Cole Robinson d6c8ad0297 Wire up python unit tests, unify gettext setup 2013-04-03 18:22:05 -04:00
Cole Robinson 88603e4fad Merge code from python-virtinst.git
As outlined here:

https://www.redhat.com/archives/virt-tools-list/2012-February/msg00040.html

For now this is just a direct import of the code from virtinst commit
dca5a4d6245f21d554f8853197a6a234bfc8e52c. History is not merged, so
please refer to original git for detailed commit histor:

http://git.fedorahosted.org/cgit/python-virtinst.git/
2013-04-03 18:22:05 -04:00