-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 04/11/2013 10:55 AM, Bernhard M. Wiedemann wrote:
Hi,
I have been working towards getting OpenStack/Folsom to work on openSUSE-12.3/ARM. First, to get it to boot a VM with LXC on x86, I had to workaround https://bugzilla.novell.com/show_bug.cgi?id=814680 but when doing this on my pandaboard, it ran into another problem, claiming "internal error cannot create rule since ebtables tool is missing." even though, the ebtables tool was there, but when running libvirtd --listen in the foreground, it printed a better hint: Failure to execute command '$EBT -t nat -L' : 'FATAL: Module ebtables not found.
coming from # CONFIG_BRIDGE_NF_EBTABLES is not set
With a recompiled kernel with ebtables-support (thanks to Dirk, it should be in the OBS ARM kernels now) I got it working! And this mail shall document how it was done: I used my PandaBoard with a 32GB SD-card (very slow, so USB-HDD is recommended) To do the setup I cloned https://github.com/SUSE-Cloud/automation and ran cloudsource=openstackfolsom bash -x automation/scripts/jenkins/qa_openstack.sh This will add the right repos and try to pull in all packages, but it errors with the cloud-compute pattern, because that one requires kvm and we don't have such a package in the 12.3 armv7l repos. So I hit Ctrl-C when I saw it, then did zypper install patterns-OpenStack-compute-node and told it to ignore kvm and install everything else anyway. Then I restarted the qa_openstack.sh call and it went through all the other downloading and setup of the OpenStack cloud on the pandaboard. In the end it imported a Debian image, which of course can not boot, because it is for i486. So I did . /etc/bash.bashrc.local to get the OpenStack environment vars needed to manage the cloud glance image-list showed the bad debian image and glance image-delete IMAGEID dropped it. LXC needs different images (a plain rootfs image) than most other methods of virtualization supported by OpenStack which need a disk image with partition table and bootloader. So I used what I had - and that was the pandaboard image. Using dd to copy out the root partition into a separate file, but I suppose you could use http://download.opensuse.org/ports/armv7hl/distribution/12.3/images/openSUSE... as well. Be sure to rmdir /selinux in the image to avoid bug 814680. I imported that image into the glance image-store with glance image-create --name=arm --is-public=True \ --property vm_mode=hvm --disk-format=raw \ --container-format=bare < rootfs.img and finally to boot this new image nova boot --image arm --flavor 1 --key_name testkey armvm you can watch it work with tail -f /var/log/nova/compute.log but as the smallest VM type still wants to reserve 512 MB this can be a bit close. Unfortunately there are no APIs to change flavor/sizes - only delete and add. The easier, but hackish way is to change it in the DB directly: su - postgres -c "psql -d nova" \d shows tables in the DB and select * from instance_types; shows the content of the table needed for this change. UPDATE instance_types SET memory_mb=256 WHERE id=1; finally halves the memory requirement. So we can delete the old VM with nova delete armvm and repeat the nova boot line from above. nova list should then show the state changing from BUILDING to Active/Running together with the VM's IP (that is not reachable from outside in this simple setup). When everything worked, ping to the VM's IP address should work and ssh root@VMIP should allow you to log in However, in my case, sshd did not start in the VM for a long time (did I mention that the SD-card was veeeery slow?), so I took an alternative entrance that is not available to all cloud users: virsh --connect lxc:/// list virsh --connect lxc:/// console instance-00000005 (press Ctrl-] to exit console) but that would not let me log in as root, before adding pts/0 to /var/lib/nova/instances/instance-00000005/rootfs/etc/securetty in the end, my VMs processes could be seen from the outside # pstree | grep -A7 lxc |-libvirt_lxc---systemd-+-cron | |-dbus-daemon | |-dhcpcd | |-login---bash | |-rsyslogd---4*[{rsyslogd}] | |-sshd | |-systemd-journal | `-systemd-logind and ssh'ing to it worked just fine as well. When you look at http://download.opensuse.org/repositories/Cloud:/OpenStack:/Folsom/openSUSE_... you might wonder how that can work without building for ARM. However, all of OpenStack is written in python, packaged as noarch and our (SUSE's) Cloud team pushed all missing dependencies into openSUSE-Factory before it became 12.3. So this is how you can have a lot of fun playing with Clouds Ciao Bernhard M. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iEYEARECAAYFAlFnwYYACgkQSTYLOx37oWRzLACdEA0wNHNdBJt/serAKFKfP54l /KoAnixLn2DJrJhgAOvQlwvVdkpbyidl =jo1w -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse-arm+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-arm+owner@opensuse.org