Windows开机自动启动Virtual Box虚拟机(官方指南手册)

网址: https://www.virtualbox.org/manual/ch09.html#autostart-windows

9.21.4. Windows: Starting the Autostart Service

On Windows, autostart functionality consist of two components. First one is configuration file where the administrator can both set delayed start of the VMs and temporary disable autostarting for the particular user. The configuration file should be located in the folder accessible by all required users but it should have permissions allowing the only reading by everyone but administrators. The configuration file contains several options. One is default_policy which controls whether the autostart service allows or denies to start a VM for users which are not in the exception list. The exception list starts with exception_list and contains a comma separated list with usernames. Furthermore a separate startup delay can be configured for every user to avoid overloading the host. A sample configuration is given below:

# Default policy is to deny starting a VM, the other option is "allow".
default_policy = deny

# Bob is allowed to start virtual machines but starting them
# will be delayed for 10 seconds
bob = {
    allow = true
    startup_delay = 10
}

# Alice is not allowed to start virtual machines, useful to exclude certain users
# if the default policy is set to allow.
alice = {
    allow = false
}

The user name can be specified using the following forms: "user", "domain\user", ".\user" and "user@domain". Administrator must add the VBOXAUTOSTART_CONFIG environment variable into system variables containing the path to the configuration file described above. The environment variable tells the autostart services what configuration file is used.

Second component of autostart functionality is Windows service, every instance of it works on behalf of particular user using its own credentials.

To enable autostarting for a particular user, a member of the administrators group must run the following command:

VBoxAutostartSvc install --user=user [--password-file=password_file]

The password file should contain the password followed by a line break. The rest of the file is ignored. The user will be asked for a password if the password file is not specified.

To disable autostarting for particular user, a member of the administrators group must run the following command:

VBoxAutostartSvc delete --user=user

If a user has changed their password then a member of the administrators group must either reinstall the service or change the service credentials using Windows Service Manager. Due to Windows security policies, the autostart service cannot be installed for users with empty passwords.

Finally, the particular user should define which VM should be started at boot or not. The user should run the following command for every VM it desired to start at boot:

VBoxManage modifyvm VM name or UUID --autostart-enabled on

The user can remove the particular VM from the VMs starting at boot by running the following command:

VBoxManage modifyvm VM name or UUID --autostart-enabled off
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值