[GH-ISSUE #314] Migration issue #245

Closed
opened 2026-02-27 16:38:34 +03:00 by kerem · 12 comments
Owner

Originally created by @romu70 on GitHub (May 21, 2014).
Original GitHub issue: https://github.com/retspen/webvirtmgr/issues/314

Hi,
I run webvirtmgr to manage 2 VMs hosts, and it is installed on one of the 2 hosts.

1- When I try to move a VM from one host to the other one -> Error 500.

Here is the stack trace:

AttributeError at /instance/1/appscan/

'virConnect' object has no attribute 'migrate'

Request Method:     POST
Request URL:    http://sublime:8000/instance/1/appscan/
Django Version:     1.5.5
Exception Type:     AttributeError
Exception Value:    

'virConnect' object has no attribute 'migrate'

Exception Location:     /var/www/webvirtmgr/vrtManager/instance.py in moveto, line 70
Python Executable:  /usr/bin/python
Python Version:     2.7.6
Python Path:    

['/var/www/webvirtmgr',
 '/usr/lib/python2.7',
 '/usr/lib/python2.7/plat-x86_64-linux-gnu',
 '/usr/lib/python2.7/lib-tk',
 '/usr/lib/python2.7/lib-old',
 '/usr/lib/python2.7/lib-dynload',
 '/usr/local/lib/python2.7/dist-packages',
 '/usr/lib/python2.7/dist-packages',
 '/usr/lib/python2.7/dist-packages/PILcompat',
 '/usr/lib/python2.7/dist-packages/gtk-2.0']

2- I've tried to move both the img and the xml files from one host to the other one. It works almost, except I don't see the snapshots. Any way to manually move the whole configuration including the snapshots?

Thanks.

Originally created by @romu70 on GitHub (May 21, 2014). Original GitHub issue: https://github.com/retspen/webvirtmgr/issues/314 Hi, I run webvirtmgr to manage 2 VMs hosts, and it is installed on one of the 2 hosts. 1- When I try to move a VM from one host to the other one -> Error 500. Here is the stack trace: ``` AttributeError at /instance/1/appscan/ 'virConnect' object has no attribute 'migrate' Request Method: POST Request URL: http://sublime:8000/instance/1/appscan/ Django Version: 1.5.5 Exception Type: AttributeError Exception Value: 'virConnect' object has no attribute 'migrate' Exception Location: /var/www/webvirtmgr/vrtManager/instance.py in moveto, line 70 Python Executable: /usr/bin/python Python Version: 2.7.6 Python Path: ['/var/www/webvirtmgr', '/usr/lib/python2.7', '/usr/lib/python2.7/plat-x86_64-linux-gnu', '/usr/lib/python2.7/lib-tk', '/usr/lib/python2.7/lib-old', '/usr/lib/python2.7/lib-dynload', '/usr/local/lib/python2.7/dist-packages', '/usr/lib/python2.7/dist-packages', '/usr/lib/python2.7/dist-packages/PILcompat', '/usr/lib/python2.7/dist-packages/gtk-2.0'] ``` 2- I've tried to move both the img and the xml files from one host to the other one. It works almost, except I don't see the snapshots. Any way to manually move the whole configuration including the snapshots? Thanks.
kerem closed this issue 2026-02-27 16:38:35 +03:00
Author
Owner

@retspen commented on GitHub (May 21, 2014):

Can you change line 70 in file /var/www/webvirtmgr/vrtManager/instance.py:

dom.migrate(self.wvm, 0, name, None, 0)

TO

self.wvm.migrate(dom, 0, name, None, 0)

and try to migrate again

<!-- gh-comment-id:43797835 --> @retspen commented on GitHub (May 21, 2014): Can you change line 70 in file /var/www/webvirtmgr/vrtManager/instance.py: <code>dom.migrate(self.wvm, 0, name, None, 0)</code> TO <code>self.wvm.migrate(dom, 0, name, None, 0)</code> and try to migrate again
Author
Owner

@romu70 commented on GitHub (May 22, 2014):

Here is my moveTo function:

    def moveto(self, conn, name):
        dom = conn.get_instance(name)
        self.wvm.migrate(dom, 0, name, None, 0)

So it is already the good one.

<!-- gh-comment-id:43882519 --> @romu70 commented on GitHub (May 22, 2014): Here is my moveTo function: ``` def moveto(self, conn, name): dom = conn.get_instance(name) self.wvm.migrate(dom, 0, name, None, 0) ``` So it is already the good one.
Author
Owner

@romu70 commented on GitHub (May 22, 2014):

Anatoly, I wrote the code is already the good one, but the migration doesn't work. Sorry if I wasn't clear enough. Please, don't close this issue.

<!-- gh-comment-id:43883019 --> @romu70 commented on GitHub (May 22, 2014): Anatoly, I wrote the code is already the good one, but the migration doesn't work. Sorry if I wasn't clear enough. Please, don't close this issue.
Author
Owner

@retspen commented on GitHub (May 22, 2014):

What's error now?

<!-- gh-comment-id:43883130 --> @retspen commented on GitHub (May 22, 2014): What's error now?
Author
Owner

@romu70 commented on GitHub (May 22, 2014):

Same, I didn't change anything, the code was already "self.wvm.migrate...".

<!-- gh-comment-id:43883204 --> @romu70 commented on GitHub (May 22, 2014): Same, I didn't change anything, the code was already "self.wvm.migrate...".
Author
Owner

@retspen commented on GitHub (May 22, 2014):

Did you restart supervisor service?

<!-- gh-comment-id:43887738 --> @retspen commented on GitHub (May 22, 2014): Did you restart supervisor service?
Author
Owner

@romu70 commented on GitHub (May 22, 2014):

Yes several times, at least between debug and release modes.

On Thu, May 22, 2014 at 3:30 PM, Anatoliy Guskov
notifications@github.comwrote:

Did you restart supervisor service?


Reply to this email directly or view it on GitHubhttps://github.com/retspen/webvirtmgr/issues/314#issuecomment-43887738
.

<!-- gh-comment-id:43890066 --> @romu70 commented on GitHub (May 22, 2014): Yes several times, at least between debug and release modes. On Thu, May 22, 2014 at 3:30 PM, Anatoliy Guskov notifications@github.comwrote: > Did you restart supervisor service? > > — > Reply to this email directly or view it on GitHubhttps://github.com/retspen/webvirtmgr/issues/314#issuecomment-43887738 > .
Author
Owner

@retspen commented on GitHub (May 22, 2014):

I am understand (my English is not very good). You need update WebVirtMgr to latest version. In line 70 must be dom.migrate(self.wvm, 0, name, None, 0)

<!-- gh-comment-id:43892176 --> @retspen commented on GitHub (May 22, 2014): I am understand (my English is not very good). You need update WebVirtMgr to latest version. In line 70 must be <code>dom.migrate(self.wvm, 0, name, None, 0)</code>
Author
Owner

@romu70 commented on GitHub (May 22, 2014):

Ok, updated WebVirtMgr. Now it says "Requested operation is not valid: domain is not running". This means the VM must run to be moved?

<!-- gh-comment-id:43899175 --> @romu70 commented on GitHub (May 22, 2014): Ok, updated WebVirtMgr. Now it says "Requested operation is not valid: domain is not running". This means the VM must run to be moved?
Author
Owner

@retspen commented on GitHub (May 22, 2014):

Yes, need up VM for move memory state to other host.

<!-- gh-comment-id:43900099 --> @retspen commented on GitHub (May 22, 2014): Yes, need up VM for move memory state to other host.
Author
Owner

@romu70 commented on GitHub (May 22, 2014):

Ok, now: "Requested operation is not valid: cannot migrate domain with 5 snapshots". So Ican't move because of the snapshots?

Related to my second question: How can I move manually, including the snapshots?

<!-- gh-comment-id:43900551 --> @romu70 commented on GitHub (May 22, 2014): Ok, now: "Requested operation is not valid: cannot migrate domain with 5 snapshots". So Ican't move because of the snapshots? Related to my second question: How can I move manually, including the snapshots?
Author
Owner

@retspen commented on GitHub (May 22, 2014):

Libvirt doesn't support this function yet.

<!-- gh-comment-id:43926007 --> @retspen commented on GitHub (May 22, 2014): Libvirt doesn't support this function yet.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/webvirtmgr#245
No description provided.