You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cloudstack.apache.org by Indra Pramana <in...@sg.or.id> on 2013/07/22 08:35:58 UTC

Unable to migrate VM to another host

Dear all,

Good day to you.

I am using CloudStack 4.1.0 and I just realised that I am not able to
migrate a VM to another host. CloudStack GUI gives a "Failed to migrate vm"
error message, and management-server.log file shows this:

http://pastebin.com/Ah9XDRha

Based on the error message, the issue seems to be related to libvirt:

http://wiki.libvirt.org/page/Failed_to_connect_to_the_hypervisor

===
2013-07-22 14:06:16,744 ERROR [cloud.vm.VirtualMachineManagerImpl]
(Job-Executor-35:job-553) Unable to migrate due to End of file while
reading data: Input/output error
===

Seems the error is related to the KVM host not able to connect to the other
host. But I tested manually and I can connect to the other hypervisor:

root@hv-kvm-01:~# virsh --connect qemu+ssh://root@10.237.x.xx/system list
 Id    Name                           State
----------------------------------------------------

I have copied the SSH keys between hosts so that one host can SSH into
another host without password. I also have added the root user into the
libvirtd group.

usermod -G libvirtd -a root

However the problem still persists. Not too sure whether I am following the
right lead. Anyone might have encounter this problem and know how to
resolve the problem?

Looking forward to your reply, thank you.

Cheers.

Re: Unable to migrate VM to another host

Posted by Indra Pramana <in...@sg.or.id>.
Dear David, Prasanna and all,

Good day to you, and thank you for your e-mail.

Thanks for the information and confirmation that the cloudstack-agent runs
as root and that CloudStack uses qemu+tcp (instead of qemu+ssh) on live
migration. Have also confirmed that auth_tcp is configured as none on
libvirtd on both hosts.

/etc/libvirt/libvirtd.conf:

auth_tcp="none"

I have tried simulating a live migration directly on the hypervisor host
itself, and I can confirm that I can do the live migration manually (not
through CloudStack).

On the first host (hv-kvm-01):

root@hv-kvm-01:~# virsh list --all
 Id    Name                           State
----------------------------------------------------
 2     s-299-VM                       running
 3     v-261-VM                       running
 4     i-2-273-VM                     running
 5     i-2-281-VM                     running
* 6     i-2-278-VM                     running*
 7     i-33-287-VM                    running

root@hv-kvm-01:~# virsh migrate --live i-2-278-VM qemu+tcp://
root@10.237.3.22/system

After the migration:

root@hv-kvm-01:~# virsh list --all
 Id    Name                           State
----------------------------------------------------
 2     s-299-VM                       running
 3     v-261-VM                       running
 4     i-2-273-VM                     running
 5     i-2-281-VM                     running
 7     i-33-287-VM                    running

On the second (target) host (hv-kvm-02):

root@hv-kvm-02:~# virsh list --all
 Id    Name                           State
----------------------------------------------------
 2     r-271-VM                       running
 3     i-2-275-VM                     running
 4     i-2-276-VM                     running
 5     i-34-289-VM                    running
 6     i-2-293-VM                     running
* 8     i-2-278-VM                     running*

I can also do a live migration back from hv-kvm-02 to hv-kvm-01.

However, live migration through CloudStack GUI is still failing with the
same error message.

===
2013-07-24 11:47:36,944 DEBUG [agent.transport.Request]
(Job-Executor-1:job-658) Seq 32-1333264394: Sending  { Cmd , MgmtId:
161342671900, via: 32, Ver: v1, Flags: 1001
11,
[{"MigrateCommand":{"vmName":"i-2-281-VM","destIp":"10.237.3.22","hostGuid":"00dd5dba-7419-3689-bc51-1671035c0d8f-LibvirtComputingResource","isWindows":false,"wait"
:0}}] }
2013-07-24 11:47:37,712 DEBUG [agent.transport.Request]
(AgentManager-Handler-3:null) Seq 32-1333264394: Processing:  { Ans: ,
MgmtId: 161342671900, via: 32, Ver: v1, F
lags: 110, [{"MigrateAnswer":{"result":false,"details":"End of file while
reading data: Input/output error","wait":0}}] }
2013-07-24 11:47:37,713 DEBUG [agent.manager.AgentAttache]
(AgentManager-Handler-3:null) Seq 32-1333264394: No more commands found
2013-07-24 11:47:37,713 DEBUG [agent.transport.Request]
(Job-Executor-1:job-658) Seq 32-1333264394: Received:  { Ans: , MgmtId:
161342671900, via: 32, Ver: v1, Flags: 1
10, { MigrateAnswer } }
2013-07-24 11:47:37,713 ERROR [cloud.vm.VirtualMachineManagerImpl]
(Job-Executor-1:job-658) Unable to migrate due to End of file while reading
data: Input/output error
2013-07-24 11:47:37,713 INFO  [cloud.vm.VirtualMachineManagerImpl]
(Job-Executor-1:job-658) Migration was unsuccessful.  Cleaning up:
VM[User|CentOS59-64bit]
===

Therefore, it seems that the problem is on the CloudStack's end rather than
libvirt's and/or QEMU/KVM's end. I am really at loss on how to resolve this
problem now.

Any help is greatly appreciated. Live migration is very important and I
can't move forward without this important feature.

Looking forward to your reply, thank you.

Cheers.



On Wed, Jul 24, 2013 at 12:27 AM, Prasanna Santhanam <ts...@apache.org> wrote:

> On Tue, Jul 23, 2013 at 08:18:31AM -0600, Marcus Sorensen wrote:
> > There is no cloud user on the host/agent side. Agent runs as root. Or is
> > this an experiment to try to run the agent as another user?
>
> That was entirely my mistake. I just went about thinking the agents
> ran as cloud (ssvm, cpvm, kvm agent). Looking at my deployment it
> seems that /etc/sudoers has an entry for cloud but the service runs as
> root. My apologies for misleading on that.
>
> > On Jul 23, 2013 4:44 AM, "Prasanna Santhanam" <ts...@apache.org> wrote:
> >
> > > On Tue, Jul 23, 2013 at 06:19:06PM +0800, Indra Pramana wrote:
> > > > Dear Prasanna and all,
> > > >
> > > > I have tried to remove the host from CloudStack, uninstall and
> reinstall
> > > > cloudstack-agent and added the host back into CloudStack. The "cloud"
> > > > user-id is still not yet created. I then tried to add the "cloud"
> user
> > > > manually, using exactly the same credentials as the "cloud" user on
> the
> > > > other host.
> > > >
> > > > >From the host, I tried to do a virsh connect qemu+ssh to the other
> host
> > > > using the "cloud" user (instead of root), and getting this error:
> > > >
> > > > cloud@hv-kvm-01:~$ virsh --connect qemu+ssh://
> cloud@10.237.3.22/systemlist
> > > > cloud@10.237.3.22's password:
> > > > error: failed to connect to the hypervisor
> > > > error: no valid connection
> > > > error: End of file while reading data: : Input/output error
>
> However - the issue still remains that migration between two KVM hosts
> seems to be failing. The log indicates the error shown above which was
> tried by hand here.
>
> Deployment contains KVM hosts with Ceph+RBD as primary storage.
>
> --
> Prasanna.,
>
> ------------------------
> Powered by BigRock.com
>
>

Re: Unable to migrate VM to another host

Posted by Prasanna Santhanam <ts...@apache.org>.
On Tue, Jul 23, 2013 at 08:18:31AM -0600, Marcus Sorensen wrote:
> There is no cloud user on the host/agent side. Agent runs as root. Or is
> this an experiment to try to run the agent as another user?

That was entirely my mistake. I just went about thinking the agents
ran as cloud (ssvm, cpvm, kvm agent). Looking at my deployment it
seems that /etc/sudoers has an entry for cloud but the service runs as
root. My apologies for misleading on that.

> On Jul 23, 2013 4:44 AM, "Prasanna Santhanam" <ts...@apache.org> wrote:
> 
> > On Tue, Jul 23, 2013 at 06:19:06PM +0800, Indra Pramana wrote:
> > > Dear Prasanna and all,
> > >
> > > I have tried to remove the host from CloudStack, uninstall and reinstall
> > > cloudstack-agent and added the host back into CloudStack. The "cloud"
> > > user-id is still not yet created. I then tried to add the "cloud" user
> > > manually, using exactly the same credentials as the "cloud" user on the
> > > other host.
> > >
> > > >From the host, I tried to do a virsh connect qemu+ssh to the other host
> > > using the "cloud" user (instead of root), and getting this error:
> > >
> > > cloud@hv-kvm-01:~$ virsh --connect qemu+ssh://cloud@10.237.3.22/systemlist
> > > cloud@10.237.3.22's password:
> > > error: failed to connect to the hypervisor
> > > error: no valid connection
> > > error: End of file while reading data: : Input/output error

However - the issue still remains that migration between two KVM hosts
seems to be failing. The log indicates the error shown above which was
tried by hand here. 

Deployment contains KVM hosts with Ceph+RBD as primary storage.

-- 
Prasanna.,

------------------------
Powered by BigRock.com


Re: Unable to migrate VM to another host

Posted by Marcus Sorensen <sh...@gmail.com>.
There is no cloud user on the host/agent side. Agent runs as root. Or is
this an experiment to try to run the agent as another user?
On Jul 23, 2013 4:44 AM, "Prasanna Santhanam" <ts...@apache.org> wrote:

> On Tue, Jul 23, 2013 at 06:19:06PM +0800, Indra Pramana wrote:
> > Dear Prasanna and all,
> >
> > I have tried to remove the host from CloudStack, uninstall and reinstall
> > cloudstack-agent and added the host back into CloudStack. The "cloud"
> > user-id is still not yet created. I then tried to add the "cloud" user
> > manually, using exactly the same credentials as the "cloud" user on the
> > other host.
> >
> > >From the host, I tried to do a virsh connect qemu+ssh to the other host
> > using the "cloud" user (instead of root), and getting this error:
> >
> > cloud@hv-kvm-01:~$ virsh --connect qemu+ssh://cloud@10.237.3.22/systemlist
> > cloud@10.237.3.22's password:
> > error: failed to connect to the hypervisor
> > error: no valid connection
> > error: End of file while reading data: : Input/output error
> >
> > If you notice, the error is the same exact error message I see on the
> > management-server.log when I tried to do a live migration of VM. So I
> tried
> > to follow this lead and implement this instruction to allow the "cloud"
> > user to have access to the hypervisor on the other host:
> >
> > http://wiki.libvirt.org/page/SSHSetup
> >
> > usermod -G libvirtd -a cloud
> >
> > Enabled these on /etc/libvirt/libvirtd.conf:
> >
> > unix_sock_group = "libvirtd"
> > unix_sock_rw_perms = "0770"
> >
> > I also copied the SSH keys of the cloud user to the other host, so that
> it
> > will not prompt for password.
> >
> > And I am now able to do a virsh connect using the "cloud" user:
> >
> > cloud@hv-kvm-01:~$ virsh --connect qemu+ssh://cloud@10.237.3.22/systemlist
> >  Id    Name                           State
> > ----------------------------------------------------
> >  2     i-2-275-VM                     running
> >  3     i-2-276-VM                     running
> >  4     i-2-293-VM                     running
> >
> > But I am still not able to perform live migration of VM.
> >
> > May I know how CloudStack connects to the hypervisors when it performs
> live
> > migration, after finding a suitable target host? Does it request the
> source
> > host to perform a qemu+ssh connect to the target host?
> >
>
> I'm not sure about the specifics here. Perhaps someone else will chime
> in - But from looking at the resource for KVM in cloudstack it appears
> the libvirt XML contains a qemu+tcp:// connection on migrate.
>
> Can you tell us if the KVM hosts share the same management subnet?
> Are they in the same cluster as CloudStack denotes a cluster?
>
> Is there a way to trap the XMLs sent to the KVM resource in the
> libvirt logs? I'd try to enable that if so.
>
> --
> Prasanna.,
>
> ------------------------
> Powered by BigRock.com
>
>

Re: Unable to migrate VM to another host

Posted by Prasanna Santhanam <ts...@apache.org>.
On Tue, Jul 23, 2013 at 06:19:06PM +0800, Indra Pramana wrote:
> Dear Prasanna and all,
> 
> I have tried to remove the host from CloudStack, uninstall and reinstall
> cloudstack-agent and added the host back into CloudStack. The "cloud"
> user-id is still not yet created. I then tried to add the "cloud" user
> manually, using exactly the same credentials as the "cloud" user on the
> other host.
> 
> >From the host, I tried to do a virsh connect qemu+ssh to the other host
> using the "cloud" user (instead of root), and getting this error:
> 
> cloud@hv-kvm-01:~$ virsh --connect qemu+ssh://cloud@10.237.3.22/system list
> cloud@10.237.3.22's password:
> error: failed to connect to the hypervisor
> error: no valid connection
> error: End of file while reading data: : Input/output error
> 
> If you notice, the error is the same exact error message I see on the
> management-server.log when I tried to do a live migration of VM. So I tried
> to follow this lead and implement this instruction to allow the "cloud"
> user to have access to the hypervisor on the other host:
> 
> http://wiki.libvirt.org/page/SSHSetup
> 
> usermod -G libvirtd -a cloud
> 
> Enabled these on /etc/libvirt/libvirtd.conf:
> 
> unix_sock_group = "libvirtd"
> unix_sock_rw_perms = "0770"
> 
> I also copied the SSH keys of the cloud user to the other host, so that it
> will not prompt for password.
> 
> And I am now able to do a virsh connect using the "cloud" user:
> 
> cloud@hv-kvm-01:~$ virsh --connect qemu+ssh://cloud@10.237.3.22/system list
>  Id    Name                           State
> ----------------------------------------------------
>  2     i-2-275-VM                     running
>  3     i-2-276-VM                     running
>  4     i-2-293-VM                     running
> 
> But I am still not able to perform live migration of VM.
> 
> May I know how CloudStack connects to the hypervisors when it performs live
> migration, after finding a suitable target host? Does it request the source
> host to perform a qemu+ssh connect to the target host?
> 

I'm not sure about the specifics here. Perhaps someone else will chime
in - But from looking at the resource for KVM in cloudstack it appears
the libvirt XML contains a qemu+tcp:// connection on migrate. 

Can you tell us if the KVM hosts share the same management subnet?
Are they in the same cluster as CloudStack denotes a cluster?

Is there a way to trap the XMLs sent to the KVM resource in the
libvirt logs? I'd try to enable that if so.

-- 
Prasanna.,

------------------------
Powered by BigRock.com


Re: Unable to migrate VM to another host

Posted by Indra Pramana <in...@sg.or.id>.
Dear Prasanna and all,

I have tried to remove the host from CloudStack, uninstall and reinstall
cloudstack-agent and added the host back into CloudStack. The "cloud"
user-id is still not yet created. I then tried to add the "cloud" user
manually, using exactly the same credentials as the "cloud" user on the
other host.

>From the host, I tried to do a virsh connect qemu+ssh to the other host
using the "cloud" user (instead of root), and getting this error:

cloud@hv-kvm-01:~$ virsh --connect qemu+ssh://cloud@10.237.3.22/system list
cloud@10.237.3.22's password:
error: failed to connect to the hypervisor
error: no valid connection
error: End of file while reading data: : Input/output error

If you notice, the error is the same exact error message I see on the
management-server.log when I tried to do a live migration of VM. So I tried
to follow this lead and implement this instruction to allow the "cloud"
user to have access to the hypervisor on the other host:

http://wiki.libvirt.org/page/SSHSetup

usermod -G libvirtd -a cloud

Enabled these on /etc/libvirt/libvirtd.conf:

unix_sock_group = "libvirtd"
unix_sock_rw_perms = "0770"

I also copied the SSH keys of the cloud user to the other host, so that it
will not prompt for password.

And I am now able to do a virsh connect using the "cloud" user:

cloud@hv-kvm-01:~$ virsh --connect qemu+ssh://cloud@10.237.3.22/system list
 Id    Name                           State
----------------------------------------------------
 2     i-2-275-VM                     running
 3     i-2-276-VM                     running
 4     i-2-293-VM                     running

But I am still not able to perform live migration of VM.

May I know how CloudStack connects to the hypervisors when it performs live
migration, after finding a suitable target host? Does it request the source
host to perform a qemu+ssh connect to the target host?

Appreciate if anyone who is familiar with CloudStack VM live migration can
shed some lights on this.

Looking forward to your reply, thank you.

Cheers.



On Tue, Jul 23, 2013 at 12:25 PM, Indra Pramana <in...@sg.or.id> wrote:

> Hi Prasanna,
>
> Good day to you, and thank you for your e-mail.
>
> On Mon, Jul 22, 2013 at 9:54 PM, Prasanna Santhanam <ts...@apache.org>wrote:
>
>> On Mon, Jul 22, 2013 at 08:25:11PM +0800, Indra Pramana wrote:
>> > Dear Prasanna and all,
>> >
>> > In addition, earlier I have tried to force-connect the hypervisor host
>> when
>> > it was on disconnected mode. However, the cloud user id is still not
>> being
>> > created.
>> >
>> > Looking forward to your reply, thank you.
>>
>> please share the /var/log/cloudstack/agent/setupAgent.log via a
>> pastebin.
>>
>
> There's no setupAgent.log file under /var/log/cloudstack/agent directory.
> There's setup.log file, though. However, the file was last updated on 18
> July 2013. The content is inside this pastebin:
>
> http://pastebin.com/NQQdhkPM
>
> Looking forward to your reply, thank you.
>
> Cheers.
>

Re: Unable to migrate VM to another host

Posted by Indra Pramana <in...@sg.or.id>.
Hi Prasanna,

Good day to you, and thank you for your e-mail.

On Mon, Jul 22, 2013 at 9:54 PM, Prasanna Santhanam <ts...@apache.org> wrote:

> On Mon, Jul 22, 2013 at 08:25:11PM +0800, Indra Pramana wrote:
> > Dear Prasanna and all,
> >
> > In addition, earlier I have tried to force-connect the hypervisor host
> when
> > it was on disconnected mode. However, the cloud user id is still not
> being
> > created.
> >
> > Looking forward to your reply, thank you.
>
> please share the /var/log/cloudstack/agent/setupAgent.log via a
> pastebin.
>

There's no setupAgent.log file under /var/log/cloudstack/agent directory.
There's setup.log file, though. However, the file was last updated on 18
July 2013. The content is inside this pastebin:

http://pastebin.com/NQQdhkPM

Looking forward to your reply, thank you.

Cheers.

Re: Unable to migrate VM to another host

Posted by Prasanna Santhanam <ts...@apache.org>.
On Mon, Jul 22, 2013 at 08:25:11PM +0800, Indra Pramana wrote:
> Dear Prasanna and all,
> 
> In addition, earlier I have tried to force-connect the hypervisor host when
> it was on disconnected mode. However, the cloud user id is still not being
> created.
> 
> Looking forward to your reply, thank you.

please share the /var/log/cloudstack/agent/setupAgent.log via a
pastebin.

Thanks,

-- 
Prasanna.,

------------------------
Powered by BigRock.com


Re: Unable to migrate VM to another host

Posted by Indra Pramana <in...@sg.or.id>.
Dear Prasanna and all,

In addition, earlier I have tried to force-connect the hypervisor host when
it was on disconnected mode. However, the cloud user id is still not being
created.

Looking forward to your reply, thank you.

Cheers.



On Mon, Jul 22, 2013 at 3:37 PM, Indra Pramana <in...@sg.or.id> wrote:

> Hi Prasanna,
>
> Good day to you, and thank you for your e-mail.
>
> On Mon, Jul 22, 2013 at 3:15 PM, Prasanna Santhanam <ts...@apache.org>wrote:
>
>> On Mon, Jul 22, 2013 at 02:59:41PM +0800, Indra Pramana wrote:
>> >
>> > Could this be the reason? What can I do, shall I adduser cloud
>> manually? It
>> > seems that the user wasn't added in the first place when I installed the
>> > cloudstack-agent package on this host.
>> >
>>
>> The second host hasn't connected to cloudstack successfully in that
>> case. Ensure that the service cloudstack-agent is running on the host
>> you migrate the VM to. It will connect with the cloudstack management
>> server. You could try a force-reconnect (in the Host UI dialog) to
>> try and recreate the cloud user on this host.
>>
>
> I can confirm that the host is already connected to CloudStack
> successfully. It can host the guest VMs. The service cloudstack-agent is
> also running on the host.
>
> root@hv-kvm-01:/home/indra# id cloud
>
> id: cloud: No such user
>
> root@hv-kvm-01:/home/indra# service cloudstack-agent status
>  * cloud-agent is running
>
> root@hv-kvm-01:~# virsh list
>  Id    Name                           State
> ----------------------------------------------------
>  2     r-271-VM                       running
>  3     s-260-VM                       running
>  4     v-261-VM                       running
>  5     i-2-276-VM                     running
>  6     i-2-275-VM                     running
>
> I have also tried to remove the host and re-add the host into CloudStack.
> It works and the host can serve as hypervisor nicely, but the cloud user id
> is still not get created. Please advise.
>
> Looking forward to your reply, thank you.
>
> Cheers.
>

Re: Unable to migrate VM to another host

Posted by Indra Pramana <in...@sg.or.id>.
Hi Prasanna,

Good day to you, and thank you for your e-mail.

On Mon, Jul 22, 2013 at 3:15 PM, Prasanna Santhanam <ts...@apache.org> wrote:

> On Mon, Jul 22, 2013 at 02:59:41PM +0800, Indra Pramana wrote:
> >
> > Could this be the reason? What can I do, shall I adduser cloud manually?
> It
> > seems that the user wasn't added in the first place when I installed the
> > cloudstack-agent package on this host.
> >
>
> The second host hasn't connected to cloudstack successfully in that
> case. Ensure that the service cloudstack-agent is running on the host
> you migrate the VM to. It will connect with the cloudstack management
> server. You could try a force-reconnect (in the Host UI dialog) to
> try and recreate the cloud user on this host.
>

I can confirm that the host is already connected to CloudStack
successfully. It can host the guest VMs. The service cloudstack-agent is
also running on the host.

root@hv-kvm-01:/home/indra# id cloud
id: cloud: No such user

root@hv-kvm-01:/home/indra# service cloudstack-agent status
 * cloud-agent is running

root@hv-kvm-01:~# virsh list
 Id    Name                           State
----------------------------------------------------
 2     r-271-VM                       running
 3     s-260-VM                       running
 4     v-261-VM                       running
 5     i-2-276-VM                     running
 6     i-2-275-VM                     running

I have also tried to remove the host and re-add the host into CloudStack.
It works and the host can serve as hypervisor nicely, but the cloud user id
is still not get created. Please advise.

Looking forward to your reply, thank you.

Cheers.

Re: Unable to migrate VM to another host

Posted by Prasanna Santhanam <ts...@apache.org>.
On Mon, Jul 22, 2013 at 02:59:41PM +0800, Indra Pramana wrote:
> 
> Could this be the reason? What can I do, shall I adduser cloud manually? It
> seems that the user wasn't added in the first place when I installed the
> cloudstack-agent package on this host.
> 

The second host hasn't connected to cloudstack successfully in that
case. Ensure that the service cloudstack-agent is running on the host
you migrate the VM to. It will connect with the cloudstack management
server. You could try a force-reconnect (in the Host UI dialog) to
try and recreate the cloud user on this host.

-- 
Prasanna.,

------------------------
Powered by BigRock.com


Re: Unable to migrate VM to another host

Posted by Indra Pramana <in...@sg.or.id>.
Hi Prasanna,

Good day to you, and thank you for your e-mail.


On Mon, Jul 22, 2013 at 2:44 PM, Prasanna Santhanam <ts...@apache.org> wrote:

> On Mon, Jul 22, 2013 at 02:35:58PM +0800, Indra Pramana wrote:
> > Dear all,
> >
> > Good day to you.
> >
> > I am using CloudStack 4.1.0 and I just realised that I am not able to
> > migrate a VM to another host. CloudStack GUI gives a "Failed to migrate
> vm"
> > error message, and management-server.log file shows this:
> >
> > http://pastebin.com/Ah9XDRha
> >
> > Based on the error message, the issue seems to be related to libvirt:
> >
> > http://wiki.libvirt.org/page/Failed_to_connect_to_the_hypervisor
> >
> > ===
> > 2013-07-22 14:06:16,744 ERROR [cloud.vm.VirtualMachineManagerImpl]
> > (Job-Executor-35:job-553) Unable to migrate due to End of file while
> > reading data: Input/output error
> > ===
> >
> > Seems the error is related to the KVM host not able to connect to the
> other
> > host. But I tested manually and I can connect to the other hypervisor:
> >
> > root@hv-kvm-01:~# virsh --connect qemu+ssh://root@10.237.x.xx/system
> list
> >  Id    Name                           State
> > ----------------------------------------------------
> >
> > I have copied the SSH keys between hosts so that one host can SSH into
> > another host without password. I also have added the root user into the
> > libvirtd group.
> >
> > usermod -G libvirtd -a root
>
> What's the output of
> $ id cloud
>

This is the output on hv-kvm-02:

root@hv-kvm-02:~# id cloud
uid=111(cloud) gid=117(cloud) groups=117(cloud)

I have added the cloud user into the libvirtd group:

usermod -G libvirtd -a cloud

On hv-kvm-01, the 'cloud' user doesn't exist:

root@hv-kvm-01:~# id cloud
id: cloud: No such user

Could this be the reason? What can I do, shall I adduser cloud manually? It
seems that the user wasn't added in the first place when I installed the
cloudstack-agent package on this host.

Looking forward to your reply, thank you.

Cheers.




> The commands that cloudstack executes on the KVM host are in the
> cloud:cloud user:group.
>
> >
> > However the problem still persists. Not too sure whether I am following
> the
> > right lead. Anyone might have encounter this problem and know how to
> > resolve the problem?
> >
> > Looking forward to your reply, thank you.
> >
> > Cheers.
>
> --
> Prasanna.,
>
> ------------------------
> Powered by BigRock.com
>
>

Re: Unable to migrate VM to another host

Posted by Prasanna Santhanam <ts...@apache.org>.
On Mon, Jul 22, 2013 at 02:35:58PM +0800, Indra Pramana wrote:
> Dear all,
> 
> Good day to you.
> 
> I am using CloudStack 4.1.0 and I just realised that I am not able to
> migrate a VM to another host. CloudStack GUI gives a "Failed to migrate vm"
> error message, and management-server.log file shows this:
> 
> http://pastebin.com/Ah9XDRha
> 
> Based on the error message, the issue seems to be related to libvirt:
> 
> http://wiki.libvirt.org/page/Failed_to_connect_to_the_hypervisor
> 
> ===
> 2013-07-22 14:06:16,744 ERROR [cloud.vm.VirtualMachineManagerImpl]
> (Job-Executor-35:job-553) Unable to migrate due to End of file while
> reading data: Input/output error
> ===
> 
> Seems the error is related to the KVM host not able to connect to the other
> host. But I tested manually and I can connect to the other hypervisor:
> 
> root@hv-kvm-01:~# virsh --connect qemu+ssh://root@10.237.x.xx/system list
>  Id    Name                           State
> ----------------------------------------------------
> 
> I have copied the SSH keys between hosts so that one host can SSH into
> another host without password. I also have added the root user into the
> libvirtd group.
> 
> usermod -G libvirtd -a root

What's the output of
$ id cloud

The commands that cloudstack executes on the KVM host are in the
cloud:cloud user:group.

> 
> However the problem still persists. Not too sure whether I am following the
> right lead. Anyone might have encounter this problem and know how to
> resolve the problem?
> 
> Looking forward to your reply, thank you.
> 
> Cheers.

-- 
Prasanna.,

------------------------
Powered by BigRock.com