
VirtualBox と Debian 9 / Ubuntu 18.0.4 を使用して無人インストールを開始すると、国を選択する画面でインストールが停止します。
これは私のコマンドラインです:
VBoxManage unattended install $VMNAME --user=$OSUSERNAME --password=$OSPASSWORD --country=UK --time-zone=UTC --hostname=testserver.local --iso=./build/$ISOFILENAME --install-additions
VBoxManage startvm $VMNAME --type headless
私はまた、VirtualBox ドキュメント言語の追加パラメータをリストします。
VBoxManage unattended install $VMNAME --user=$OSUSERNAME --password=$OSPASSWORD --country=UK --time-zone=UTC --hostname=testserver.local --iso=./build/$ISOFILENAME --install-additions --language=en-US
... 成功しませんでした。スクリプトの出力は次のとおりです。
VBoxManage: info: Preparing unattended installation of Ubuntu_64 in machine 'testserver' (e643e8fd-28f9-466b-a390-5ca21df28a8b).
VBoxManage: info: Using values:
isoPath = /Users/me/Dev/vboxinstall/build/ubuntu-18.04.2-live-server-amd64.iso
user = TEST
password = TEST
fullUserName =
productKey =
additionsIsoPath = /Applications/VirtualBox.app/Contents/MacOS/VBoxGuestAdditions.iso
installGuestAdditions = true
validationKitIsoPath =
installTestExecService = false
locale = en_US
country = US
timeZone = EAT
proxy =
hostname = testserver.local
packageSelectionAdjustments =
auxiliaryBasePath = /Users/me/VirtualBox VMs/testserver/Unattended-e643e8fd-28f9-466b-a390-5ca21df28a8b-
imageIndex = 1
scriptTemplatePath = /Applications/VirtualBox.app/Contents/MacOS/UnattendedTemplates/ubuntu_preseed.cfg
postInstallScriptTemplatePath = /Applications/VirtualBox.app/Contents/MacOS/UnattendedTemplates/debian_postinstall.sh
postInstallCommand =
extraInstallKernelParameters = auto=true preseed/file=/cdrom/preseed.cfg priority=critical quiet splash noprompt noshell automatic-ubiquity debian-installer/locale=en_US keyboard-configuration/layoutcode=us languagechooser/language-name=English localechooser/supported-locales=en_US.UTF-8 countrychooser/shortlist=KE --
language = en-US
detectedOSTypeId =
detectedOSVersion =
detectedOSFlavor =
detectedOSLanguages = en-US
detectedOSHints =
VBoxManage: info: VM 'testserver' (e643e8fd-28f9-466b-a390-5ca21df28a8b) is ready to be started (e.g. VBoxManage startvm).
Waiting for VM "testserver" to power on...
VM "testserver" has been successfully started.
VirtualBox で Debian 9 または Ubuntu 18.0.4 LTS の 100% 無人インストールを実行するにはどうすればよいですか?
答え1
install
Stretch 以降の Debian 上の syslinux には、メニュー エントリを起動する代わりに、グラフィカル インストーラーが自動的に起動するという問題があります。
この問題の詳細と修正方法については、こちらをご覧ください: https://www.virtualbox.org/ticket/18410
基本的に、修正は、VirtualBox を使用して、--auxiliary-base-path
Virtualbox が ISO から isolinux ファイルを抽出してパッチを適用する場所を指定することです。
aux_base_path="$(mktemp -d --tmpdir unattended-install-XXXXX)"
VBoxManage unattended install 'vm-name' --auxiliary-base-path "$aux_base_path"/ ...
(...
は他のオプションのプレースホルダーです)
メインの isolinux 構成ファイルにパッチを適用して、install
VESA メニューの代わりにデフォルトでメニュー エントリを実行できるようになりました。
sed -i 's/^default vesa.*/default install/' "$aux_base_path"/isolinux-isolinux.cfg
これで VM を起動でき、無人インストールが実行されるはずです。
VBoxManage startvm 'vm-name'
注記: 上記のコマンドは Unix シェル (Linux および MacOS) 用です。Windows コンソールの場合は、%UserProfile%/
の代わりに のような既存のフォルダー パスを使用し"$aux_base_path/"
、以下を使用します。
$f = Get-Content isolinux-isolinux.cfg | %{$_ -replace "^default vesa.*","default install"}
$f > isolinux-isolinux.cfg