![](/img/trans.png)
[英]How to install Vagrant on Windows 10 Home without Hyper-V support?
[英]Vagrant on Windows 10 Pro and Hyper-V "General access denied error" on SMB shared folder
帶有 Hyper-V 的 Windows 10 專業版
流浪者 v.2.2.6
嘗試通過 Powershell 和管理員用戶使用 SMB 共享文件夾啟動 homestead VM,但沒有成功。
共享“站點”文件夾並創建了一個專用用戶(usr:vagrant,pwd:vagrant),可以完全訪問共享文件夾。
真的為此苦苦掙扎。
將共享文件夾設置為Sites\mysite
(沒有完整路徑),因為我只共享這個特定文件夾,對嗎?
PS C:\Users\sgrat\Desktop\Sites\Homestead> vagrant up --provision
Bringing machine 'homestead' up with 'hyperv' provider...
==> homestead: Verifying Hyper-V is enabled...
==> homestead: Verifying Hyper-V is accessible...
homestead: Configuring the VM...
==> homestead: Starting the machine...
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: start_vm.ps1
Error:
Failed to start VM 'homestead' failed to start.
Synthetic SCSI Controller (Instance ID 480D9BCD-B214-461F-976E-2A9A546F9BB8): Failed to Power on with Error 'General access denied error'.
Account does not have permission to open attachment 'C:\Users\sgrat\Desktop\Sites\Homestead\.vagrant\machines\homestead\hyperv\Virtual Hard Disks\ubuntu-18.04-amd64.vhdx'. Error: 'General access denied error'.
'homestead' failed to start. (Virtual machine ID 555B1C43-AC2B-4B9C-A9B2-94BF40753C40)
'homestead' Synthetic SCSI Controller (Instance ID 480D9BCD-B214-461F-976E-2A9A546F9BB8): Failed to Power on with Error 'General access denied error' (0x80070005). (Virtual machine ID 555B1C43-AC2B-4B9C-A9B2-94BF40753C40)
'homestead': Account does not have permission to open attachment 'C:\Users\sgrat\Desktop\Sites\Homestead\.vagrant\machines\homestead\hyperv\Virtual Hard Disks\ubuntu-18.04-amd64.vhdx'. Error: 'General access denied error' (0x80070005). (Virtual machine ID 555B1C43-AC2B-4B9C-A9B2-94BF40753C40)
ip: "192.168.10.10"
memory: 2048
cpus: 2
provider: hyperv
authorize: c:/Users/sgrat/.ssh/id_rsa.pub
keys:
- c:/Users/sgrat/.ssh/id_rsa
folders:
- map: Sites\mysite
to: /home/vagrant/mysite
php: '7.2'
type: "smb"
smb_host: 127.0.0.1
smb_username: vagrant
smb_password: vagrant
sites:
- map: mysite.test
to: /home/vagrant/mysite
databases:
- mysitedb
features:
- mariadb: true
- ohmyzsh: false
- webdriver: false
我不能說使用相對文件路徑的有效性,我只記得我在不使用完整路徑時遇到了一些問題。 我正在使用 Git Bash,但除了與您相同的設置之外:Win 10、Hyper-V、Vagrant 2.2.6。
這是我的 Homestead.yaml 文件:
---
ip: "192.168.10.10"
memory: 2048
cpus: 2
provider: virtualbox
authorize: ~/.ssh/id_rsa.pub
keys:
- ~/.ssh/id_rsa
folders:
- map: C:\Users\leif.lundberg\code
to: /home/vagrant/code
type: "nfs"
sites:
- map: homestead.test
to: /home/vagrant/code/symfobase/public
databases:
- homestead
features:
- mariadb: false
另外,我不知道您的keys
映射是否正確,使用正斜杠“/”而不是反斜杠“\”可能會導致問題。
帶有 Hyper-V 的 Windows 10 專業版
流浪者 v.2.2.6
嘗試通過 Powershell 和管理員用戶使用 SMB 共享文件夾啟動 homestead VM,但沒有運氣。
共享“站點”文件夾並創建了一個具有共享文件夾完全訪問權限的專用用戶(usr:vagrant、pwd:vagrant)。
在這方面真的很掙扎。
將共享文件夾設置為Sites\\mysite
(沒有完整路徑),因為我只共享這個特定文件夾,對嗎?
PS C:\Users\sgrat\Desktop\Sites\Homestead> vagrant up --provision
Bringing machine 'homestead' up with 'hyperv' provider...
==> homestead: Verifying Hyper-V is enabled...
==> homestead: Verifying Hyper-V is accessible...
homestead: Configuring the VM...
==> homestead: Starting the machine...
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: start_vm.ps1
Error:
Failed to start VM 'homestead' failed to start.
Synthetic SCSI Controller (Instance ID 480D9BCD-B214-461F-976E-2A9A546F9BB8): Failed to Power on with Error 'General access denied error'.
Account does not have permission to open attachment 'C:\Users\sgrat\Desktop\Sites\Homestead\.vagrant\machines\homestead\hyperv\Virtual Hard Disks\ubuntu-18.04-amd64.vhdx'. Error: 'General access denied error'.
'homestead' failed to start. (Virtual machine ID 555B1C43-AC2B-4B9C-A9B2-94BF40753C40)
'homestead' Synthetic SCSI Controller (Instance ID 480D9BCD-B214-461F-976E-2A9A546F9BB8): Failed to Power on with Error 'General access denied error' (0x80070005). (Virtual machine ID 555B1C43-AC2B-4B9C-A9B2-94BF40753C40)
'homestead': Account does not have permission to open attachment 'C:\Users\sgrat\Desktop\Sites\Homestead\.vagrant\machines\homestead\hyperv\Virtual Hard Disks\ubuntu-18.04-amd64.vhdx'. Error: 'General access denied error' (0x80070005). (Virtual machine ID 555B1C43-AC2B-4B9C-A9B2-94BF40753C40)
ip: "192.168.10.10"
memory: 2048
cpus: 2
provider: hyperv
authorize: c:/Users/sgrat/.ssh/id_rsa.pub
keys:
- c:/Users/sgrat/.ssh/id_rsa
folders:
- map: Sites\mysite
to: /home/vagrant/mysite
php: '7.2'
type: "smb"
smb_host: 127.0.0.1
smb_username: vagrant
smb_password: vagrant
sites:
- map: mysite.test
to: /home/vagrant/mysite
databases:
- mysitedb
features:
- mariadb: true
- ohmyzsh: false
- webdriver: false
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.