You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cloudstack.apache.org by Mercado <cm...@g2khosting.com> on 2024/05/02 21:16:54 UTC

Raspberry Pi as host in CloudStack

Hi everyone.

I have a CloudStack 4.17 cluster x86_64 using KVM/QEMU as a hypervisor. 
I've been exploring the possibility of using a Raspberry Pi as a host, 
as an alternative to conventional servers. Following the steps of this 
tutorial [https://rohityadav.cloud/blog/cloudstack-arm64-kvm], I managed 
to integrate the Raspberry Pi as a host in CloudStack and was able to 
create a VM using an arm64 template. However, the issue arises when 
attempting to create an x86_64 VM, where log indicates that QEMU doesn't 
support KVM. I've been able to mount x86_64 VMs using only QEMU, 
suggesting that the issue might be related to the CloudStack agent on 
the Raspberry Pi host.

I would greatly appreciate any additional guidance on how to address 
this matter and if anyone has had similar experiences when attempting to 
virtualize x86_64 in a CloudStack environment using KVM/QEMU and 
Raspberry Pi as a host.

Environment:

     - Cloudstack: 4.17.2.0

     Raspberry Pi 5
     - OS: Ubuntu 22.04.4 LTS (Jammy Jellyfish)
     - QEMU emulator version 6.2.0 (Debian 1:6.2+dfsg-2ubuntu6.19)

Log:
2024-04-30 18:04:20,394 WARN 
[resource.wrapper.LibvirtStartCommandWrapper] 
(agentRequest-Handler-4:null) (logid:abe7bdb2) LibvirtException
org.libvirt.LibvirtException: unsupported configuration: Emulator 
'/usr/bin/qemu-system-x86_64' does not support virt type 'kvm'
     at org.libvirt.ErrorHandler.processError(Unknown Source)
     at org.libvirt.ErrorHandler.processError(Unknown Source)
     at org.libvirt.Connect.domainCreateXML(Unknown Source)
     at 
com.cloud.hypervisor.kvm.resource.LibvirtComputingResource.startVM(LibvirtComputingResource.java:1799)
     at 
com.cloud.hypervisor.kvm.resource.wrapper.LibvirtStartCommandWrapper.execute(LibvirtStartCommandWrapper.java:89)
     at 
com.cloud.hypervisor.kvm.resource.wrapper.LibvirtStartCommandWrapper.execute(LibvirtStartCommandWrapper.java:49)
     at 
com.cloud.hypervisor.kvm.resource.wrapper.LibvirtRequestWrapper.execute(LibvirtRequestWrapper.java:78)
     at 
com.cloud.hypervisor.kvm.resource.LibvirtComputingResource.executeRequest(LibvirtComputingResource.java:1831)
     at com.cloud.agent.Agent.processRequest(Agent.java:660)
     at com.cloud.agent.Agent$AgentRequestHandler.doTask(Agent.java:1080)
     at com.cloud.utils.nio.Task.call(Task.java:83)
     at com.cloud.utils.nio.Task.call(Task.java:29)
     at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
     at 
java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
     at 
java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
     at java.base/java.lang.Thread.run(Thread.java:829)

Regards.


Re: Raspberry Pi as host in CloudStack

Posted by Rohit Yadav <ro...@shapeblue.com>.
Hi Mercado,

If I read it right, you're trying to run x86 VM on a arm64 KVM host using CloudStack? If that's the case, yes - CloudStack doesn't support x86 VM on arm64 hosts. In fact, what CloudStack supports wrt KVM is same arch guest on the same arch host.

Trying to emulate x86 on arm64 will be super slow and I think current arm64 processors may not support that (or for full virtualisation).


Regards.

 


________________________________
From: Mercado <cm...@g2khosting.com>
Sent: Friday, May 3, 2024 02:46
To: users@cloudstack.apache.org <us...@cloudstack.apache.org>
Subject: Raspberry Pi as host in CloudStack

Hi everyone.

I have a CloudStack 4.17 cluster x86_64 using KVM/QEMU as a hypervisor.
I've been exploring the possibility of using a Raspberry Pi as a host,
as an alternative to conventional servers. Following the steps of this
tutorial [https://rohityadav.cloud/blog/cloudstack-arm64-kvm], I managed
to integrate the Raspberry Pi as a host in CloudStack and was able to
create a VM using an arm64 template. However, the issue arises when
attempting to create an x86_64 VM, where log indicates that QEMU doesn't
support KVM. I've been able to mount x86_64 VMs using only QEMU,
suggesting that the issue might be related to the CloudStack agent on
the Raspberry Pi host.

I would greatly appreciate any additional guidance on how to address
this matter and if anyone has had similar experiences when attempting to
virtualize x86_64 in a CloudStack environment using KVM/QEMU and
Raspberry Pi as a host.

Environment:

     - Cloudstack: 4.17.2.0

     Raspberry Pi 5
     - OS: Ubuntu 22.04.4 LTS (Jammy Jellyfish)
     - QEMU emulator version 6.2.0 (Debian 1:6.2+dfsg-2ubuntu6.19)

Log:
2024-04-30 18:04:20,394 WARN
[resource.wrapper.LibvirtStartCommandWrapper]
(agentRequest-Handler-4:null) (logid:abe7bdb2) LibvirtException
org.libvirt.LibvirtException: unsupported configuration: Emulator
'/usr/bin/qemu-system-x86_64' does not support virt type 'kvm'
     at org.libvirt.ErrorHandler.processError(Unknown Source)
     at org.libvirt.ErrorHandler.processError(Unknown Source)
     at org.libvirt.Connect.domainCreateXML(Unknown Source)
     at
com.cloud.hypervisor.kvm.resource.LibvirtComputingResource.startVM(LibvirtComputingResource.java:1799)
     at
com.cloud.hypervisor.kvm.resource.wrapper.LibvirtStartCommandWrapper.execute(LibvirtStartCommandWrapper.java:89)
     at
com.cloud.hypervisor.kvm.resource.wrapper.LibvirtStartCommandWrapper.execute(LibvirtStartCommandWrapper.java:49)
     at
com.cloud.hypervisor.kvm.resource.wrapper.LibvirtRequestWrapper.execute(LibvirtRequestWrapper.java:78)
     at
com.cloud.hypervisor.kvm.resource.LibvirtComputingResource.executeRequest(LibvirtComputingResource.java:1831)
     at com.cloud.agent.Agent.processRequest(Agent.java:660)
     at com.cloud.agent.Agent$AgentRequestHandler.doTask(Agent.java:1080)
     at com.cloud.utils.nio.Task.call(Task.java:83)
     at com.cloud.utils.nio.Task.call(Task.java:29)
     at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
     at
java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
     at
java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
     at java.base/java.lang.Thread.run(Thread.java:829)

Regards.


Re: Raspberry Pi as host in CloudStack

Posted by Alex K <ri...@gmail.com>.
On Fri, 3 May 2024 at 12:17 AM, Mercado <cm...@g2khosting.com> wrote:

> Hi everyone.
>
> I have a CloudStack 4.17 cluster x86_64 using KVM/QEMU as a hypervisor.
> I've been exploring the possibility of using a Raspberry Pi as a host,
> as an alternative to conventional servers. Following the steps of this
> tutorial [https://rohityadav.cloud/blog/cloudstack-arm64-kvm], I managed
> to integrate the Raspberry Pi as a host in CloudStack and was able to
> create a VM using an arm64 template. However, the issue arises when
> attempting to create an x86_64 VM, where log indicates that QEMU doesn't
> support KVM. I've been able to mount x86_64 VMs using only QEMU,
> suggesting that the issue might be related to the CloudStack agent on
> the Raspberry Pi host.
>
> I would greatly appreciate any additional guidance on how to address
> this matter and if anyone has had similar experiences when attempting to
> virtualize x86_64 in a CloudStack environment using KVM/QEMU and
> Raspberry Pi as a host.
>
> Environment:
>
>      - Cloudstack: 4.17.2.0
>
>      Raspberry Pi 5
>      - OS: Ubuntu 22.04.4 LTS (Jammy Jellyfish)
>      - QEMU emulator version 6.2.0 (Debian 1:6.2+dfsg-2ubuntu6.19)
>
> Log:
> 2024-04-30 18:04:20,394 WARN
> [resource.wrapper.LibvirtStartCommandWrapper]
> (agentRequest-Handler-4:null) (logid:abe7bdb2) LibvirtException
> org.libvirt.LibvirtException: unsupported configuration: Emulator
> '/usr/bin/qemu-system-x86_64' does not support virt type 'kvm'

most probably the cpu does not support virtualization. Make sure to check
the cpu flags.

>
>      at org.libvirt.ErrorHandler.processError(Unknown Source)
>      at org.libvirt.ErrorHandler.processError(Unknown Source)
>      at org.libvirt.Connect.domainCreateXML(Unknown Source)
>      at
>
> com.cloud.hypervisor.kvm.resource.LibvirtComputingResource.startVM(LibvirtComputingResource.java:1799)
>      at
>
> com.cloud.hypervisor.kvm.resource.wrapper.LibvirtStartCommandWrapper.execute(LibvirtStartCommandWrapper.java:89)
>      at
>
> com.cloud.hypervisor.kvm.resource.wrapper.LibvirtStartCommandWrapper.execute(LibvirtStartCommandWrapper.java:49)
>      at
>
> com.cloud.hypervisor.kvm.resource.wrapper.LibvirtRequestWrapper.execute(LibvirtRequestWrapper.java:78)
>      at
>
> com.cloud.hypervisor.kvm.resource.LibvirtComputingResource.executeRequest(LibvirtComputingResource.java:1831)
>      at com.cloud.agent.Agent.processRequest(Agent.java:660)
>      at com.cloud.agent.Agent$AgentRequestHandler.doTask(Agent.java:1080)
>      at com.cloud.utils.nio.Task.call(Task.java:83)
>      at com.cloud.utils.nio.Task.call(Task.java:29)
>      at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
>      at
>
> java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
>      at
>
> java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
>      at java.base/java.lang.Thread.run(Thread.java:829)
>
> Regards.
>
>