ç»é²æ¥: 2024-10-23 æ´æ°æ¥: 2024-10-24
åå ããXubuntu 24.04 LTSãã«ãVirtualBox 7.0.22ãã¨ãVagrant 2.4.1ããã¤ã³ã¹ãã¼ã«ãã¾ããã
-
ãVirtualBox 7.0.22ãã¨ãVagrant 2.4.1ãã®ç¢ºèªã«ã
以åã®æ稿ã§ä½¿ã£ããVagrant ã®Box ã®ãUbuntu 24.04 LTSããã²ã¹ãOSã¨ãã¦ã¤ã³ã¹ãã¼ã«ãã¾ãã:
-
GUI ã®ãã¹ã¯ããããå«ãã§ããã®ã§ã確èªã«ä½¿ãã«ã¯ã¡ããã©è¯ãã¨æãã¾ã:
GUI ãã¡ããã¨è¡¨ç¤ºãããã«ã¯è¨å®å¤æ´ãå¿ è¦ã ããè±èªã®ã¾ã¾ã ããç»é²ããããµã¼ãã¹ãå¤ãã®ã§èµ·åãé ãã®ãé£ç¹ã§ãã使ããªããæ®éã« ISO ã¤ã¡ã¼ã¸ããã¤ã³ã¹ãã¼ã«ããããã
-
ãã®åå¿é²ã§ãã
-
-
使ç¨ããPC ã¯ãæ°ããè³¼å
¥ãã ããPCãMINISFORUM NAB5ãã§ãã
ããã»ããµã¯ãCore i5-12450Hãã§ãã¡ã¢ãª 16GBãSSD 512GB ã§ãã
-
ï¼æ³¨ï¼ãªã³ã¯ãæ»ãã¨ãã¯ãã©ã¦ã¶ã®å·¦ä¸ã®ãâããã¯ãªãã¯
Android ã¹ããã§ããã°ããã¼ã ããã¿ã³é£ã®ãï¼ããã¿ãã
-
-
ç®æ¬¡
-
åèã«ãã以åã®ä½æ¥:
-
ä»åã®ä½æ¥:
-
åèã«ãªããããªä½æ¥:
ãVagrantãã«ã¦ã使ãåãå¯è½ãªãVagrantfileãã使ãå ´å:
ãä»®æ³ãã·ã³ãã®ã¦ã£ã³ãã¦ã常æ表示ã«å¤æ´ããå ´å:
-
-
-
- --- - --- - --- - --- - --- - --- - --- - --- - -
Xubuntu 24.04 LTS ã®ç«ã¡ä¸ã:
-
Xubuntuï¼ãã¹ãOSï¼ã®ãã¹ã¯ãããç»é¢:
âã·ã³ãã«ã§ã使ãæ £ããç°å¢ãªã®ã§ãå人çã«ã¯ä½¿ãåæãè¯ãã§ãã
-
ãVagrantãã§ä»®æ³ãã·ã³ã®ãubuntu-desktop-24.04ããèµ·å:
âGUI ãã¡ããã¨è¡¨ç¤ºãããã«ã¯ããä»®æ³ãã·ã³ãã®è¨å®ã®ä¿®æ£ãå¿ è¦ã§ããã
ã¡ãªã¿ã«ãããã©ã«ãã¯ãèªåãã°ã¤ã³ãããã¾ãã
ã¾ããèµ·åãããUbuntu 24.04ãã¯æ¥æ¬èªåããã¦ãã¾ããã
-
ãããã¨ãå¤ãã®ã§åå¼·ã«ãªãã¾ãã
-
-
- --- - --- - --- - --- - --- - --- - --- - --- - --
ãVirtualBoxãã«ã¤ãã¦:
-
ãVirtualBox ãã¯ãOracle ãéçºãã¦ãããä»®æ³ãã·ã³ããæ§ç¯ããããã®ã½ããã¦ã§ã¢ã§ãã
-
ãVirtalBoxãã¯ãä»®æ³çãªãã½ã³ã³ãï¼ä»®æ³ããã¤ã¹ï¼ãå®ç¾ããã½ããã¦ã§ã¢ã§ããå¥ã®ãã½ã³ã³ã«ãLinuxããã¤ã³ã¹ãã¼ã«ããã®ã¨å¤ããã¾ããã
ä»®æ³ãã·ã³ã使ããã¨ã§ããã¼ãã¦ã§ã¢ã§åé¡ã¨ãªããããªPC ã§ããææ°ã®Linux ãã£ã¹ããªãã¥ã¼ã·ã§ã³ãã¤ã³ã¹ãã¼ã«ã§ããå¯è½æ§ãé«ããªãã¾ãã
åé¡ããã£ã¦ããLinux ã®æ å ±ããã®ã¾ã¾ä½¿ããã®ãå¼·ã¿ã§ãã
-
-
- --- - --- - --- - --- - --- - --- - --- - --- - ---
ãXubuntuãã«ã¤ãã¦:
-
Ubuntu ã®å ¬å¼ãã¬ã¼ãã¼ï¼æ§æ ¼ã®éãå å¼ï¼ï¼ã§ã
Ubuntu ãã¼ã¹ã®ã軽éãªãXfceããã¹ã¯ãããç°å¢ã§ãã
å人çã«ã¯ä½¿ãæ
£ããç°å¢ã§ãã
ã«ã¹ã¿ãã¤ãºãè²ã
ã¨ã§ããã®ã§ãèªåã«ã¨ã£ã¦ä½¿ãåæã®è¯ãç°å¢ãä½ããã®ãå©ç¹ã§ãã
-
ç¾å¨ã®ãã¼ã¸ã§ã³ã表示:
--ã--ã--ã--ã--ã--ã--ã--ã--ã--ã--ã--ã--ã--ã--ã--ã--ã--ã--ã--ã--ã--ã--ã--ã
â ãã¹ãOSãXubuntu 24.04 LTSãã®ãã¼ã¸ã§ã³:
2024-10-23 ç¾å¨
ã«ã¼ãã«:
$ uname -r 6.8.0-47-generic
âå®å®å¿åãªã®ã§ãæ´æ°ã¯å°ãªãã§ã
-
ãªãªã¼ã¹:
$ cat /etc/lsb-release DISTRIB_ID=Ubuntu DISTRIB_RELEASE=24.04 DISTRIB_CODENAME=noble DISTRIB_DESCRIPTION="Ubuntu 24.04.1 LTS"
âå°ããªæ´æ°çã§ãããã¤ã³ããªãªã¼ã¹ã¯ãã»ã¼ 6ã¶æãã¨
-
ãx11ãã¨ãWaylandãã®ã©ã¡ãã§åä½ãã¦ããããã®ç¢ºèª:
$ echo $XDG_SESSION_TYPE x11
âãUbuntuãã®ããã©ã«ãã¯ããWaylandãã§åä½ãã¾ããããXubuntuãã®ããã©ã«ãã¯ããx11ãã§åä½ãã¾ãã
-
-
--ã--ã--ã--ã--ã--ã--ã--ã--ã--ã--ã--ã--ã--ã--ã--ã--ã--ã--ã--ã--ã--ã--ã--ã
â ä»®æ³ãã·ã³ãubuntu-desktop-24.04ãã®ãã¼ã¸ã§ã³:
2024-10-23 ç¾å¨
ã·ã¹ãã æ´æ°å¾:
-
ã«ã¼ãã«:
$ uname -r 6.8.0-47-generic
-
ãªãªã¼ã¹:
$ cat /etc/lsb-release DISTRIB_ID=Ubuntu DISTRIB_RELEASE=24.04 DISTRIB_CODENAME=noble DISTRIB_DESCRIPTION="Ubuntu 24.04.1 LTS"
-
ãx11ãã¨ãWaylandãã®ã©ã¡ãã§åä½ãã¦ããããã®ç¢ºèª:
$ echo $XDG_SESSION_TYPE wayland
âãUbuntuãã¯ããWaylandãã§åä½ãã¦ãã¾ãã
-
ã¡ãªã¿ã«ããã°ã¤ã³ç»é¢ã«ã¦ãå³ä¸ã®ãã¿ã³ã§ãx11ãã«åãæ¿ãã§ãã¾ã:
-
-
- --- - --- - --- - --- - --- - --- - --- - --- - ----
1. ãã£ã¹ã¯ã®ç©ºããå°ãªãã®ã§ãæ¢åã®ãä»®æ³ãã·ã³ããæ´ç:
-
åè:
ãããPC ã®ãã£ã¹ã¯ã«ä½è£ããªãå ´å:
-
1). ä¸è¦ãªãä»®æ³ãã·ã³ãã®åé¤:
確èª:
$ vagrant global-status
id name provider state directory ------------------------------------------------------------------------- 52a0b3c default virtualbox poweroff /home/ubn/ãã¦ã³ãã¼ã/vm/ubn2404 1d1783c default virtualbox poweroff /home/ubn/ãã¦ã³ãã¼ã/vm/alma
-
åé¤1:
$ vagrant destroy 52a0b3c
default: Are you sure you want to destroy the 'default' VM? [y/N] y ==> default: Destroying VM and associated drives...
-
åé¤2:
$ vagrant destroy 1d1783c
default: Are you sure you want to destroy the 'default' VM? [y/N] y ==> default: Destroying VM and associated drives...
-
確èª:
$ vagrant global-status
id name provider state directory -------------------------------------------------------------------------
-
2). ä¸è¦ãªãBoxãã®åé¤:
確èª:
$ vagrant box list
almalinux/9 (virtualbox, 9.4.20240805, (amd64)) caspermeijn/ubuntu-desktop-24.04 (virtualbox, 2024.05.08, (amd64))
-
åé¤1:
$ vagrant box remove almalinux/9
Removing box 'almalinux/9' (v9.4.20240805) with provider 'virtualbox'...
-
åé¤2:
$ vagrant box remove caspermeijn/ubuntu-desktop-24.04
Removing box 'caspermeijn/ubuntu-desktop-24.04' (v2024.05.08) with provider 'virtualbox'...
-
確èª:
$ vagrant box list
There are no installed boxes! Use `vagrant box add` to add some.
å訳:
ã¤ã³ã¹ãã¼ã«ããã¦ããããã¯ã¹ãããã¾ããã `vagrant box add` ã使ç¨ãã¦è¿½å ãã¾ãã
-
3). ä¸è¦ãªãä½æ¥ãã©ã«ããã®åé¤:
ä½æ¥ãã©ã«ãåã®ç¢ºèª:
$ ls -1 ~/ãã¦ã³ãã¼ã/vm/ : alma ubn2404
-
åé¤1:
$ rm -r ~/ãã¦ã³ãã¼ã/vm/alma
-
åé¤2:
$ rm -r ~/ãã¦ã³ãã¼ã/vm/ubn2404
-
確èª:
$ ls -1 ~/ãã¦ã³ãã¼ã/vm/ $
-
4). ä¸è¦ãªãBoxãã¤ã¡ã¼ã¸ã®åé¤:
å人çã«ä½æãããBoxãã¤ã¡ã¼ã¸ãç½®ãã¦ããå ´æã§ã:
確èª:
$ ls -1 ~/ãã¦ã³ãã¼ã/vm/box-share : ãã®ãããªãã¡ã¤ã«ããã£ã¬ã¯ããªã¯ããã¾ãã
-
-
- --- - --- - --- - --- - --- - --- - --- - --- - -----
2. ã¾ãã¯ãVagrant ã§ä½¿ããBoxããæ¤ç´¢:
-
å ¬å¼ã®Vagrant ã®ãBoxãã®å ¬éãµã¤ã:
âå ¬å¼ã®ãBoxãã¯ãVagrant cloudãã§å ¬éããã¦ãã¾ãã
ãBoxãã¤ã¡ã¼ã¸ã¯ããVagrant cloudãã«ç½®ãã¦ããå ´åã¨ãå¥ã®ãã¹ãã«ç½®ãã¦ããã®URL ãå ¬éããã¦ããå ´åãããã¾ã:
-
1). ãubuntu 24.04 desktopãã§æ¤ç´¢:
-
2). ãããããä¸ã§ããcaspermeijn/ubuntu-desktop-24.04ãã使ç¨:
-
ãVagrantfileãã¿ã:
Vagrant.configure("2") do |config| config.vm.box = "caspermeijn/ubuntu-desktop-24.04" config.vm.box_version = "2024.05.08" end
-
ãNewãã¿ã:
vagrant init caspermeijn/ubuntu-desktop-24.04 \ --box-version 2024.05.08 vagrant up
-
3). æ°ä»ããã¨ãã: ãã¦ã³ãã¼ãå®äºæã®ããã§ãã¯ãµã ã®ç¢ºèªã¡ãã»ã¼ã¸ã表示ããã¾ãã:
-
4). ä¸å®ãªããBox ã®åé¤ã¯ç°¡åãªã®ã§ããããããªBox ã試ãã¦ã¿ãã¨è¯ãã§ã:
ãBoxãã¨ãä»®æ³ãã·ã³ãã®åé¤ã®ããæ¹ã¯ã 以åã®æ稿ã®ãé çª 9-2. ã®11). ããåç §:
-
-
- --- - --- - --- - --- - --- - --- - --- - --- - ----- -
3. ãä½æ¥ç¨ãã£ã¬ã¯ããªããä½æ:
-
ä½æ:
$ mkdir -p ~/ãã¦ã³ãã¼ã/vm/ubn2404/ $ cd ~/ãã¦ã³ãã¼ã/vm/ubn2404/
-
ãã§ã«ä½¿ã£ã¦ãããã©ã«ãåã§ããã°ãå¥ã®ååã«ãã¦ãã ãã:
-
-
- --- - --- - --- - --- - --- - --- - --- - --- - ----- --
4. ãVagrantfileããä½æ:
-
GUI ã®ãã¹ã¯ãããç»é¢ã§ä½¿ãããã«è¨å®ãå¤ããªãã¾ãããã
åã«ãssh æ¥ç¶ããã¦ã³ãã³ãã§ä½¿ãã ããªãããé
çª 2.ãã®ãVagrantfileãã¿ãã®æ°è¡ã§OK:
-
ä½æ:
$ cd ~/ãã¦ã³ãã¼ã/vm/ubn2404/
$ nano Vagrantfile
â ãã¹ã¦è²¼ä»ã:
# -*- mode: ruby -*- # vi: set ft=ruby : Vagrant.configure("2") do |config| config.vm.box = "caspermeijn/ubuntu-desktop-24.04" #config.vm.box_version = "2024.05.08" config.vm.boot_timeout = 300 #config.vm.boot_timeout = 60 # ãã¹ãã®ä½æ¥ãã©ã«ãå ã® data ãã©ã«ã㨠# ä»®æ³ãã·ã³å ã® /vagrant_data ãã©ã«ããå ±æ: # æå®ã®ãã©ã«ãããªãå ´åã¯ããã©ã«ããä½æ: config.vm.synced_folder "./data", "/vagrant_data", create: true # ããã©ã«ãã®å ±æãã©ã«ããç¡å¹ã«ãã¾ã: config.vm.synced_folder ".", "/vagrant", disabled: true config.vm.provider "virtualbox" do |vb| # ä»®æ³ãã·ã³ã®èµ·åæã« VirtualBox GUI ã表示: vb.gui = true vb.memory = "2048" #vb.memory = "4096" vb.cpus = 2 vb.customize ["modifyvm", :id, "--mouse", "usbtablet"] #vb.customize ["modifyvm", :id, "--graphicscontroller", "vboxsvga"] vb.customize ["modifyvm", :id, "--graphicscontroller", "vmsvga"] vb.customize ["modifyvm", :id, "--accelerate3d", "on"] vb.customize ["modifyvm", :id, "--vram", "128"] end end
5è¡ç®ã§ã使ç¨ãããBoxããæå®ãã¦ãã¾ãããããå¤ããã°ã使ãåãã§ãã¾ãã
-
Ctrl+Oï¼å°æåã®ãªã¼ï¼ã§ããã¡ã¤ã«ã確èªãã¦Enter ã§ãä¸æ¸ãä¿å:
Ctrl+Xï¼å°æåã®ã¨ãã¯ã¹ï¼ã§ãçµäº:
-
ãã¡ã¤ã«å 容ã®ç¢ºèª:
$ cat Vagrantfile
-
-
- --- - --- - --- - --- - --- - --- - --- - --- - ----- ---
5. ãä»®æ³ãã·ã³ãã®ï¼ååã®ä½æã¨ï¼ç«ã¡ä¸ã:
-
1). ãVirtualBox ããã¼ã¸ã£ãã使ããã確èª:
ãã¼ã¸ã§ã³è¡¨ç¤ºãè¡ããã¨ã©ã¼ã®ã¡ãã»ã¼ã¸ãå«ã¾ãã¦ããªããã° OK:
$ VBoxManage --version 7.0.22r165102
-
2). ä»®æ³ãã·ã³ã®ï¼ååã®ä½æã¨ï¼ç«ã¡ä¸ã:
$ cd ~/ãã¦ã³ãã¼ã/vm/ubn2404/ $ vagrant up
Bringing machine 'default' up with 'virtualbox' provider... ==> default: Box 'caspermeijn/ubuntu-desktop-24.04' could not be found. Attempting to find and install... default: Box Provider: virtualbox default: Box Version: >= 0 ==> default: Loading metadata for box 'caspermeijn/ubuntu-desktop-24.04' default: URL: https://vagrantcloud.com/api/v2/vagrant/caspermeijn/ubuntu-desktop-24.04 ==> default: Adding box 'caspermeijn/ubuntu-desktop-24.04' (v2024.09.11) for provider: virtualbox (amd64) default: Downloading: https://vagrantcloud.com/caspermeijn/boxes/ubuntu-desktop-24.04/versions/2024.09.11/providers/virtualbox/amd64/vagrant.box ==> default: Successfully added box 'caspermeijn/ubuntu-desktop-24.04' (v2024.09.11) for 'virtualbox (amd64)'! ==> default: Importing base box 'caspermeijn/ubuntu-desktop-24.04'... ==> default: Matching MAC address for NAT networking... ==> default: Checking if box 'caspermeijn/ubuntu-desktop-24.04' version '2024.09.11' is up to date... ==> default: Setting the name of the VM: ubn2404_default_1729654345933_20608 ==> default: Clearing any previously set network interfaces... ==> default: Preparing network interfaces based on configuration... default: Adapter 1: nat ==> default: Forwarding ports... default: 22 (guest) => 2222 (host) (adapter 1) ==> default: Running 'pre-boot' VM customizations... ==> default: Booting VM... ==> default: Waiting for machine to boot. This may take a few minutes... default: SSH address: 127.0.0.1:2222 default: SSH username: vagrant default: SSH auth method: private key default: default: Vagrant insecure key detected. Vagrant will automatically replace default: this with a newly generated keypair for better security. default: default: Inserting generated public key within guest... default: Removing insecure key from the guest if it's present... default: Key inserted! Disconnecting and reconnecting using new SSH key... ==> default: Machine booted and ready! Got different reports about installed GuestAdditions version: Virtualbox on your host claims: 6.0.0 VBoxService inside the vm claims: 7.0.16 Going on, assuming VBoxService is correct...
â ãã©ã°ã¤ã³ã®æ©è½ã§ããGuestAdditionsãã®èªåæ´æ°ï¼7.0.16 â7.0.22ï¼ãè¡ããã¾ãã:
[default] GuestAdditions versions on your host (7.0.22) and guest (7.0.16) do not match. Got different reports about installed GuestAdditions version: Virtualbox on your host claims: 6.0.0 VBoxService inside the vm claims: 7.0.16 Going on, assuming VBoxService is correct... Reading package lists... Building dependency tree... Reading state information... :
â ãGuestAdditionsãã®èªåæ´æ°ã«å¿ è¦ãªããã±ã¼ã¸ãã¤ã³ã¹ãã¼ã«ããã¾ãã:
The following additional packages will be installed: dpkg-dev fakeroot g++ g++-13 g++-13-x86-64-linux-gnu g++-x86-64-linux-gnu gcc gcc-13 gcc-13-x86-64-linux-gnu gcc-14-base gcc-14-base:i386 gcc-x86-64-linux-gnu libalgorithm-diff-perl libalgorithm-diff-xs-perl libalgorithm-merge-perl libasan8 libatomic1 libatomic1:i386 libc-dev-bin libc-devtools libc6-dev libcc1-0 libcrypt-dev libdpkg-perl libfakeroot libfile-fcntllock-perl libgcc-13-dev libgcc-s1 libgcc-s1:i386 libgomp1 libgomp1:i386 libhwasan0 libitm1 liblsan0 libquadmath0 libstdc++-13-dev libstdc++6 libstdc++6:i386 libtsan2 libubsan1 linux-headers-6.8.0-44 linux-libc-dev linux-tools-common lto-disabled-list make manpages-dev rpcsvc-proto : 11 upgraded, 39 newly installed, 0 to remove and 152 not upgraded. Need to get 14.7 MB/78.6 MB of archives. : update-alternatives: using /usr/bin/fakeroot-sysv to provide /usr/bin/fakeroot (fakeroot) in auto mode Setting up linux-headers-6.8.0-44-generic (6.8.0-44.44) ... /etc/kernel/header_postinst.d/dkms: * dkms: running auto installation service for kernel 6.8.0-44-generic * dkms: autoinstall for kernel 6.8.0-44-generic ...done. : update-alternatives: using /usr/bin/g++ to provide /usr/bin/c++ (c++) in auto mode Setting up build-essential (12.10ubuntu1) ... Processing triggers for man-db (2.12.0-4build2) ... Processing triggers for libc-bin (2.39-0ubuntu8.3) ... Running kernel seems to be up-to-date.
â ãµã¼ãã¹ã®åèµ·å:
Restarting services... systemctl restart cups-browsed.service gnome-remote-desktop.service multipathd.service packagekit.service No containers need to be restarted. User sessions running outdated binaries: vagrant @ session #1: gdm-wayland-ses[2336] vagrant @ user manager service: gnome-session-b[2459], gnome-shell[2502], systemd[2279] No VM guests are running outdated hypervisor (qemu) binaries on this host. Copy iso file /usr/share/virtualbox/VBoxGuestAdditions.iso into the box /tmp/VBoxGuestAdditions.iso Mounting Virtualbox Guest Additions ISO to: /mnt mount: /mnt: WARNING: source write-protected, mounted read-only. Installing Virtualbox Guest Additions 7.0.22 - guest version is 7.0.16 Verifying archive integrity... 100% MD5 checksums are OK. All good. Uncompressing VirtualBox 7.0.22 Guest Additions for Linux 100% VirtualBox Guest Additions installer Removing installed version 7.0.16 of VirtualBox Guest Additions... update-initramfs: Generating /boot/initrd.img-6.8.0-31-generic Copying additional installer modules ... Installing additional modules ...
â ãGuestAdditionsãã®éå§:
VirtualBox Guest Additions: Starting. VirtualBox Guest Additions: Setting up modules VirtualBox Guest Additions: Building the VirtualBox Guest Additions kernel modules. This may take a while. VirtualBox Guest Additions: To build modules for other installed kernels, run VirtualBox Guest Additions: /sbin/rcvboxadd quicksetup <version> VirtualBox Guest Additions: or VirtualBox Guest Additions: /sbin/rcvboxadd quicksetup all VirtualBox Guest Additions: Building the modules for kernel 6.8.0-44-generic. update-initramfs: Generating /boot/initrd.img-6.8.0-44-generic VirtualBox Guest Additions: Running kernel modules will not be replaced until the system is restarted or 'rcvboxadd reload' triggered VirtualBox Guest Additions: reloading kernel modules and services VirtualBox Guest Additions: kernel modules and services 7.0.22 r165102 reloaded
VirtualBox Guest Additions: NOTE: you may still consider to re-login if some user session specific services (Shared Clipboard, Drag and Drop, Seamless or Guest Screen Resize) were not restarted automatically
âããã§å®äº:
ã端æ«ãã®ããã³ãããè¿ããªãã®ã¯ããã¤ãã®ãã¨ã§ãã
-
3). ã端æ«ãç»é¢ããxãã§éãã¾ãã:
âãã¦ã£ã³ãã¦ãéããã
-
4). å¥ã®ã端æ«ããèµ·åãã¦ããä»®æ³ãã·ã³ããé»æºãªã:
$ cd ~/ãã¦ã³ãã¼ã/vm/ubn2404/ $ vagrant halt ==> default: Attempting graceful shutdown of VM...
-
-
- --- - --- - --- - --- - --- - --- - --- - --- - ----- ----
6. ãä»®æ³ãã·ã³ãã®ç«ã¡ä¸ã:
-
ãä»®æ³ãã·ã³ããç«ã¡ä¸ã:
$ cd ~/ãã¦ã³ãã¼ã/vm/ubn2404/ $ vagrant up
Bringing machine 'default' up with 'virtualbox' provider... ==> default: Checking if box 'caspermeijn/ubuntu-desktop-24.04' version '2024.09.11' is up to date... ==> default: Clearing any previously set forwarded ports... ==> default: Clearing any previously set network interfaces... ==> default: Preparing network interfaces based on configuration... default: Adapter 1: nat ==> default: Forwarding ports... default: 22 (guest) => 2222 (host) (adapter 1) ==> default: Running 'pre-boot' VM customizations... ==> default: Booting VM... ==> default: Waiting for machine to boot. This may take a few minutes... default: SSH address: 127.0.0.1:2222 default: SSH username: vagrant default: SSH auth method: private key ==> default: Machine booted and ready! [default] GuestAdditions seems to be installed (7.0.22) correctly, but not running. update-initramfs: Generating /boot/initrd.img-6.8.0-44-generic
â ãGuestAdditionsãã®éå§:
VirtualBox Guest Additions: Starting. VirtualBox Guest Additions: Setting up modules VirtualBox Guest Additions: Building the VirtualBox Guest Additions kernel modules. This may take a while. VirtualBox Guest Additions: To build modules for other installed kernels, run VirtualBox Guest Additions: /sbin/rcvboxadd quicksetup <version> VirtualBox Guest Additions: or VirtualBox Guest Additions: /sbin/rcvboxadd quicksetup all VirtualBox Guest Additions: Building the modules for kernel 6.8.0-44-generic. update-initramfs: Generating /boot/initrd.img-6.8.0-44-generic Restarting VM to apply changes... ==> default: Attempting graceful shutdown of VM... ==> default: Booting VM... ==> default: Waiting for machine to boot. This may take a few minutes... ==> default: Machine booted and ready! ==> default: Checking for guest additions in VM... ==> default: Mounting shared folders... default: /vagrant_data => /home/ubn/ãã¦ã³ãã¼ã/vm/ubn2404/data ubn@ubnbox:~/ãã¦ã³ãã¼ã/vm/ubn2404$
âæ£å¸¸ã«ç«ã¡ä¸ããã¾ãã:
-
-
- --- - --- - --- - --- - --- - --- - --- - --- - ----- -----
7. ãä»®æ³ãã·ã³ãã®ç»é¢ã«ã¦ããVirtualBox Guest Additionsãã®æ©è½ãæå¹å:
-
1). ãå ±æãã©ã«ããæ©è½ã®æå¹å:
ãä»®æ³ãã·ã³ãã®ã¡ãã¥ã¼ããã®è¨å®:
ãDeviceãâãShared FoldersãâãShared Folders Settings...ãâè¨å®ç»é¢ã表示:
-
Vagrant ã§ç®¡çããå ´åã
ããã¼ã ãã«ãããä»®æ³ãã·ã³ãã®ãä½æ¥ãã©ã«ãã
ï¼~/ãã¦ã³ãã¼ã/vm/almaï¼ããããã©ã«ãã®ãå
±æãã©ã«ããã«ãªãã¾ãã
ããã ã¨ã誤ã£ã¦å¤§äºãªè¨å®ãã¡ã¤ã«ãæ¶ããã¨ãããã®ã§ã
ãVagrantfileããã¡ã¤ã«ã§ããã©ã«ããï¼~/ãã¦ã³ãã¼ã/vm/alma/dataï¼ã«å¤æ´ãã¾ãã:
-
2). ãç»é¢ã®èªåãªãµã¤ãºãæ©è½ã®æå¹å:
ãä»®æ³ãã·ã³ãã®ç»é¢ãµã¤ãºããã¦ã¹ã§åºããã ãã§ã解å度ãèªå調æ´ããã¾ã:
-
ããã©ã«ãã§æå¹ãªã®ã§ãè¨å®ã®ç¢ºèªã®ã¿:
ãViewãâãAuto-resize Guest Displyã
âè¡é ã®ãã¢ã¤ã³ã³ãã«ãã§ãã¯ãããã°ããæå¹ã
ãã¢ã¤ã³ã³ãã®ãã§ãã¯ãã¼ã¯ã®è¡¨ç¤ºã¯åããã¥ããã§ã:
-
å®éã«ã¯ããä»®æ³ãã·ã³ãã®å³ä¸ããã©ãã°ãã¦ãç»é¢ããªã¢ã«ã¿ã¤ã ã«ã¹ã ã¼ãºã«åºããã° OK:
ã¢ãã¿ç»é¢ã®å³ååã«ããä»®æ³ãã·ã³ãã®ç»é¢ãé ç½®ããä¾:
-
3). ãã¯ãªãããã¼ãã®å ±æãæ©è½ã®æå¹å:
ãDeviceãâãShared Clipboardãâä¸çªä¸ã®ãBidirectionalãï¼åæ¹åï¼:
-
確å®ãªæä½ã®ã³ã:
ããã©ã¦ã¶ããã端æ«ãçã®æååããã¦ã¹ã§ç¯å²æå®å¾ãå³ã¯ãªãã¯âãã³ãã¼:ã
è²¼ãä»ããããããã¹ãã¨ãã£ã¿ãç»é¢çã®ä»»æã®ä½ç½®ã§ããã¦ã¹ã§å³ã¯ãªãã¯âãè²¼ãä»ãã:
-
4). ããã©ãã° ã¢ã³ã ãããããæ©è½ã®æå¹å:
ãã¹ã¯ãããç»é¢ã«ã¦ããä»®æ³ãã·ã³ãã«ããã¡ã¤ã«ã®ã¢ã¤ã³ã³ããã©ãã°ãã¦è»¢éããæ©è½ã§ã:
-
ãDeviceãâãDrag and Dropãâä¸çªä¸ã®ãBidirectionalãï¼åæ¹åï¼:
-
5). ãã¯ãªãããã¼ãã®å ±æãæ©è½ã®ç¢ºèª:
-
(1). ã²ã¹ãOS å´ã®ã端æ«ãã«ã¦ãä¸è¨ãé¸ãã§ãããå³ã¯ãªãã¯ãã¦ããã³ãã¼ã:
vagrant@vagrant:~$ ls Desktop Downloads Pictures Templates Documents Music Public Videos
-
(2). ãã¹ãOS å´ã®ãã¨ãã£ã¿ãã«ãå³ã¯ãªãã¯ãã¦ãè²¼ãä»ãã:
vagrant@vagrant:~$ ls Desktop Downloads Pictures Templates Documents Music Public Videos
âããã«ä½¿ãã¾ãã:
-
(3). 使ããªãæã¯ããã¹ãOS ãåèµ·å:
-
ã端æ«ã以å¤ã®ã¦ã£ã³ãã¦ãéãã¦ããã
$ reboot
-
-
- --- - --- - --- - --- - --- - --- - --- - --- - ----- ----- -
8. ãä»®æ³ãã·ã³ãã«ãssh æ¥ç¶ã:
-
1). ãssh æ¥ç¶ããã¦ã¿ã:
ãä»®æ³ãã·ã³ããèµ·åãã¦ããå¿ è¦ãããã¾ã:
$ cd ~/ãã¦ã³ãã¼ã/vm/ubn2404/
$ vagrant ssh : vagrant@vagrant:~$
âã³ãã³ãããã³ãããå¤ãã£ããã¨ã«æ³¨ç®:
-
æ¥æã®è¡¨ç¤ºã確èª:
vagrant@vagrant:~$ date Fri Jun 28 11:41:30 UTC 2024
âè±èªã§è¡¨ç¤º:
-
ãã±ã¼ã«ã®ç¢ºèª:
vagrant@vagrant:~$ locale LANG=C.UTF-8 LANGUAGE= LC_CTYPE="C.UTF-8" LC_NUMERIC=C.UTF-8 LC_TIME=C.UTF-8 LC_COLLATE="C.UTF-8" LC_MONETARY=C.UTF-8 LC_MESSAGES="C.UTF-8" LC_PAPER=C.UTF-8 LC_NAME=C.UTF-8 LC_ADDRESS=C.UTF-8 LC_TELEPHONE=C.UTF-8 LC_MEASUREMENT=C.UTF-8 LC_IDENTIFICATION=C.UTF-8 LC_ALL=
âæ¥æ¬èªåããã¦ãã¾ããã
-
2). ãssh æ¥ç¶ããçµäº:
vagrant@vagrant:~$ exit logout ubn@ubnbox:~/ãã¦ã³ãã¼ã/vm/ubn2404$
âã³ãã³ãããã³ãããå ã«ãã©ãã¾ãã:
ã¡ãªã¿ã«ããä»®æ³ãã·ã³ãã¯èµ·åãããã¾ã¾ãªã®ã§æ³¨æ:
-
-
- --- - --- - --- - --- - --- - --- - --- - --- - ----- ----- --
9. ãã®ä»ã®æä½:
-
ä¸è¨ãåç §:
ãVirtualBox 7.0.18ãã«ã¦ãVagrantãã§ä»®æ³ãã·ã³ã®ãubuntu-desktop-24.04ããä½æãH171-7ã
âãã以å¤ã«ãæ¥æ¬èªåã¨ããè²ã ã¨è©¦ãã¦ã¿ãã¨ããã§ã:
-
-
ãã°ããããã¡ãã®ãä»®æ³ãã·ã³ãã§éã¶ã¤ãããªãã
ãVirtualBox ããã¼ã¸ã£ããèµ·åãã¦ããä»®æ³ãã·ã³ããé¸æ:
-
å·¦å´ã®ããã£ã¹ãã¬ã¤ãâããªã¢ã¼ããã£ã¹ãã¬ã¤ãã¿ã
ããµã¼ãã¼ãæå¹åãã®ãã§ãã¯ãå¤ãã¾ã
âOK
-
ããã§ãå°ãã¯å®å¿ããª:
ãã¨ããvagrantãã¦ã¼ã¶ã®ãã¹ã¯ã¼ãç¡è¦ã解é¤ãã¦ãå¤æ´ããæ¹ãè¯ãããã
-
-
ã¾ã¨ã
ä»åã¯ããVirtualBox 7.0.22ãã«ã¦ããVagrantãã§ï¼è©¦ãããã¨ãããï¼ãä»®æ³ãã·ã³ããä½æãã¦ç¢ºèªãã¾ãã:
-
ã¡ã¸ã£ã¼ãªãUbuntu 24.04ããªã®ã§ãã¹ã ã¼ãºã«ç¢ºèªã§ãã¾ããã
åããããããVirtualBox 7.0.22ãã¯ä½¿ãããã
ãã ããå¥ã® Linux ãã£ã¹ããªãã¥ã¼ã·ã§ã³ã®å ´åã ã¨ãè²ã ãªãã¨ãããããã
ãããåå¼·ã«ãªãã¾ãã
-
-
-
-
-
-
ç®æ¬¡
-
-
- ç®æ¬¡
- - --- - --- - --- - --- - --- - --- - --- - --- - -
- Xubuntu 24.04 LTS ã®ç«ã¡ä¸ã:
- - --- - --- - --- - --- - --- - --- - --- - --- - --
- ãVirtualBoxãã«ã¤ãã¦:
- - --- - --- - --- - --- - --- - --- - --- - --- - ---
- ãXubuntuãã«ã¤ãã¦:
- - --- - --- - --- - --- - --- - --- - --- - --- - ----
- 1. ãã£ã¹ã¯ã®ç©ºããå°ãªãã®ã§ãæ¢åã®ãä»®æ³ãã·ã³ããæ´ç:
- - --- - --- - --- - --- - --- - --- - --- - --- - -----
- 2. ã¾ãã¯ãVagrant ã§ä½¿ããBoxããæ¤ç´¢:
- å ¬å¼ã®Vagrant ã®ãBoxãã®å ¬éãµã¤ã:
- 1). ãubuntu 24.04 desktopãã§æ¤ç´¢:
- 2). ãããããä¸ã§ããcaspermeijn/ubuntu-desktop-24.04ãã使ç¨:
- 3). æ°ä»ããã¨ãã: ãã¦ã³ãã¼ãå®äºæã®ããã§ãã¯ãµã ã®ç¢ºèªã¡ãã»ã¼ã¸ã表示ããã¾ãã:
- 4). ä¸å®ãªããBox ã®åé¤ã¯ç°¡åãªã®ã§ããããããªBox ã試ãã¦ã¿ãã¨è¯ãã§ã:
- - --- - --- - --- - --- - --- - --- - --- - --- - ----- -
- 3. ãä½æ¥ç¨ãã£ã¬ã¯ããªããä½æ:
- - --- - --- - --- - --- - --- - --- - --- - --- - ----- --
- 4. ãVagrantfileããä½æ:
- - --- - --- - --- - --- - --- - --- - --- - --- - ----- ---
- 5. ãä»®æ³ãã·ã³ãã®ï¼ååã®ä½æã¨ï¼ç«ã¡ä¸ã:
- - --- - --- - --- - --- - --- - --- - --- - --- - ----- ----
- 6. ãä»®æ³ãã·ã³ãã®ç«ã¡ä¸ã:
- - --- - --- - --- - --- - --- - --- - --- - --- - ----- -----
- 7. ãä»®æ³ãã·ã³ãã®ç»é¢ã«ã¦ããVirtualBox Guest Additionsãã®æ©è½ãæå¹å:
- - --- - --- - --- - --- - --- - --- - --- - --- - ----- ----- -
- 8. ãä»®æ³ãã·ã³ãã«ãssh æ¥ç¶ã:
- - --- - --- - --- - --- - --- - --- - --- - --- - ----- ----- --
- 9. ãã®ä»ã®æä½:
- ã¾ã¨ã
- -
-
-
ããã®ç®æ¬¡ ã®å é ã¸ã
ãæ¬ç·¨ã®ç®æ¬¡ ã«æ»ãã
-