Commit Graph

1530 Commits

Author SHA1 Message Date
Wolfgang Link
ba4eea15e6 QemuServer: check snapshot befor rollback
this will check, if it is possibel to rollback a snapshot befor VM will shutdown and get locked.

Signed-off-by: Wolfgang Link <w.link@proxmox.com>
Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
2015-02-12 10:17:53 +01:00
Dietmar Maurer
6e62a21f17 vm_devices_list: make sure $device->{'qdev_id'} is set 2015-02-12 08:31:22 +01:00
Alexandre Derumier
200644a7f9 vm_devices_list : list devices behind pci bridge
This fix hotplug for devices behind bridges, like nic6->24 for example

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2015-02-12 08:31:22 +01:00
Dietmar Maurer
4de1bb2523 fix CDROM hotplug 2015-02-12 08:00:14 +01:00
Dietmar Maurer
996635e58d cleanup error messages 2015-02-12 07:11:17 +01:00
Dietmar Maurer
a0b79d95fe bump version to 3.3-16 2015-02-11 06:32:40 +01:00
Stefan Priebe
f8fa2ed734 QemuServer: fix wrong binding of pci root ports, bridges or switches to vfio
Signed-off-by: Stefan Priebe <s.priebe@profihost.ag>
2015-02-11 06:31:41 +01:00
Dietmar Maurer
515c82a9b7 update changelog 2015-02-10 13:01:54 +01:00
Wolfgang Link
8ead5ec7dc bug 597: hotplug fix
wrap params in dopple quotes, so spaces will accept.

Signed-off-by: Wolfgang Link <w.link@proxmox.com>
2015-02-10 13:01:24 +01:00
Alexandre Derumier
51a6f637d2 memory hotplug option is not hotpluggable
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2015-02-10 06:32:08 +01:00
Dietmar Maurer
3605aaa626 bump version to 3.3-15 2015-02-09 07:05:29 +01:00
Alexandre Derumier
e059fb4ded add foreach_dimm sub
and use it in memory hotplug and config_to_cmd

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2015-02-09 07:04:16 +01:00
Dietmar Maurer
cd9698629f bump version to 3.3-14 2015-01-28 07:12:11 +01:00
Alexandre Derumier
4d3f29edd4 memory hotplug patch v10
This patch allow to hotplug memory dimm modules
though a new option : dimm_memory

The dimm modules are generated from a map

     dimmid       size  dimm_memory
     dimm0        512        512     100.00 0
     dimm1        512       1024      50.00 1
     dimm2        512       1536      33.33 2
     dimm3        512       2048      25.00 3
     dimm4        512       2560      20.00 0
     dimm5        512       3072      16.67 1
     dimm6        512       3584      14.29 2
     dimm7        512       4096      12.50 3
     dimm8        512       4608      11.11 0
     dimm9        512       5120      10.00 1
    dimm10        512       5632       9.09 2
    dimm11        512       6144       8.33 3
    dimm12        512       6656       7.69 0
    dimm13        512       7168       7.14 1
    dimm14        512       7680       6.67 2
    dimm15        512       8192       6.25 3
    dimm16        512       8704       5.88 0
    dimm17        512       9216       5.56 1
    dimm18        512       9728       5.26 2
    dimm19        512      10240       5.00 3
    dimm20        512      10752       4.76 0
    ...

   dimm241      65536    3260416       2.01 1
   dimm242      65536    3325952       1.97 2
   dimm243      65536    3391488       1.93 3
   dimm244      65536    3457024       1.90 0
   dimm245      65536    3522560       1.86 1
   dimm246      65536    3588096       1.83 2
   dimm247      65536    3653632       1.79 3
   dimm248      65536    3719168       1.76 0
   dimm249      65536    3784704       1.73 1
   dimm250      65536    3850240       1.70 2
   dimm251      65536    3915776       1.67 3
   dimm252      65536    3981312       1.65 0
   dimm253      65536    4046848       1.62 1
   dimm254      65536    4112384       1.59 2
   dimm255      65536    4177920       1.57 3

max dimm_memory size is 4TB, which is the current qemu limit

If the dimm_memory value is not aligned on memory module, we align the dimm_memory on the next module.

vmid.conf
---------
memory: 1024
numa:1
hotplug: memmory

when hotplug memory option is enabled, the minimum memory value must be 1GB, and also numa need to be enabled.

we assign the first 1GB as static memory, splitted on each numa nodes.
The remaining memory is assigned on hotpluggable dimm devices.

The static memory need to be also 128MB aligned, to have other dimm devices aligned too.

This 128MB alignment is a linux limitation, windows can align on 2MB size.

Numa need to be aligned, as linux guest don't boot on some setup with multi sockets,
and windows need numa to be able to hotplug memory

hotplug
----
qm set <vmid> -memory X    (where X is bigger than current value)

unplug (not yet implemented in qemu)
------
qm set <vmid> -memory X  (where X is lower than current value)

linux guest
-----------
-acpi hotplug module should be loaded in guest
-need a recent kernel. (tested with 3.10)

can be enable automaticaly, adding:

/lib/udev/rules.d/80-hotplug-cpu-mem.rules
SUBSYSTEM=="cpu", ACTION=="add", TEST=="online", ATTR{online}=="0", \
 ATTR{online}="1"

SUBSYSTEM=="memory", ACTION=="add", TEST=="state", ATTR{state}=="offline", \
 ATTR{state}="online"

windows guest
-------------

tested with:

- windows 2012 standard
- windows 2008 enterprise/datacenter

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2015-01-28 07:06:37 +01:00
Dietmar Maurer
d2896a14d5 bump version to 3.3-13 2015-01-27 12:39:48 +01:00
Dietmar Maurer
45827685a7 use PVE::Tools::split_list 2015-01-27 11:05:36 +01:00
Dietmar Maurer
b3c2bdd1f1 hotplug config: allow to enable specific features 2015-01-27 07:16:22 +01:00
Dietmar Maurer
a74c93d377 bump version to 3.3-12 2015-01-23 08:05:07 +01:00
Alexandre Derumier
8edc9c08aa enable vcpus hotplug
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2015-01-22 11:01:21 +01:00
Alexandre Derumier
de9d1e5574 add vcpus option
vcpus = current allocate vpus to virtual machine

maxcpus is now compute from $sockets*cores
vcpus = maxcpus if not defined

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2015-01-22 11:01:15 +01:00
Dietmar Maurer
70b048219e apply pending changes at vm_stop 2015-01-21 10:42:43 +01:00
Dietmar Maurer
029e4c137e bump version to 3.3-11 2015-01-21 08:58:47 +01:00
Dietmar Maurer
7196b757e7 enable hotplug by default 2015-01-21 08:57:44 +01:00
Dietmar Maurer
25088687fe Add link_down flag to network config
Original patch by Wolfgang, adopted for new hotplug implementation.

I do not verify link status, because that patch was rejected upstream.

Signed-off-by: Wolfgang Link <wolfgang@linksystems.org>
Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
2015-01-20 11:51:19 +01:00
Wolfgang Link
fbda796564 Change check for better understanding!
Signed-off-by: Wolfgang Link <wolfgang@linksystems.org>
2015-01-20 07:57:42 +01:00
Dietmar Maurer
e7a43f20a2 bump version to 3.3-10 2015-01-20 07:16:14 +01:00
Kamil Trzcinski
55034103fe Support additional e1000 variants for VM machines
It is required for OS X on qemu

Signed-off-by: Kamil Trzcinski <ayufan@ayufan.eu>
2015-01-20 07:15:05 +01:00
Dietmar Maurer
6271650ec8 bump version to 3.3-9 2015-01-15 06:23:36 +01:00
Alexandre Derumier
0e54e1c8bd pending api : fix parsing 0 value
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2015-01-15 06:22:09 +01:00
Dietmar Maurer
8fe689e7fd fix test for ballon hotplug 2015-01-12 15:04:31 +01:00
Stefan Priebe
cf71f776cb set boot strict=on to prevent booting from not listed boot devices
Signed-off-by: Stefan Priebe <s.priebe@profihost.ag>
2015-01-12 15:00:58 +01:00
Stefan Priebe
5e2068d285 do not set romfile= if network is not in boot order
Signed-off-by: Stefan Priebe <s.priebe@profihost.ag>
2015-01-12 15:00:55 +01:00
Dietmar Maurer
d14ccfd28a bump version to 3.3-8 2015-01-08 13:35:07 +01:00
Dietmar Maurer
4c8365fafa fix previous commit: forgot API definitions 2015-01-08 09:04:18 +01:00
Dietmar Maurer
d3df8cf350 update_vm api : add optionnal revert option
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
2015-01-07 11:09:30 +01:00
Dietmar Maurer
81d95ae1a8 code cleanup 2015-01-07 10:20:35 +01:00
Alexandre Derumier
9c2f70692e fix balloon pending update
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2015-01-07 08:39:08 +01:00
Alexandre Derumier
6f9a607037 don't try to hotplug|unplug ide && sata drive
We can't hotplug theses devices,
so we can avoid to throw always an error when adding them

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2015-01-07 08:36:02 +01:00
Dietmar Maurer
6d89b548e1 add optionnal current param to config api
config api return by default the pending config, like this it don't break current behaviour

Add an optionnal current param to get to current running config

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
2015-01-07 08:31:32 +01:00
Dietmar Maurer
df2a2dbbe1 API: list new 'pending' method 2015-01-07 08:14:14 +01:00
Alexandre Derumier
19120f9967 pending : add disk hot-unplug
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2015-01-07 06:54:57 +01:00
Dietmar Maurer
915d3481b3 remove unused code
Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
2015-01-07 06:44:45 +01:00
Dietmar Maurer
38c590d9f6 vmconfig_update_net: do not call vm_deviceplug() if hotplug == 0
Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
2015-01-07 06:44:39 +01:00
Dietmar Maurer
a05cff86e7 vmconfig_hotplug_pending : add update_disk
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
2015-01-07 06:44:30 +01:00
Dietmar Maurer
fee4667503 vm_deviceplug: always raise exception on error
Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
2015-01-07 06:44:17 +01:00
Dietmar Maurer
63c2da2f1a vm_deviceunplug: raise expection if something fail
Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
2015-01-07 06:44:11 +01:00
Dietmar Maurer
3eec576714 vmconfig_hotplug_pending : add update_net
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
2015-01-07 06:43:11 +01:00
Dietmar Maurer
e56beedaba vmconfig_hotplug_pending: correctly skip values
Do not use $skip variable (simply raise an exception)

Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
2015-01-07 06:43:05 +01:00
Dietmar Maurer
281fedb364 rename qemu_bridgeadd to qemu_add_pci_bridge
To make it obvious that we add a PCI device, and not a network bridge.

Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
2015-01-07 06:43:01 +01:00
Dietmar Maurer
1e7f272634 implement API/CLI to get pending changes
Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
2015-01-07 06:42:55 +01:00