跑 ArchiveTeam Warrior

Archive Team 是一個致力於保存數位資料的組織,而 ArchiveTeam Warrior 則是他們提供的軟體,可以讓你很方便直接跑 worker 加入他們的 cluster,幫忙抓資料並且保存到 Internet Archive 上。

他們提供三種方法跑 ArchiveTeam Warrior,第一種是 VM 的方式,文件裡面有介紹怎麼用 VirtualBox 或是 VMware Player 跑起來。

第二種與第三種都是 container 類的方式,DockerPodman 都能跑起來。

跑起來後可以連進 http://127.0.0.1:8001/,然後選擇想要加入的項目,或是接受指令選擇目前團隊主打的項目。

在「Projects」這頁可以看到目前主力是備份 Enjin 上的資料。

丟了兩台 VPS 的機器上去用 Docker 跑,CPU 使用率看起來很低,但網路流量看起來會因為所在的地點而差蠻多的,一台大約是 300KB/sec 到 400KB/sec,換算後大約是 1TB/mo,另外一台則只有 1/10 的量。

VirtualBox 7.0.0 出了

LWN 看到 VirtualBox 7.0.0 出了:「VirtualBox 7.0.0 released」,其中 Changelog 可以在「Changelog-7.0」這邊翻到。

Ubuntu 下的更新還算方便,先把 VM 都關掉,移除 virtualbox-6.1 後再裝 virtualbox-7.0,然後把 VM 開起來看看有沒有什麼問題。

在 Changelog 裡面看到這個,這些 3D support 不知道有支援到什麼程度:

Devices: Implemented new 3D support based on DirectX 11 (and DXVK on non Windows hosts)

我把 Enable 3D Acceleration 的選項打開後變成只能跑 1600x1200,本來 1920x1200 不能跑,所以只好又關掉...

另外是支援了 virtual TPM 可以掛進去:

Devices: Added virtual TPM 1.2 and 2.0 devices

然後以前 USB 裝置的支援是 proprietary software,現在放到 open source 版本裡面了:

Devices: The EHCI and XHCI USB controller devices are now part of the open source base package

目前用起來沒什麼大問題,繼續觀察看看。

VirtualBox 裡面跑 OS/2 的指引

在「OS/2 on Virtualbox guide」這邊看到在 VirtualBox 上裝 OS/2 的指引,引用的文章在「OS/2 on Virtualbox Guide」這邊。

讓人懷古的東西...

另外文章的作者有提到,有試著在實體機器與其他的 VM 環境裝 (這邊提到了 QEMU),不過結果不太行:

Note: On real hardware, or on other VM platforms, I have found OS/2 to be extremely fragile. When I installed it on my real P1 and P3 Dell machines, I had to reboot multiple times during the setup and driver install processes due to hangs, and I had a ton of issues with random errors on boot.

I also tried all this on QEMU 4.2.0 and had very similar problems, and I had developed some very negative opinions about OS/2's reliability before I switched to Virtualbox and found that it was actually quite solid and the installs went very smoothly.

主要還是有趣吧...

把 Docker Image 轉成 VM Image

看到「ottomatica/slim」這個專案:

slim will build a micro-vm from a Dockerfile. Slim works by building and extracting a rootfs from a Dockerfile, and then merging that filesystem with a small minimal kernel that runs in RAM.

This results in a real VM that can boot instantly, while using very limited resources. If done properly, slim can allow you to design and build immutable unikernels for running services, or build tiny and embedded development environments.

從 screenshot 可以看到會產生 ISO Image:

產生的 ISO Image 可以透過 HyperKit (在 macOS 時) 或是 VirtualBox 跑起來。

實際用途不知道多大,算是一種嘗試?

VirtualBox 5.2 的 0day 爆破...

Hacker News Daily 上看到「VirtualBox E1000 Guest-to-Host Escape」這篇,講 VirtualBox 5.2 的機器上 E1000 + NAT 模式的爆破... 另外在 Hacker News 上的討論也提到了很多這樣做的背景:「VirtualBox E1000 Guest-to-Host Escape | Hacker News」。

Oracle 對社群的態度 (無論是 open source community 或是 security community) 都一直是社群很不爽的事情。

這次爆破的發現人之前找到一個 VirtualBox 的 security bug (參考「SSD Advisory – VirtualBox VRDP Guest-to-Host Escape」),回報後先是回應他們在處理中,然後被發現 VirtualBox 在 5.2.18 修掉了,但是完全沒有提到安全性問題的事情。所以這次作者也懶得囉唆了,找到就 full disclosure 出來。

作者給的 workaround 有兩個,優先建議暫時先用 PCnet 系列的界面,如果不行的話,至少不要用 NAT。

作者發表後沒多久馬上就有 5.2.22 推出,不過看 changelog 應該是沒有修正這個問題?(或是修掉又沒提...)

玩 ReactOS 0.4.7

ReactOS 是個 Open Source 的作業系統,目標是建立一個相容於 Windows 的環境。剛剛看到 ReactOS 0.4.7 釋出的消息,抓下來用虛擬機玩一下,看看目前的進展如何:「ReactOS 0.4.7 released!」。

現在可以比較輕鬆的在 VirtualBox 上安裝 ReactOS 了,雖然會需要自己改一些設定,但比以前已經簡單很多了... 可以參考「VirtualBox - ReactOS Wiki」這邊的說明,大致上有這幾點需要注意:

  • 在選擇的時候使用 Windows 2003 (32bit)。
  • 一定要掛一顆硬碟進去 (要記得確認設成 IDE 界面)。
  • 網路卡用 PCnet-FAST III。

然後在 Application Manager 把 Firefox 45 裝起來了,但是沒辦法更新到目前的 ESR 版本 52,或是目前最新版 57... 應該是還有些東西沒實做 :o

Docker 在 Mac 與 Windows 上使用 xhyve 與 Hyper-V

DockerMac OS XWindows 上開始支援其他的 VM Host 了:「Docker for Mac and Windows Beta: the simplest way to use Docker on your laptop」。

之前在 Mac OS X 與 Windows 上必須使用 VirtualBox 跑一個 Linux Host 起來,而現在可以用 xhyveHyper-V,另外剛剛發現 Linux 的部份也換到 Alpine Linux 上了 (不知道是不是這次才換的):

Faster and more reliable: no more VirtualBox! The Docker engine is running in an Alpine Linux distribution on top of an xhyve Virtual Machine on Mac OS X or on a Hyper-V VM on Windows, and that VM is managed by the Docker application. You don’t need docker-machine to run Docker for Mac and Windows.

Vagrant 1.6 將會支援 Docker

Vagrant 1.6 將會支援 Docker:「Feature Preview: Docker-Based Development Environments」。

對於 Linux 原生環境沒有問題,而對於非 Linux 環境,Vagrant 會建立一台跑 Linux 的虛擬機,然後在裡面跑 Docker,很有趣的作法 :p (反正想辦法支援)

Docker 與虛擬機的速度當然是沒辦法比較 (Docker 快太多),如果 1.6 穩定的話,應該要花不少時間來研究整合了 :p

Vagrant 1.5

Vagrant 1.5 出了:「Vagrant 1.5 and Vagrant Cloud」。

最大的亮點是前陣子就有寫「Feature Preview: Vagrant Share」的 Vagrant Share,可以讓其他人很方便的連到自己的 Vagrant 機器上。

Vagrant Cloud 則是產品面上的整合,算是社群功能?

最近拿 Vagrant 與 Docker 測試的次數愈來愈頻繁了,之前拿 Amazon EC2,但開機速度太慢,而 DigitalOcean 開機速度雖然快很多,但不是很容易透過 cli 操作...

而這兩套各有優缺點。Docker 速度快,但環境相容性沒有 Vagrant 好,另外 Vagrant 畢竟是包著 VirtualBox 這種全虛擬化環境,除了 Linux 以外也可以測其他的作業系統。

反正都是熱門的軟體,之後看社群發展出什麼功能再看要怎麼用 :p

測試 GitLab 的方式...

除了在「doc/install/installation.md」有手動安裝的方式外,在「GitLab CE Downloads」有提供 Ubuntu 12.04 LTS 64bits 的 deb 檔可以安裝。

官方在「GitLab Omnibus project」提供的安裝方式是:

apt-get install openssh-server postfix
dpkg -i ooxx.deb
gitlab-ctl reconfigure

不過在 Docker 裡面會卡在設定 redis 的部份而無法成功,卡在:

Recipe: gitlab::redis
  * user[gitlab-redis] action create (up to date)
  * directory[/var/log/gitlab/redis] action create (up to date)
  * directory[/var/opt/gitlab/redis] action create (up to date)
  * template[/var/opt/gitlab/redis/redis.conf] action create (up to date)
  * directory[/opt/gitlab/sv/redis] action create (up to date)
  * directory[/opt/gitlab/sv/redis/log] action create (up to date)
  * directory[/opt/gitlab/sv/redis/log/main] action create (up to date)
  * template[/opt/gitlab/sv/redis/run] action create (up to date)
  * template[/opt/gitlab/sv/redis/log/run] action create (up to date)
  * file[/opt/gitlab/sv/redis/down] action delete (up to date)
  * link[/opt/gitlab/init/redis] action create (up to date)
  * link[/opt/gitlab/service/redis] action create (up to date)
  * ruby_block[supervise_redis_sleep] action run

後來是用 Vagrant (跑 VirtualBox) 才測試成功。就可以看到 PostgreSQLRedis 整包都被放到 /opt 下了...

提供給要玩 GitLab 的人參考看看...