0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

ArchLinux: VirtualBox をインストール

Last updated at Posted at 2024-02-11

VirtualBox のインストール

sudo pacman -S virtualbox virtualbox-host-modules-arch  virtualbox-guest-iso

ユーザーを、グループ vboxusers に加える

sudo gpasswd -a uchida vboxusers

インストールされたバージョン
image.png

Host のネットワーク設定を変更する

これは、Guest から ping を打った時に、 次のようになる問題を解決するために行います。

$ ping -c 3 8.8.8.8
PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
64 bytes from 8.8.8.8: icmp_seq=1 ttl=57 time=14.4 ms
64 bytes from 8.8.8.8: icmp_seq=1 ttl=56 time=14.4 ms (DUP!)
64 bytes from 8.8.8.8: icmp_seq=2 ttl=57 time=13.5 ms
64 bytes from 8.8.8.8: icmp_seq=2 ttl=56 time=13.5 ms (DUP!)
64 bytes from 8.8.8.8: icmp_seq=3 ttl=57 time=13.3 ms

IP フォワードの設定の確認

$ sudo cat /proc/sys/net/ipv4/ip_forward
1

設定変更

sudo sysctl -w net.ipv4.ip_forward=0

IP フォワードの設定の確認

$ sudo cat /proc/sys/net/ipv4/ip_forward
0

Ubuntu 23.10 を VirtualBox にインストール

ISO イメージをダウンロード

ubuntu-23.10.1-desktop-amd64.iso

インストールした状態

image.png

ネットワークの設定変更

NAT を BridgedAdapter に変更する

image.png

Guest に ssh-server のインストール

sudo apt install openssh-server

Guest の ssh サーバーの起動

sudo systemctl start ssh

Guest の IP アドレスを確認

$ ip addr
(省略)
2: enp0s3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether 08:00:27:9c:83:b1 brd ff:ff:ff:ff:ff:ff
    inet 192.168.1.8/24 brd 192.168.1.255 scope global dynamic noprefixroute enp0s3
(省略)

Host から ping で確認

ping -c 3 192.168.1.8

Host から ssh 接続

ssh 192.168.1.8

Zorin 16.3 をインストール

ダウンロードした ISO

Zorin-OS-16.3-Lite-64-bit.iso

インストールした状態

image.png

ネットワークの設定変更

NAT を BridgedAdapter に変更する

image.png

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?