레이블이 qemu인 게시물을 표시합니다. 모든 게시물 표시
레이블이 qemu인 게시물을 표시합니다. 모든 게시물 표시

2022년 4월 25일 월요일

Apple M1 pro , QEMU에서 amd64 / arm64 Linux 실행 비교

## Prerequisites

시작하기 전에 qemu 및 utm을 설치하십시오. 후자는 필요하지 않지만 편리하게 사용할 수 있습니다. Homebrew를 설치했다고 가정합니다.

> $ brew install qemu utm


## VM 설정

utm을 시작하고 "새 VM 만들기"를 원하는 이름으로 지정합니다.

드라이브로 이동하여 최소 10GB 크기의 드라이브를 만드십시오. 그런 다음 디스크를 가져와서 선택한 배포판에서 부팅 가능한 ISO를 추가합니다.


## System 설정

아키텍처: x86_64

시스템: 표준 PC(Q35....)(q35)

메모리: 2048MB 이상(2048MB 사용)

고급 설정:

CPU: qemu64 대 Skylake-Client 대 …

CPU 코어: 4개 이상(저는 8개 사용)

Force Multicore: ✅ (이는 상당한 성능 향상을 제공합니다)


## OS 설치

ISO 이미지에서 부팅한 후 디스크에 OS를 설치합니다. 완료되면 시스템을 중지하고 드라이브에서 ISO를 제거하고 새 VM을 부팅합니다. 가지고 놀 준비가 되었습니다.


## 벤치마크

맥북 M1 pro , 32GB 램, qemu + utm

Guest system: Ubuntu 20.04 (최소 설치)

> sysbench cpu --threads=2 


## Summary

sysbench cpu --threads=2 run

  • native (macOS): ~24 Mio events per second
  • Skylake-Client (default): ~500 events per second 👎
  • qemu64-v1: ~1500 events per second
  • qemu64~1500 events per second 👍
  • qemu64 + ssse3,sse4.1,sse4.2: ~1450 events per second
  • Penryn: ~1500 events per second
  • Penryn + ssse3,sse4.1,sse4.2: ~1400 events per second
  • Haswell: ~500 events per second 👎
  • EPYC: ~1400 events per second
  • kvm64: ~1500 events per second
  • phenom: ~1400 events per second
  • Nehalem: ~1400 events per second
  • Dhyana: ~500 events per second 👎
  • Opteron_G5: — does not work
  • cortex-a72 (default): ~16200 events per second


## With Docker Or Lima

  • docker run -it --rm --platform=linux/amd64 ubuntu : ~550 events per second
  • docker run -it --rm ubuntu : (arm64) ~550 events per second ‼️
  • lima (arm64): ~20200 events per second 🤘
  • lima (x86_64): ~260 events per second
  • lima container (arm64 container in arm64 VM): ~21000 events per second 🤘
  • lima container (x86_64 container in arm64 VM): ~570 events per second


2015년 5월 29일 금요일

OpenWRT on RaspberryPI 2

OpenWRT on RasberryPI 2

build env.

  • To build SD card image using Ubuntu 14.04.2 LTS (64-bit)
I: Preparing Ubuntu:
sudo apt-get update
sudo apt-get install git-core build-essential libssl-dev
sudo apt-get install subversion mercurial
II: Download the OpenWRT with git:
git clone git://git.openwrt.org/openwrt.git
  • check created a directory 'openwrt'
III: Download and install all available "feeds":
cd openwrt
./scripts/feeds update -a
./scripts/feeds install -a
iV: Make OpenWrt
make defconfig
make prereq
make menuconfig
V: Setup Wi-Fi kernel modules
  • select your Wifi USB stick module on config windows
Vi: set component in LuCI->Collections
  • select LuCI->Collections
Vii: Save and exit
  • select save
  • select exit
Viii: build
make -j 3
  • if you have some errors. please check message it
make V=s 2>&1 | tee build.log | grep -i error
iX: make SD card
cd openwrt/bin/brcm2708
You will be find "openwrt-brcm2708-bcm2709-sdcard-vfat-ext4.img"
sudo dd if=openwrt-brcm2708-bcm2709-sdcard-vfat-ext4.img of=/dev/sdX bs=2M conv=fsync
  • sdX - put your SD card dev (sdb, sdc, ..).
X: start OpenWRT
  • Insert SD on Raspberry PI 2
  • Connect UART-USB cable
  • Insert WiPi stick
  • Connect power.

    Reference Raspberry PI2 GPIO

  • Pin#08: TXD0
  • Pin#10: RXD0
  • Pin#14: GND
Xi: setup new passwd On UART-USB console
passwd
Xii: Reboot Raspberry PI 2 On UART-USB console
reboot
Xiii: Install LuCI On UART-USB console
vi /etc/opkg.conf
  • fix opkg.conf file
opkg update
opkg install luci
opkg install luci-ssl
opkg list | grep luci-i18n-
/etc/init.d/uhttpd start
/etc/init.d/uhttpd enable
  • WiFi connect to use Access Point
mkdir /etc/wpa_supplicant
vi /etc/wpa_supplicant/wpa_supplicant.conf
  • /etc/wpa_supplicant/wpa_supplicant.conf
update_config=1
network={
        ssid="AP name"
        psk="your key"
        scan_ssid=1
        proto=WPA RSN
        key_mgmt=WPA-PSK
        group=CCMP TKIP
        pairwise=CCMP TKIP
        priority=5
}
  • Start Wi-Fi connection in background task:
wpa_supplicant -Dnl80211 -iwlan0 -c/etc/wpa_supplicant/wpa_supplicant.conf &
  • Setting resolving server in /etc/resolv.conf:
vi /etc/resolv.conf
nameserver <put your router IP here>
nameserver 8.8.8.8
  • Save file run:
route add default gw <put your router IP here>

2014년 12월 1일 월요일

OPNFV Initial Distribution

OPNFV Distribution

  • OPNFV Support mulitple distributions
    • Ubuntu
    • Redhat (CentOS)
    • Fedora
  • Initial kick start distribution
  • LTM (Long Term Evolution)

Initial Distribution selection

  • Several Project
    • OpenStack
    • ODL (Open Daylight)
    • Infra Set up language support (Puppet, Juju)
    • Plugins Availability
    • Virtual Enviroment
    • Bare metal platform support



Criteria
RHEL
CentOS
Ubuntu
Fedora
Devstack
Release
7
7
14.10
21
Latest
Installer
Packstack
Packstack
JuJu, Fuel
Packstack (RDO), DevStack
Devstack
Support
Yes
Community
Yes
Community
No
Resident Developer





Openstack Release
Juno (RDO), Icehouse (RHEL OSP)
Juno (RDO)
Juno
Icehouse (packaged), Juno (RDO)
Kilo
ODL Release



Hydrogen, Helium (not in repositories)

Installer Languages
Puppet
Puppet
Puppet
Puppet (RDO), bash (Devstack)

Plugins Availability





Ease of Development


Yes


Virtual Environment


Vagrant, Kvm, Docker, LXC etc
Qemu/kvm, Docker, lxc etc

Zero Touch including PXE Boot


Yes (JuJu/MaaS/Cobbler)


Troubleshooting Ease





Long Term Evolution


14.04


Automated Testing Framework Integration


OSTF


Kernel Version
3.10
3.10
3.14 (Realtime Patch)
3.17

Qemu version
2.0
2.0
2.0
2.1

2013년 12월 2일 월요일

QEMU 1.7.0 install on Linux OS

* Source code download

$git clone git://git.qemu-project.org/qemu.git
$cd qemu
$git submodule update --init dtc

* Configure 
$ cd qemu
$ mkdir obj
$ cd obj
$ ../configure --target-list=arm-softmmu --python=/usr/bin/python2.7

* Make
$ make
$ su
$ make install

* test qemu
$ emacs test.c
<code>
#include<stdio.h>
int main(){
    printf("Hello World\n");
}
</code>

* compile 
$ arm-none-linux-gnueabi-gcc test.c -o test
 
* check the properties of the output file
$ file test 

* execute qemu
$ qemu-system-arm -L ~/arm-none-linux-gnueabi/libc ./test