Using ARM VM to get a Image

Lets use this web page to configure make VM run a ARM system.

Set up the Environment

yum groupinstall virtualization
yum install qemu-system-arm
service libvirtd start

Download and install the arm image

cd /var/lib/libvirt/images
wget http://ftp.linux.org.uk/pub/linux/arm/fedora/qemu/zImage-versatile-2.6.24-rc7.armv5tel \
http://cdot.senecac.on.ca/arm/arm1.xml \
http://cdot.senecac.on.ca/arm/arm1.img.gz
gunzip arm1.img.gz
restorecon *
virsh define arm1.xml

Boot the arm VM

virsh start arm1

  • error: Failed to start domain arm1
    error: internal error process exited while connecting to monitor: Could not allocate dynamic translator buffer

    1. Disabled selinux
      1. copy  selinux config cp /etc/selinux/config /etc/selinux/config.bak
      2. disable it with: sed -i s/SELINUX=enforcing/SELINUX=disabled/g /etc/selinux/config
    2. Ran yum update
    3. Restart the computer

First cd in to /var/lib/libvirt/images, then
ran virsh start arm1 again, it worked "Domain arm1 started"
virt-viewer arm1 allowed me to boot up the arm-image.

dhclient eth1

Could not get IP address.

Even the static IP address with the correct route was not able to ping the host computer.

Setup Networking

Execute the following to ensure that TUN/TAP network is enabled. grep CONFIG_TUN= /boot/config-`uname -r`

Make sure that /dev/net/tun exists

yum install bridge-utils

/usr/sbin/brctl addbr br0
/sbin/ifconfig  p10p1 0.0.0.0 promisc up
/usr/sbin/brctl addif br0 p10p1
/sbin/dhclient br0
/sbin/iptables -F FORWARD

Create and execute the following script. 
#!/bin/sh
/sbin/ifconfig $1 0.0.0.0 promisc up
/usr/sbin/brctl addif br0 $1

Download a pre-built kernel image from here.

Setup Root File System

Download the latest root file system tarball.

Create a loopback device — 4GB is a reasonable size.
dd if=/dev/zero of=rootfs-f10-dev bs=1024k count=4096
Create a file system.
mkfs.ext3 rootfs-f10-dev -L rootfs

Prepare the root file-system in /mnt/ARM_FS

mount rootfs-f10-dev /mnt/ARM_FS -o loop
tar -xjf rootfs-f12.tar.bz2 -C /mnt/ARM_FS
rsync -a /mnt/ARM_FS/rootfs-f12/* /mnt/ARM_FS/
rm -rf /mnt/ARM_FS/rootfs-f12

copy your kernel modules from $TARGETDIR from the kernel build to 
/lib/modules/kernel_number ie /lib/modules/2.6.33.8

umount rootfs-f10-dev

Add the following in your /etc/exports.
/mnt/ARM_FS/ *(rw,sync,no_root_squash)

Now, restart the NFS service.

/sbin/service nfs restart

qemu-system-arm -M versatilepb -kernel zImage-qemu-versatile-3.0.8-4.fc17.armv5tel -hdc rootfs-f10-dev -append root="0800" -net nic,vlan=0 -net tap,vlan=0,ifname=tap0,script=./qemu-ifup
With the command above i got few messages, but it was able to boot up 
[root@kdayalingam arm_vm]# qemu-system-arm -M versatilepb -kernel zImage-qemu-versatile-3.0.8-4.fc17.armv5tel -hdc rootfs-f10-dev -append root="0800" -net nic,vlan=0 -net tap,vlan=0,ifname=tap0,script=./qemu-ifup
pulseaudio: set_sink_input_volume() failed
pulseaudio: Reason: Invalid argument
pulseaudio: set_sink_input_mute() failed
pulseaudio: Reason: Invalid argument

after login i set up static ip
ifconfig eth0 142.204.245.80 broadcast 142.204.245.127 netmask 255.255.255.192
ifconfig eth0 up

and then i was able to ping out to my host
ping 142.204.245.87




However, I was not able to connect tot he internt using the set up.

Will try different method from confondedtech if network cannot be set up using the above page.

Will try the something with an image obtained from the Fedora Project website.

If that does not work, Lets use this web page to make an image using the ARM VM.

The follwoing is a link to a Fedora ARM installer

Tagged , , ,

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

%d bloggers like this: