[ubuntu-jp:6684] Re: VirtualBox on Ubuntu server

Daiki Tamada daiki.tamada @ gmail.com
2024年 8月 25日 (日) 22:03:00 UTC


柴田(あ)様

私も荒井様の提案通り、GUIベースでの起動で一度確認してみるのが楽だと思います。

また、カーネルモジュールのインストールがされていない場合も同様のエラーが出ると思います。
もしご存じでしたらすみません。

sudo /sbin/vboxconfig

でエラーが出るか確認してみるのが良いと思います。
もしエラーが出るようであれば、カーネルヘッダーをインストールした後、再びvboxconfigを実行してみてください。
sudo apt update
sudo apt install build-essential linux-headers-$(uname -r) dkms
sudo apt reinstall virtualbox-dkms

このあたりのサイトが参考になるかもしれません。
https://darshasilje.hatenablog.jp/entry/2022/03/31/164111

ぜひ上手くインストールできることを祈っています。

玉田


On Sun, Aug 25, 2024 at 4:10 PM Tsuyoshi ARAI <tarai @ c.oka-pu.ac.jp> wrote:
>
> 荒井と申します。
>
> 1. ubuntu3330 の起動時のログが何処かにあると思うのですが、
>   そちらを確認してみてはいかがでしょうか。
>
> 2. 一度 vm をGUIベースで作ってみてはいかがでしょうか。
>     CLI ベースで作ろうとすると設定しそこねている機能とかが
>   ありそうで若干怖い気がしました。
>
> サーバは Ubuntu 22.04.x LTS で、vmは 20.04.x LTSのところは、
> vm を 22.04.x に揃えてもよいのではないでしょうか。
>
> 拝見した内容から思いつくのはこんなところです。参考になりましたら。
>
> On 2024/08/24 15:42, SHIBATA Akira wrote:
> > 柴田(あ)と申します。
> >
> >
> > いろいろサボっていて、自宅で使用していたサーバが故障して
> > いちから構築しなおしとなりました。
> > サーバ上で以前より稼働していた vm も全滅しました。
> >
> > あまりに久しぶり過ぎて何をどうすれば良いか忘れてしまいまして、
> >   Ubuntu Server 22.04.4 LTS をインストールし、
> > https://gist.github.com/carmark/547004053a266b20fb24
> > を参考に作業してみましたが、
> > VirtualBox を稼働させることができません。
> >
> > お知恵を拝借できませんでしょうか。
> >
> >
> > 長くて恐縮ですが、下のような状態です。
> >
> >
> > user @ server:~$ VBoxManage createhd --filename /home/user/.VirtualBox_ubuntu3330/ubuntu3330.vdi --size 32768
> > 0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
> > Medium created. UUID: f5bbe13e-53c1-42a5-a618-4e8526ee28ec
> > user @ server:~$ VBoxManage createvm --name ubuntu3330 --ostype Ubuntu_64 --register --basefolder /home/user/.VirtualBox_ubuntu3330/
> > Virtual machine 'ubuntu3330' is created and registered.
> > UUID: 874013a1-065a-4fb6-9ed8-45f5b81cdb6e
> > Settings file: '/home/user/.VirtualBox_ubuntu3330/ubuntu3330/ubuntu3330.vbox'
> > user @ server:~$ VBoxManage modifyvm ubuntu3330 --memory 10240 --vram 128
> > user @ server:~$ VBoxManage modifyvm ubuntu3330 --acpi on --ioapic on
> > user @ server:~$ VBoxManage modifyvm ubuntu3330 --nic1 bridged --bridgeadapter1 eno8303 --nictype1 82545EM
> > user @ server:~$ VBoxManage modifyvm ubuntu3330 --boot1 dvd --boot2 disk
> > user @ server:~$ VBoxManage modifyvm ubuntu3330 --vrdeport 3330 --vrde on
> > user @ server:~$ VBoxManage modifyvm ubuntu3330 --vrdeproperty VNCPassword=secret
> > user @ server:~$ VBoxManage storagectl ubuntu3330 --name SATA Controller --add sata --controller IntelAHCI
> > user @ server:~$ VBoxManage storageattach ubuntu3330 --storagectl SATA Controller --port 0 --device 0 --type hdd --medium /home/user/.VirtualBox_ubuntu3330/ubuntu3330.vdi
> > user @ server:~$ VBoxManage storagectl ubuntu3330 --name IDE Controller --add ide
> > user @ server:~$ VBoxManage storageattach ubuntu3330 --storagectl IDE Controller --port 0 --device 0 --type dvddrive --medium /home/user/archives/linux/iso/ubuntu/ubuntu-20.04.6-live-server-amd64.iso
> > user @ server:~$ /usr/bin/VBoxManage list vms
> > "ubuntu3330" {874013a1-065a-4fb6-9ed8-45f5b81cdb6e}
> > user @ server:~$ VBoxManage showvminfo ubuntu3330
> > Name:                        ubuntu3330
> > Groups:                      /
> > Guest OS:                    Ubuntu (64-bit)
> > UUID:                        874013a1-065a-4fb6-9ed8-45f5b81cdb6e
> > Config file:                 /home/user/.VirtualBox_ubuntu3330/ubuntu3330/ubuntu3330.vbox
> > Snapshot folder:             /home/user/.VirtualBox_ubuntu3330/ubuntu3330/Snapshots
> > Log folder:                  /home/user/.VirtualBox_ubuntu3330/ubuntu3330/Logs
> > Hardware UUID:               874013a1-065a-4fb6-9ed8-45f5b81cdb6e
> > Memory size:                 10240MB
> > Page Fusion:                 disabled
> > VRAM size:                   128MB
> > CPU exec cap:                100%
> > HPET:                        disabled
> > CPUProfile:                  host
> > Chipset:                     piix3
> > Firmware:                    BIOS
> > Number of CPUs:              1
> > PAE:                         enabled
> > Long Mode:                   enabled
> > Triple Fault Reset:          disabled
> > APIC:                        enabled
> > X2APIC:                      enabled
> > Nested VT-x/AMD-V:           disabled
> > CPUID Portability Level:     0
> > CPUID overrides:             None
> > Boot menu mode:              message and menu
> > Boot Device 1:               DVD
> > Boot Device 2:               HardDisk
> > Boot Device 3:               HardDisk
> > Boot Device 4:               Not Assigned
> > ACPI:                        enabled
> > IOAPIC:                      enabled
> > BIOS APIC mode:              APIC
> > Time offset:                 0ms
> > RTC:                         local time
> > Hardware Virtualization:     enabled
> > Nested Paging:               enabled
> > Large Pages:                 disabled
> > VT-x VPID:                   enabled
> > VT-x Unrestricted Exec.:     enabled
> > Paravirt. Provider:          Default
> > Effective Paravirt. Prov.:   KVM
> > State:                       powered off (since 2024-08-24T06:23:13.498000000)
> > Graphics Controller:         VBoxVGA
> > Monitor count:               1
> > 3D Acceleration:             disabled
> > 2D Video Acceleration:       disabled
> > Teleporter Enabled:          disabled
> > Teleporter Port:             0
> > Teleporter Address:
> > Teleporter Password:
> > Tracing Enabled:             disabled
> > Allow Tracing to Access VM:  disabled
> > Tracing Configuration:
> > Autostart Enabled:           disabled
> > Autostart Delay:             0
> > Default Frontend:
> > VM process priority:         default
> > Storage Controller Name (0):            SATA Controller
> > Storage Controller Type (0):            IntelAhci
> > Storage Controller Instance Number (0): 0
> > Storage Controller Max Port Count (0):  30
> > Storage Controller Port Count (0):      30
> > Storage Controller Bootable (0):        on
> > Storage Controller Name (1):            IDE Controller
> > Storage Controller Type (1):            PIIX4
> > Storage Controller Instance Number (1): 0
> > Storage Controller Max Port Count (1):  2
> > Storage Controller Port Count (1):      2
> > Storage Controller Bootable (1):        on
> > SATA Controller (0, 0): /home/user/.VirtualBox_ubuntu3330/ubuntu3330.vdi (UUID: f5bbe13e-53c1-42a5-a618-4e8526ee28ec)
> > IDE Controller (0, 0): /home/user/archives/linux/iso/ubuntu/ubuntu-20.04.6-live-server-amd64.iso (UUID: 2e32d17d-40de-4c2e-ab0f-8ab876ba0fbd)
> > NIC 1:                       MAC: 0800271A8EE2, Attachment: Bridged Interface 'eno8303', Cable connected: on, Trace: off (file: none), Type: 82545EM, Reported speed: 0 Mbps, Boot priority: 0, Promisc Policy: deny, Bandwidth group: none
> > NIC 2:                       disabled
> > NIC 3:                       disabled
> > NIC 4:                       disabled
> > NIC 5:                       disabled
> > NIC 6:                       disabled
> > NIC 7:                       disabled
> > NIC 8:                       disabled
> > Pointing Device:             PS/2 Mouse
> > Keyboard Device:             PS/2 Keyboard
> > UART 1:                      disabled
> > UART 2:                      disabled
> > UART 3:                      disabled
> > UART 4:                      disabled
> > LPT 1:                       disabled
> > LPT 2:                       disabled
> > Audio:                       enabled (Driver: ALSA, Controller: AC97, Codec: STAC9700)
> > Audio playback:              disabled
> > Audio capture:               disabled
> > Clipboard Mode:              disabled
> > Drag and drop Mode:          disabled
> > VRDE:                        enabled (Address 0.0.0.0, Ports 3330, MultiConn: off, ReuseSingleConn: off, Authentication type: null)
> > Video redirection:           disabled
> > VRDE property               : TCP/Ports  = "3330"
> > VRDE property               : TCP/Address = <not set>
> > OHCI USB:                    disabled
> > EHCI USB:                    disabled
> > xHCI USB:                    disabled
> >
> > USB Device Filters:
> >
> > <none>
> >
> > Bandwidth groups:  <none>
> >
> > Shared folders:<none>
> >
> > Recording enabled:           no
> > Recording screens:           1
> >   Screen 0:
> >      Enabled:                 yes
> >      ID:                      0
> >      Record video:            yes
> >      Record audio:            no
> >      Destination:             File
> >      File:                    /home/user/.VirtualBox_ubuntu3330/ubuntu3330/ubuntu3330-screen0.webm
> >      Options:                 vc_enabled=true,ac_enabled=false,ac_profile=med
> >      Video dimensions:        1024x768
> >      Video rate:              512kbps
> >      Video FPS:               25fps
> > Guest:
> >
> > Configured memory balloon size: 0MB
> >
> >
> > user @ server:~$ VBoxManage list hostinfo
> > Host Information:
> >
> > Host time: 2024-08-24T06:23:14.787000000Z
> > Processor online count: 4
> > Processor count: 4
> > Processor online core count: 2
> > Processor core count: 2
> > Processor supports HW virtualization: yes
> > Processor supports PAE: yes
> > Processor supports long mode: yes
> > Processor supports nested paging: yes
> > Processor supports unrestricted guest: yes
> > Processor supports nested HW virtualization: no
> > Processor#0 speed: 4200 MHz
> > Processor#0 description: Intel(R) Pentium(R) Gold G6505 CPU @ 4.20GHz
> > Processor#1 speed: 4200 MHz
> > Processor#1 description: Intel(R) Pentium(R) Gold G6505 CPU @ 4.20GHz
> > Processor#2 speed: 4200 MHz
> > Processor#2 description: Intel(R) Pentium(R) Gold G6505 CPU @ 4.20GHz
> > Processor#3 speed: 4200 MHz
> > Processor#3 description: Intel(R) Pentium(R) Gold G6505 CPU @ 4.20GHz
> > Memory size: 72213 MByte
> > Memory available: 71860 MByte
> > Operating system: Linux
> > Operating system version: 5.15.0-119-generic
> > user @ server:~$ VBoxManage startvm ubuntu3330
> > Waiting for VM "ubuntu3330" to power on...
> > VBoxManage: error: The virtual machine 'ubuntu3330' has terminated unexpectedly during startup because of signal 6
> > VBoxManage: error: Details: code NS_ERROR_FAILURE (0x80004005), component MachineWrap, interface IMachine
> > user @ server:~$
> > user @ server:~$ tree .VirtualBox_ubuntu3330/
> > .VirtualBox_ubuntu3330/
> > |-- ubuntu3330
> > |   |-- ubuntu3330.vbox
> > |   `-- ubuntu3330.vbox-prev
> > `-- ubuntu3330.vdi
> >
> > 1 directory, 3 files
> > user @ server:~$ ls -l .VirtualBox_ubuntu3330/
> > total 132
> > drwx------ 1 user user      70 Aug 24 15:23 ubuntu3330
> > -rw------- 1 user user 2097152 Aug 24 15:23 ubuntu3330.vdi
> > user @ server:~$ ls -l .VirtualBox_ubuntu3330/ubuntu3330/
> > total 8
> > -rw------- 1 user user 2991 Aug 24 15:23 ubuntu3330.vbox
> > -rw------- 1 user user 2592 Aug 24 15:23 ubuntu3330.vbox-prev
> > user @ server:~$ dpkg -l | grep virtualbox
> > ii  virtualbox                             6.1.50-dfsg-1~ubuntu1.22.04.3           amd64        x86 virtualization solution - base binaries
> > ii  virtualbox-dkms                        6.1.50-dfsg-1~ubuntu1.22.04.3           amd64        x86 virtualization solution - kernel module sources for dkms
> > ii  virtualbox-qt                          6.1.50-dfsg-1~ubuntu1.22.04.3           amd64        x86 virtualization solution - Qt based user interface
> > user @ server:~$
> >
>
> --
> ==========================
> Tsuyoshi ARAI<tarai @ c.oka-pu.ac.jp>
> Okayama Prefectural University
>



ubuntu-jp メーリングリストの案内