vagrant shared
C:\HashiCorp\Vagrant>vagrant reload ==> default: Attempting graceful shutdown of VM... ==> default: Starting the machine... ==> default: Waiting for the machine to report its IP address... default: Timeout: 120 seconds default: IP: 192.168.24.229 ==> default: Waiting for machine to boot. This may take a few minutes... default: SSH address: 192.168.24.229:22 default: SSH username: vagrant default: SSH auth method: private key ==> default: Machine booted and ready! No synced folder implementation is available for your synced folders! Please consult the documentation to learn why this may be the case. You may force a synced folder implementation by specifying a "type:" option for the synced folders. Available synced folder implementations are listed below. docker, nfs, rsync, smb, virtualbox
vagrant up
起動したようだ。
user: vagrant
password:vagrant
でログインできた。
C:\HashiCorp\Vagrant>vagrant up --provider hyperv Bringing machine 'default' up with 'hyperv' provider... ==> default: Verifying Hyper-V is enabled... ==> default: Importing a Hyper-V instance default: Please choose a switch to attach to your Hyper-V instance. default: If none of these are appropriate, please open the Hyper-V manager default: to create a new virtual switch. default: default: 1) ext default: 2) DockerNAT default: 3) nat default: default: What switch would you like to use? 1 default: Cloning virtual hard drive... default: Creating and registering the VM... default: Setting VM Integration Services default: Successfully imported a VM with name: vargrant-dev-source ==> default: Starting the machine... ==> default: Waiting for the machine to report its IP address... default: Timeout: 120 seconds default: IP: 192.168.24.229 ==> default: Waiting for machine to boot. This may take a few minutes... default: SSH address: 192.168.24.229:22 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! No synced folder implementation is available for your synced folders! Please consult the documentation to learn why this may be the case. You may force a synced folder implementation by specifying a "type:" option for the synced folders. Available synced folder implementations are listed below. docker, nfs, rsync, smb, virtualbox
vagrant Script: import_vm_vmcx.ps1 Error:
C:\HashiCorp\Vagrant>vagrant up --provider hyperv Bringing machine 'default' up with 'hyperv' provider... ==> default: Verifying Hyper-V is enabled... ==> default: Importing a Hyper-V instance default: Please choose a switch to attach to your Hyper-V instance. default: If none of these are appropriate, please open the Hyper-V manager default: to create a new virtual switch. default: default: 1) 仮想スイッチ 外部 default: 2) 仮想スイッチ プライベート default: 3) DockerNAT default: 4) nat default: default: What switch would you like to use? 1 default: Cloning virtual hard drive... default: Creating and registering the VM... An error occurred while executing a PowerShell script. This error is shown below. Please read the error message and see if this is a configuration error with your system. If it is not, then please report a bug. Script: import_vm_vmcx.ps1 Error: 発生場所 C:\HashiCorp\Vagrant\embedded\gems\gems\vagrant-1.9.4\plugins\providers\hyperv\scripts\impo rt_vm_vmcx.ps1:18 文字:37 + [string]$differencing_disk=$null + ~ 関数パラメーター一覧に ')' が存在しません。 発生場所 C:\HashiCorp\Vagrant\embedded\gems\gems\vagrant-1.9.4\plugins\providers\hyperv\scripts\impo rt_vm_vmcx.ps1:20 文字:1 + ) + ~ 式またはステートメントのトークン ')' を使用できません。 + CategoryInfo : ParserError: (:) [], ParseException + FullyQualifiedErrorId : MissingEndParenthesisInFunctionParameterList
C:\HashiCorp\Vagrant\embedded\gems\gems\vagrant-1.9.4\plugins\providers\hyperv\scripts import_vm_vmcx.ps1
18行目にカンマが抜けてるようだ。
Param( [Parameter(Mandatory=$true)] [string]$vm_config_file, [Parameter(Mandatory=$true)] [string]$source_path, [Parameter(Mandatory=$true)] [string]$dest_path, [Parameter(Mandatory=$true)] [string]$data_path, [string]$switchname=$null, [string]$memory=$null, [string]$maxmemory=$null, [string]$cpus=$null, [string]$vmname=$null, [string]$auto_start_action=$null, [string]$auto_stop_action=$null, [string]$differencing_disk=$null <==カンマ [string]$enable_virtualization_extensions=$False )