sandia-minimega / minimega

minimega
GNU General Public License v3.0
148 stars 67 forks source link

Bug: Unpaused vms cause migration issues #1445

Open mkunz7 opened 3 years ago

mkunz7 commented 3 years ago

Describe your environment

  1. minimega version - latest
  2. Linux distro/version - ubuntu 20.04
  3. Go compiler version - 1.12.5
  4. VM types - kvm

Describe the bug if you don't pause a vm with vm stop before you create a migration file with vm migrate, vm migrate will never finish and show completion statuses >100%. I stopped mine at 300%.

To Reproduce Tested with a windows 10 image.

clear vm config
vm config memory 4096
vm config disk /root/windows.qcow2
vm config experiment,main
vm launch kvm windows
vm start windows
vm migrate windows /root/windows.state
vm migrate
vm migrate
vm migrate

vs

clear vm config
vm config memory 4096
vm config disk /root/windows.qcow2
vm config experiment,main
vm launch kvm windows
vm start windows
vm stop windows
vm migrate windows /root/windows.state
vm migrate

Expected behavior vm migrate should either warn the vm is not stopped or stop it for you

glattercj commented 3 years ago

@mkunz7 I'm not sure the VM being stopped is the root cause. According to the migrate src minimega sets the VM to pause before calling Migrate. I have also seen this behavior on a Windows 10 VM (up to >22,000% complete), but it's a very specific base image that always fails that way. There are other Windows 10 VMs that migrate just fine. Maybe @aherna can look into it.