mirror of
https://github.com/vagrant-libvirt/vagrant-libvirt.git
synced 2025-02-25 18:55:27 -06:00
Update README on CPU features
This commit is contained in:
parent
c3f1e88066
commit
4554ceb6f0
22
README.md
22
README.md
@ -30,6 +30,7 @@ welcome and can help a lot :-)
|
||||
- [CDROMs](#cdroms)
|
||||
- [Input](#input)
|
||||
- [PCI device passthrough](#pci-device-passthrough)
|
||||
- [CPU Features](#cpu-features)
|
||||
- [No box and PXE boot](#no-box-and-pxe-boot)
|
||||
- [SSH Access To VM](#ssh-access-to-vm)
|
||||
- [Forwarded Ports](#forwarded-ports)
|
||||
@ -542,6 +543,27 @@ Vagrant.configure("2") do |config|
|
||||
end
|
||||
```
|
||||
|
||||
## CPU features
|
||||
|
||||
You can specify CPU feature policies via `libvirt.cpu_feature`. Available options are
|
||||
listed below. Note that both options are required:
|
||||
|
||||
* `name` - The name of the feature for the chosen CPU (see libvirts `cpu_map.xml`)
|
||||
* `policy` - The policy for this feature (one of `force`, `require`, `optional`, `disable` and `forbid` - see libvirt documentation)
|
||||
|
||||
```ruby
|
||||
Vagrant.configure("2") do |config|
|
||||
config.vm.provider :libvirt do |libvirt|
|
||||
# The feature will not be supported by virtual CPU.
|
||||
libvirt.cpu_feature :name => 'hypervisor', :policy => 'disable'
|
||||
# Guest creation will fail unless the feature is supported by host CPU.
|
||||
libvirt.cpu_feature :name => 'vmx', :policy => 'require'
|
||||
# The virtual CPU will claim the feature is supported regardless of it being supported by host CPU.
|
||||
libvirt.cpu_feature :name => 'pdpe1gb', :policy => 'force'
|
||||
end
|
||||
end
|
||||
```
|
||||
|
||||
## USB device passthrough
|
||||
|
||||
You can specify multiple USB devices to passthrough to the VM via `libvirt.usb`. The device can be specified by the following options:
|
||||
|
Loading…
Reference in New Issue
Block a user