This service will be undergoing maintenance at 00:00 UTC, 2016-08-01. It is expected to last about 1 hours
Bug 884643 - ARMv6l host support (running libvirt + lxc on Raspberry Pi device)
ARMv6l host support (running libvirt + lxc on Raspberry Pi device)
Status: CLOSED CURRENTRELEASE
Product: Virtualization Tools
Classification: Community
Component: libvirt (Show other bugs)
unspecified
arm Unspecified
unspecified Severity high
: ---
: ---
Assigned To: Libvirt Maintainers
:
Depends On:
Blocks: LibvirtNonX86
  Show dependency treegraph
 
Reported: 2012-12-06 08:32 EST by Richard
Modified: 2016-03-23 20:09 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-03-23 20:09:57 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Richard 2012-12-06 08:32:53 EST
Hi,

There is no armv6l support in Libvirt right now. It is important for example for the Raspberry Pi devices.

The CPU topology is different, so the Libvirt fails on start.

A sample error:
cpuNodeData:244 : this function is not supported by the connection driver: cannot get node CPU data for armv6l architecture

Are you planning support armv6l?

Thanks,
Richard
Comment 1 Daniel Berrange 2012-12-06 08:46:29 EST
Can you describe your scenario in a little more detail for me. Are you trying to run a armv6l guest, on an x86 host ? Or are you trying to actually run libvirt+QEMU on a armv6l host ?  If the former, can you provide me the XML you're using for the guest.

In general we would like to ramp up our support for the ARM platform, given its increasing importance.
Comment 2 Richard 2012-12-06 08:59:44 EST
Hi, more details coming.

Device: Raspberry Pi
OP system: ArchLinux ARM, but same problem with Fedora Remix, Raspbian

I would like to manage my *LXC containers* with Libvirt on my Raspberry Pi devices.

Sample XML:
<domain type='lxc'>
  <name>vm1</name>
  <memory>200000</memory>
  <os>
    <type>exe</type>
    <init>/bin/sh</init>
  </os>
  <vcpu>1</vcpu>
  <clock offset='utc'/>
  <on_poweroff>destroy</on_poweroff>
  <on_reboot>restart</on_reboot>
  <on_crash>destroy</on_crash>
  <devices>
    <emulator>/usr/lib/libvirt/libvirt_lxc</emulator>
    <console type='pty' />
  </devices>
</domain>


First problem after installing and setting up default connection URI for lxc:///.

define is fine, no errors.

Attempt to start:
[root@alarmpi libvirt]# virsh start vm1
error: Failed to start domain vm1
error: internal error guest failed to start: 1970-01-02 02:51:07.679+0000: 29182: info : libvirt version: 1.0.0
1970-01-02 02:51:07.679+0000: 29182: error : virNodeGetCpuValue:106 : cannot open /sys/devices/system/cpu/cpu0/topology/physical_package_id: No such file or directory
1970-01-02 02:51:07.680+0000: 29182: error : virNodeGetCpuValue:106 : cannot open /sys/devices/system/cpu/cpu0/topology/physical_package_id: No such file or directory
1970-01-02 02:51:07.680+0000: 29182: error : virNodeParseNode:290 : internal error CPU socket topology has changed

And here is the problem: my device doesn't have anything there.

It has the following:

[root@alarmpi cpu]# tree /sys/devices/system/cpu/
/sys/devices/system/cpu/
├── cpu0
│   ├── cpufreq
│   │   ├── affected_cpus
│   │   ├── cpuinfo_cur_freq
│   │   ├── cpuinfo_max_freq
│   │   ├── cpuinfo_min_freq
│   │   ├── cpuinfo_transition_latency
│   │   ├── related_cpus
│   │   ├── scaling_available_governors
│   │   ├── scaling_cur_freq
│   │   ├── scaling_driver
│   │   ├── scaling_governor
│   │   ├── scaling_max_freq
│   │   ├── scaling_min_freq
│   │   └── scaling_setspeed
│   └── crash_notes
├── cpufreq
│   └── ondemand
│       ├── ignore_nice_load
│       ├── io_is_busy
│       ├── powersave_bias
│       ├── sampling_down_factor
│       ├── sampling_rate
│       ├── sampling_rate_min
│       └── up_threshold
├── cpuidle
│   ├── current_driver
│   └── current_governor_ro
├── kernel_max
├── offline
├── online
├── possible
└── present

5 directories, 28 files

The CPU info:
[root@alarmpi cpu]# cat /proc/cpuinfo 
Processor	: ARMv6-compatible processor rev 7 (v6l)
BogoMIPS	: 697.95
Features	: swp half thumb fastmult vfp edsp java tls 
CPU implementer	: 0x41
CPU architecture: 7
CPU variant	: 0x0
CPU part	: 0xb76
CPU revision	: 7

Hardware	: BCM2708
Revision	: 0003
Serial		: 000000006dd34dac

I have tried several versions of Libvirt with no success.

Thanks
Comment 3 Daniel Berrange 2012-12-06 09:06:33 EST
Thanks, that is all useful information. Can you tell me if 'virsh -c lxc:/// capabilities' works, and if so, paste the output here.  I have a ARM CHromeBook which I'll try to reproduce your problem on
Comment 4 Richard 2012-12-06 09:09:00 EST
Hi,

[root@alarmpi ~]# virsh -c lxc:/// capabilities
<capabilities>

  <host>
    <uuid>2500ab66-d2bf-251e-271b-991ad8a85868</uuid>
    <cpu>
      <arch>armv6l</arch>
    </cpu>
    <power_management/>
  </host>

  <guest>
    <os_type>exe</os_type>
    <arch name='armv6l'>
      <wordsize>32</wordsize>
      <emulator>/usr/lib/libvirt/libvirt_lxc</emulator>
      <domain type='lxc'>
      </domain>
    </arch>
  </guest>

</capabilities>

Thanks
Comment 5 Daniel Berrange 2013-04-03 15:34:52 EDT
A couple of relevant patches I've sent

https://www.redhat.com/archives/libvir-list/2013-April/msg00304.html
https://www.redhat.com/archives/libvir-list/2013-April/msg00303.html

I've not been able to confirm whether there are further bugs yet because my chromebook kernel annoyingly lacks cgroups support.
Comment 6 Cole Robinson 2016-03-23 20:09:57 EDT
commit 9c29c52c5a8e5d6999c11deee1946ec90de59d84
Author: Daniel P. Berrange <berrange@redhat.com>
Date:   Wed Apr 3 19:58:27 2013 +0100

    Add armv6l architecture to list of valid arches

Note You need to log in before you can comment on or make changes to this bug.