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?

setup Ubuntu 22.04 as vagrant Host OS

Posted at

TL;DR

  • install Ubuntu 22.04 (Host OS)
  • install AMD Radeon Graphics Driver (for Ryzen 9 9900X)
  • install VirtualBox
  • vagrant install
  • add Rocky Linux 9 (Guest OS)

Hardware

  • CPU:Ryzen 9 9900X (ZEN 5 Gen.)
  • M/B:Gigabyte B650E AORUS ELITE X AX ICE
  • GPU: None (AMD Radeon Graphics with CPU)

install Ubuntu 22.04 (Host OS)

Desktop imageを取得してインストール実行した。

apt update

sudo su -
apt update
apt list --upgradable
apt upgrade

firewalld

ufw status

→inactive

ip addr

→今回はホストOSに向けた同一スイッチからのSSH接続用に開けるので、enp7s0のinetをメモする

SSHとHTTPだけ開けておく場合はこんな感じ

ufw enable

ufw default deny
ufw allow from 192.168.1.0/24 to any port 22
ufw allow from 192.168.1.0/24 to any port 80

ufw reload

openssh

apt install openssh-server

install AMD Radeon Graphics Driver (for Ryzen 9 9900X)

wget https://repo.radeon.com/amdgpu-install/6.1.3/ubuntu/jammy/amdgpu-install_6.1.60103-1_all.deb
dpkg -i ./amdgpu-install_6.1.60103-1_all.deb

VirtualBox

prepare

apt install build-essential
apt install gcc-12

gcc-12を入れるのはエラー回避のため

install

ダウンロードページ

wget https://download.virtualbox.org/virtualbox/7.0.20/virtualbox-7.0_7.0.20-163906~Ubuntu~jammy_amd64.deb
apt install ./virtualbox-7.0_7.0.20-163906~Ubuntu~jammy_amd64.deb
/sbin/vboxconfig

vagrant

install

wget -O- https://apt.releases.hashicorp.com/gpg | sudo gpg --dearmor -o /usr/share/keyrings/hashicorp-archive-keyring.gpg
echo "deb [signed-by=/usr/share/keyrings/hashicorp-archive-keyring.gpg] https://apt.releases.hashicorp.com $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/hashicorp.list
sudo apt update && sudo apt install vagrant

rocky linux 9 VM

mkdir -p vms/rocky9
cd vms/rocky9
vagrant box add bento/rockylinux-9

vagrant init bento/rockylinux-9 --box-version 202407.23.0
vagrant up
vagrant ssh
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?