40-vm-hotadd.rules 613 B

1234567891011121314
  1. # On Hyper-V and Xen Virtual Machines we want to add memory and cpus as soon as they appear
  2. ATTR{[dmi/id]sys_vendor}=="Microsoft Corporation", ATTR{[dmi/id]product_name}=="Virtual Machine", GOTO="vm_hotadd_apply"
  3. ATTR{[dmi/id]sys_vendor}=="Xen", GOTO="vm_hotadd_apply"
  4. GOTO="vm_hotadd_end"
  5. LABEL="vm_hotadd_apply"
  6. # Memory hotadd request
  7. SUBSYSTEM=="memory", ACTION=="add", DEVPATH=="/devices/system/memory/memory[0-9]*", TEST=="state", ATTR{state}="online"
  8. # CPU hotadd request
  9. SUBSYSTEM=="cpu", ACTION=="add", DEVPATH=="/devices/system/cpu/cpu[0-9]*", TEST=="online", ATTR{online}="1"
  10. LABEL="vm_hotadd_end"