前提・実現したいこと
virtualboxとvagrantを使用して仮想環境を構築し、Pythonの学習をしたいと考えております。
vagrant upは問題なく実行しているように見受けられるのですが、Virtualbox側で仮想マシンが起動しません(生成されません)。
vagrant upの状態でVMのGUI側で仮想マシンの電源をオンにしようとすると、仮想マシンのセッションを開けませんでした。The VM session was aborted.終了コード : E_FAIL (0x80004005),コンポーネント: SessionMachine,インターフェース: ISession {****aa05-b02e-4cdd-a04f-ade4a762e6b7}。
しかし、仮想マシンの電源をオンにしてからvagrant upしようとすると、パワーシェル側で下記の②のエラーメッセージが出てしまい、正しい状態が分からない状態です。
通常はvagrant upで仮想マシンが生成され、vagrant upの状態のときにVM上の仮想マシンも電源が入り、vagrant haltでかVM上の仮想マシンの電源がオフになるという認識なのですが違うのでしょうか?
初心者のため、質問の意図が分かりにくかったら申し訳ございません。ご存知のかた、ご教授いただければ幸いです。
発生している問題・エラーメッセージ
Bringing machine 'default' up with 'virtualbox' provider... ==> default: Checking if box 'ubuntu/trusty64' 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: 8000 (guest) => 8000 (host) (adapter 1) 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 5.2.23 running --- OK. ==> default: Checking for guest additions in VM... ==> default: Mounting shared folders... default: /vagrant => C:/akibook ==> default: Machine already provisioned. Run `vagrant provision` or use the `--provision` ==> default: flag to force provisioning. Provisioners marked to run always will still run. ②仮想マシンのGUI側でvagrant upを実施した場合のパワーシェル上のエラー ==> default: Checking if box 'ubuntu/trusty64' is up to date... ==> default: Clearing any previously set forwarded ports... There was an error while executing `VBoxManage`, a CLI used by Vagrant for controlling VirtualBox. The command and stderr is shown below. Command: ["modifyvm", "********-17f0-4d93-9b94-e83af7a7851e", "--natpf1", "delete", "ssh", "--natpf1", "delete", "tcp8000"] Stderr: VBoxManage.exe: error: Code E_FAIL (0x80004005) - Unspecified error (extended info not available) VBoxManage.exe: error: Context: "LockMachine(a->session, LockType_Write)" at line 529 of file VBoxManageModifyVM.cpp
試したこと
グーグルなどで長時間検索し、色々と試してみましたが打開策が見つかりません。
powershellでvagrant up後にteratermでアクセスすると問題なくubuntuに入れますが、Virtualboxの仮想マシンは電源がオフのままです。どういうことなのでしょうか。。
補足情報(FW/ツールのバージョンなど)
Windows10 home(64bit)
Vagrant 2.2.1
VirtualBox 5.2.22