[ubuntu-jp:6686] Re: VirtualBox on Ubuntu server
SHIBATA Akira
bike_helper @ yahoo.co.jp
2024年 9月 4日 (水) 14:05:56 UTC
柴田(あ)です。
経過報告です。
みやたもとい様指摘ありがとうございます。
まだ、期待通りにはなっていません。
しかし、少し進展はありました。
引き続きツッコミ等歓迎です。
まず、指摘いただいたヘッドレス起動ですが、
実は最初はヘッドレス起動をしていまして、
エラーが表示されずにわからなかったのでした。
オプションの --type headless を外して
エラー表示を見つけて、「あーこれはダメだ」と
わかった次第。
CPU は Windows 版でも、今回進展があった方でも
1 なので、恐らくは直接関係なかったみたいです。
さて、進展したのは下の状況です。
作った vm が動かないので、そもそもちゃんと
インストールされていないのかなど考えて
インストールしなおしも行いましたが効果はありませんでした。
偶然かなり以前の export したファイルを発見しまして、
それを import して、下の変更を投入したところ
ログインすることができましたので、
私のサーバにインストールしている VirtualBox は
一応正しく動くものと思われます。
なお、 Windows で作った vm は import したものの
互換性 compatibility だかの問題があるようで
まだ動かせていません。
■作業状況
● NFS や samba の勉強のためのサーバのイメージだと
思われるエクスポートファイルを発見しましたので、
import してみました。
user @ server:~/.VirtualBox_ubuntu_samba$ VBoxManage import vm-nfs-samba.ova
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
Interpreting /home/user/.VirtualBox_ubuntu_samba/vm-nfs-samba.ova...
OK.
Disks:
vmdisk1 85899345920 -1 http://www.vmware.com/interfaces/specifications/vmdk.html#streamOptimized vm-nfs-samba-disk1.vmdk -1 -1
Virtual system 0:
0: Suggested OS type: "Ubuntu"
(change with "--vsys 0 --ostype <type>"; use "list ostypes" to list all possible values)
1: Suggested VM name "ubuntu3330"
(change with "--vsys 0 --vmname <name>")
2: Suggested VM group "/"
(change with "--vsys 0 --group <group>")
3: Suggested VM settings file name "/home/user/VirtualBox VMs/ubuntu3330/ubuntu3330.vbox"
(change with "--vsys 0 --settingsfile <filename>")
4: Suggested VM base folder "/home/user/VirtualBox VMs"
(change with "--vsys 0 --basefolder <path>")
5: Number of CPUs: 1
(change with "--vsys 0 --cpus <n>")
6: Guest memory: 512 MB
(change with "--vsys 0 --memory <MB>")
7: USB controller
(disable with "--vsys 0 --unit 7 --ignore")
8: Network adapter: orig Bridged, config 2, extra slot=0;type=Bridged
9: CD-ROM
(disable with "--vsys 0 --unit 9 --ignore")
10: IDE controller, type PIIX4
(disable with "--vsys 0 --unit 10 --ignore")
11: IDE controller, type PIIX4
(disable with "--vsys 0 --unit 11 --ignore")
12: SATA controller, type AHCI
(disable with "--vsys 0 --unit 12 --ignore")
13: Hard disk image: source image=vm-nfs-samba-disk1.vmdk, target path=vm-nfs-samba-disk1.vmdk, controller=12;port=0
(change target path with "--vsys 0 --unit 13 --disk path";
change controller with "--vsys 0 --unit 13 --controller <index>";
change controller port with "--vsys 0 --unit 13 --port <n>";
disable with "--vsys 0 --unit 13 --ignore")
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
Successfully imported the appliance.
user @ server:~/.VirtualBox_ubuntu_samba$
● インポートしたそのままの状態では動いているようでしたが、
ログインもできず、 vnc で見えるポートの指定をしました。
また、ネットワーク I/F の指定をしました。
user @ server:~/.VirtualBox_ubuntu_samba$ VBoxManage modifyvm ubuntu3330 --vrdeport 3330 --vrde on
user @ server:~/.VirtualBox_ubuntu_samba$ VBoxManage modifyvm ubuntu3330 --vrdeproperty VNCPassword=secret
user @ server:~/.VirtualBox_ubuntu_samba$ ip a s
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eno8303: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
link/ether 6c:3c:8c:88:d5:06 brd ff:ff:ff:ff:ff:ff
altname enp5s0f0
inet 192.168.48.3/24 brd 192.168.48.255 scope global eno8303
valid_lft forever preferred_lft forever
inet6 fe80::6e3c:8cff:fe88:d506/64 scope link
valid_lft forever preferred_lft forever
3: eno8403: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN group default qlen 1000
link/ether 6c:3c:8c:88:d5:07 brd ff:ff:ff:ff:ff:ff
altname enp5s0f1
user @ server:~/.VirtualBox_ubuntu_samba$ VBoxManage modifyvm ubuntu3330 --nic1 bridged --bridgeadapter1 eno8303
user @ server:~/.VirtualBox_ubuntu_samba$
● エラーなく起動したので vnc でネットワーク接続の
設定をやり直して再起動し、外部から接続できることを
確認しました。
vnc でコンソール画面が見えるようになってもパスワードを
失念していて、ログインできるまで数日かかりました。
たぶん 100 通り以上入れたと思いますw
また、★でコメントを書いておきます。
user @ server:~$ ssh 192.168.48.6 ★ host から接続しました
The authenticity of host '192.168.48.6 (192.168.48.6)' can't be established.
ECDSA key fingerprint is SHA256:2YHBUTAcHhiS2SYTgXNlz+dqvPOw/0S0lvFVTHocR3s.
This key is not known by any other names
Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
Warning: Permanently added '192.168.48.6' (ECDSA) to the list of known hosts.
user @ 192.168.48.6's password:
Welcome to Ubuntu 12.04.3 LTS (GNU/Linux 3.8.0-29-generic i686) ★ 12.04 とキョーレツに古いです
* Documentation: https://help.ubuntu.com/
System information disabled due to load higher than 1.0
Last login: Wed Sep 4 21:21:04 2024
user @ vmserver:~$ sudo apt-get update ; sudo apt-get upgrade -y ★ update できるか確認しました
[sudo] password for user:
Ign http://security.ubuntu.com precise-security Release.gpg
Ign http://security.ubuntu.com precise-security Release
Ign http://security.ubuntu.com precise-security/main Sources/DiffIndex
−略−
W: Failed to fetch http://jp.archive.ubuntu.com/ubuntu/dists/precise-backports/universe/binary-i386/Packages 404 Not Found [IP: 185.125.190.81 80]
W: Failed to fetch http://jp.archive.ubuntu.com/ubuntu/dists/precise-backports/multiverse/binary-i386/Packages 404 Not Found [IP: 185.125.190.81 80]
E: Some index files failed to download. They have been ignored, or old ones used instead.
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages have been kept back:
linux-headers-generic-lts-raring linux-image-generic-lts-raring
0 upgraded, 0 newly installed, 0 to remove and 2 not upgraded. ★ 古いせいでしょう、アップデートはできませんでした
user @ vmserver:~$ sudo /sbin/shutdown -ht 0 now
user @ vmserver:~$
Broadcast message from user @ vmserver
(/dev/pts/0) at 21:35 ...
The system is going down for halt NOW!
Connection to 192.168.48.6 closed by remote host.
Connection to 192.168.48.6 closed.
user @ server:~$
● 一応古いながらも動くエクスポートファイルがあって、
インポートしたら動いたので、インストールしてある
VirtualBox は正しく動くはず。
新たに作る vm もこの辺に合わせれば動くものになりそうと
期待します。
user @ server:~$ VBoxManage showvminfo ubuntu3330
Name: ubuntu3330
Groups: /
Guest OS: Ubuntu (32-bit)
UUID: ba9d9591-39ba-49a4-8b2c-9f042fe4a667
Config file: /home/user/VirtualBox VMs/ubuntu3330/ubuntu3330.vbox
Snapshot folder: /home/user/VirtualBox VMs/ubuntu3330/Snapshots
Log folder: /home/user/VirtualBox VMs/ubuntu3330/Logs
Hardware UUID: ba9d9591-39ba-49a4-8b2c-9f042fe4a667
Memory size: 512MB
Page Fusion: disabled
VRAM size: 12MB
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: disabled
Nested VT-x/AMD-V: disabled
CPUID Portability Level: 0
CPUID overrides: None
Boot menu mode: message and menu
Boot Device 1: Floppy
Boot Device 2: DVD
Boot Device 3: HardDisk
Boot Device 4: Not Assigned
ACPI: enabled
IOAPIC: disabled
BIOS APIC mode: APIC
Time offset: 0ms
RTC: UTC
Hardware Virtualization: enabled
Nested Paging: enabled
Large Pages: disabled
VT-x VPID: enabled
VT-x Unrestricted Exec.: enabled
Paravirt. Provider: Legacy
Effective Paravirt. Prov.: None
State: aborted (since 2024-09-04T12:35:47.000000000)
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): IDE
Storage Controller Type (0): PIIX4
Storage Controller Instance Number (0): 0
Storage Controller Max Port Count (0): 2
Storage Controller Port Count (0): 2
Storage Controller Bootable (0): on
Storage Controller Name (1): SATA
Storage Controller Type (1): IntelAhci
Storage Controller Instance Number (1): 0
Storage Controller Max Port Count (1): 30
Storage Controller Port Count (1): 1
Storage Controller Bootable (1): on
IDE (1, 0): Empty
SATA (0, 0): /home/user/VirtualBox VMs/ubuntu3330/vm-nfs-samba-disk1.vmdk (UUID: 9ed6fcfa-cf1b-4053-af3e-765529cfbb16) (hot-pluggable)
NIC 1: MAC: 080027CC4774, Attachment: Bridged Interface 'eno8303', Cable connected: on, Trace: off (file: none), Type: Am79C973, 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: USB Tablet
Keyboard Device: PS/2 Keyboard
UART 1: disabled
UART 2: disabled
UART 3: disabled
UART 4: disabled
LPT 1: disabled
LPT 2: disabled
Audio: disabled
Audio playback: enabled
Audio capture: enabled
Clipboard Mode: Bidirectional
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: enabled
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 VMs/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:~$
On Wed, 28 Aug 2024 19:14:38 +0900
みやたもとい <motoi.miyata @ gmail.com> wrote:
> こんにちわ。
> VBoxManage: error: Details: code NS_ERROR_FAILURE (0x80004005)
> component MachineWrap, interface IMachine
> ゲストの構成で失敗してそうなかんじなので一旦GUIでの起動じゃなくヘッドレス起動を試されてはいかがでしょうか
> コマンドラインは
> vboxmanage startvm ubuntu3330 --type headless
> とかです
> 前に似たような状況で起動すらしないとき、GUIに絡む設定で駄目だったらしくとりあえずの起動は可能でした。
> ホスト側もサーバーサイド版のようなのでこれでインストールできれば御の字じゃないかと思います。
>
> 構成で気になるのはNumber of CPUs: 1なところでCPUは2個以上じゃないとエラーがでたような記憶があります。
> 多分もっと根本的な設定差異で落ちてるかとは思うんですが・・・
>
>
> On 2024/08/27 15:49, SHIBATA Akira wrote:
> > 柴田(あ)です。
> >
> >
> > 荒井様、玉田様、ヒントをありがとうございます。
> >
> > 現状報告です。
> > まだ、うまく行ってません。
−略−
--
SHIBATA Akira <bike_helper @ yahoo.co.jp>
ubuntu-jp メーリングリストの案内