Bug 733388

Summary: RFE: make migrate undefine source by default, provide option to leave defined on src
Product: [Community] Virtualization Tools Reporter: Daniel Roche <d.roche>
Component: virt-managerAssignee: Cole Robinson <crobinso>
Status: CLOSED DUPLICATE QA Contact:
Severity: medium Docs Contact:
Priority: unspecified    
Version: unspecifiedCC: berrange, crobinso, johannbg, xen-maint
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-02-01 23:28:34 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Daniel Roche 2011-08-25 15:39:53 UTC
Description of problem:

 when migrating a guest from a host to another ( with a shared storage pool )
 the source guest stay defined on the previous host

Version-Release number of selected component (if applicable):

 i am using 0.8.6  from RHEL6.1  or SL6.1

How reproducible:

 always

Steps to Reproduce:
1.
  with virt-manager, connect to 2 hosts with a common shared storage
2.
  select migrate menu to a new host
3.
  
Actual results:

 the guest is correctly migrated to the new host, but stay defined 
  ( switched off ) on the previous host

Expected results:

 the guest should be undefined on the previous host 
 similarly as if the migration was done with the virsh CLI tool 
 with the migrate --undefinesource option.

Additional info: 

 it is more an enhancement than a bug, but i think the default should be 
 to undefine source , or at least propose an option to behave like this.

 because when you have a lot of guests, it is VERY EASY to miss that a guest
 was already migrated and running to another host, and nothing prevent you
 to switch on this guest again.  ( i have just done it! )

 this is VERY dangerous, because with shared storage, booting a guest twice
 will certainly lead to data corruption.

Comment 1 Cole Robinson 2012-02-07 23:56:01 UTC
Agreed. We should make this the default, and maybe provide an option to 'leave copy of guest on source host' or something like that.

Comment 2 Cole Robinson 2012-02-07 23:56:40 UTC
*** Bug 629016 has been marked as a duplicate of this bug. ***

Comment 3 Cole Robinson 2014-02-01 23:28:34 UTC
That 'offline' migrate UI was actually bogus, and wasn't truly migrating offline, it was just migrating non-live, which means it would pause the VM to make it migrate faster. In general nobody really wants non-live migration, but if they did, they can manually pause their VM first. So i've removed that option from the upstream UI.

libvirt has true OFFLINE migration support (really just redefining the VM on the new connection), but we are now tracking that in a bug detailing a larger cleanup in this area.

*** This bug has been marked as a duplicate of bug 1060462 ***

Comment 4 Cole Robinson 2014-02-01 23:29:12 UTC
Urgh, wrong comment. But the end result is the same, we are tracking this undefine issue at the dup'd bug.