diff options
author | Kothapally Madhu Pavan <kmp@linux.vnet.ibm.com> | 2016-08-19 03:53:43 -0400 |
---|---|---|
committer | Cole Robinson <crobinso@redhat.com> | 2016-09-02 14:10:17 -0400 |
commit | d10776288078c10c296fd8cdab47155935dfa79f (patch) | |
tree | b06f0e27cf966b6251a18dc88fe3c755a3c14d14 /virt-clone | |
parent | c050bf45fa316223c98d6234d8e590ce90373738 (diff) | |
download | virt-manager-d10776288078c10c296fd8cdab47155935dfa79f.tar.gz |
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>
Diffstat (limited to 'virt-clone')
-rwxr-xr-x | virt-clone | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -168,6 +168,12 @@ def main(conn=None): if conn is None: conn = cli.getConnection(options.connect) + if (options.new_diskfile is None and + options.auto_clone is False and + options.xmlonly is False): + fail(_("Either --auto-clone or --file is required," + " use '--auto-clone or --file' and try again.")) + design = Cloner(conn) design.clone_running = options.clone_running |