5
0
mirror of git://git.proxmox.com/git/qemu-server.git synced 2025-02-02 09:47:13 +03:00

820 Commits

Author SHA1 Message Date
Wolfgang Link
4dcc780c2a If we freeze the fs with the Qemu-Guest-Agent test if QGA is running. 2016-02-15 12:50:14 +01:00
Fabian Grünbichler
8317c759bf Drop skiplock from write_config
Since write_config was always called with skiplock=1 except
once, it makes sense to drop this parameter like in
PVE::LXC::write_config . If needed in the future, the
caller can use check_lock before write_config anyway.
2016-02-12 12:16:57 +01:00
Fabian Grünbichler
63be43a947 Refactor update_config_nolock -> write_config
The method update_config wrapped update_config_nolock
using lock_config, but to prevent update races the whole
"read config", "do something", "write config" flow was
always protected by lock_config anyway, and update_config
was never called.

Thus, we can safely drop update_config and rename
update_config_nolock to write_config like in PVE::LXC .
2016-02-12 12:14:52 +01:00
Dominik Csapak
a6b9aee42a use better usb config parsing
since we want the usb3 option to be really boolean and not only
'usb3=yes', we have to change the usb json format a little

to not break existing configs for 'usbX: spice', we set the 'host'
option as non-optional and default_key and allow 'spice' as its
content (this also makes the option less ambiguous)

another side effect is that previously accepted multiple 'host='
entries are now forbidden

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2016-02-11 16:42:24 +01:00
Wolfgang Bumiller
c0f7406e93 remove a superfluous condition
This is only reached if the $line from which $virtdev
originates matches, and the part in $virtdev can never be
false then.
2016-02-10 17:46:54 +01:00
Wolfgang Bumiller
d9faf79016 restore: deal with new backup=0 property string 2016-02-10 17:45:56 +01:00
Dominik Csapak
da8b4189d8 add usb3 option for usb-devices
adding a flag for usb devices (usb3), if this is set to yes,
add a xhci controller and attach the specified devices to it

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2016-02-10 17:33:26 +01:00
Wolfgang Bumiller
15cc878469 pass $skiplock all the way through to destroy_vm
The API passes $skiplock to vm_destroy() which performed a
check conditionally depending on the $skiplock parameter and
then simply calls destroy_vm() inside lock_config() which
did yet another check_lock() without any way to avoid that.

Added the $skiplock parameter to destroy_vm() and removed
the conditional check in vm_destroy() as both happened after
locking the config.
2016-02-08 11:52:23 +01:00
Alexandre Derumier
f7b4356fe6 disk hotplug : allow hotplug of physical host /dev/ disks
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2016-02-04 18:09:38 +01:00
Wolfgang Link
386c6ba7f5 close tunnel after migration is finish.
if we do not close it, there is a change that the tunnel stays open and the next migration will not work.
2016-02-02 18:16:18 +01:00
Wolfgang Bumiller
7d4e30f389 detect_zeroes is a boolean 2016-01-29 12:21:59 +01:00
Wolfgang Bumiller
47c28a687c Fix #878: disk-size format
disk-size is a format, not a type
2016-01-29 10:04:05 +01:00
Wolfgang Bumiller
bea021ac3c Fix #879: exclusion of disk for backup
With the change to a property string the backup and iothread
properties were changed from type string to type boolean and
need to be treated as such.
2016-01-29 10:03:54 +01:00
Wolfgang Link
3457d090c6 Create firewall dir on VM restore 2016-01-28 11:02:55 +01:00
Thomas Lamprecht
0dbcc8c9a1 fix PVE::HA use clause so HA resources get registered
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2016-01-27 17:08:21 +01:00
Wolfgang Bumiller
16a91d65f3 add hidden option to cpu type
This passes kvm=off to qemu's -cpu switch to disable KVM
identification via the cpuid instruction.
2016-01-26 16:57:13 +01:00
Wolfgang Link
5b61bff247 Use format raw if a disk is passthrough to VM.
To prevent error at VM starting, when we passthrough a harddrive from host to vm.
2016-01-25 17:32:21 +01:00
Dietmar Maurer
eb15b9f074 clone: correctly activate volumes (consider snapshots) 2016-01-22 11:54:34 +01:00
Wolfgang Bumiller
16d08ecfc3 use safe_string_ne for trunks
It's a list of numbers, not just one.
2016-01-18 11:00:28 +01:00
Alexandre Derumier
c30aea2b10 add support for network trunks
This add support for net trunks vlan filtering
for ovs and linux vlan-aware bridge

Can be mixed with current "tag" option

examples:
----------

allow only 802.1Q packets with vlanid 2,3,4 :

netx: .....,trunks=2,3,4

allow only 802.1Q packets with vlanid 2,3,4 and tag non-802.1Q packets to vlanid 5 :

netx: tag=5,trunks=2,3,4

tag non-802.1Q packets to vlanid 5

netx: tag=5
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2016-01-15 17:23:59 +01:00
Wolfgang Bumiller
0541eeb88b use property strings for drive options 2016-01-14 16:40:37 +01:00
Wolfgang Bumiller
bd27e851d3 use property string for smbios1 2016-01-14 16:36:23 +01:00
Wolfgang Bumiller
ff0394e04c Closes #787: add Haswell-noTSX and Broadwell-noTSX cpu types 2016-01-13 16:41:28 +01:00
Wolfgang Bumiller
277ca170b4 io throttle: pass pool parameters (*_max)
These have been passed but haven't been used.
2016-01-13 06:17:01 +01:00
Alexandre Derumier
230a438200 ovmf : don't pass x-vga to vfio-pci
x-vga vfio-pci flag is to enable seabios quirks only.

This patch keep using x-vga=on from proxmox config, to disable hyperv,kvm=off,vga=none by default
but don't pass x-vga to vfio-pci when ovmf is enabled.

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2016-01-10 15:10:26 +01:00
Wolfgang Bumiller
98cbd0f47e check for qorum when starting a VM 2016-01-10 14:55:25 +01:00
Alexandre Derumier
2315b39c8a disable hyper-v enlightment when xvga is enabled
Geforce drivers (> 344.11) crash with code43 error if they detect hyper-v enlighment with pci passtthrough
http://awilliam.github.io/presentations/KVM-Forum-2014/#/5/3

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2016-01-04 06:26:02 +01:00
Wolfgang Bumiller
6e47c3b4b7 add detect_zeroes option
On some storages BLKZEROOUT commands do not work properly
and return without error while having no effect whatsoever.
This can produce various filesystem errors and thus needs
to be made optional.

A drive can now have 'detect_zeroes=off' to disable this
behavior. By default the behavior is the same as before:
always-on (and set to 'unmap' if discard is enabled).
2015-12-18 09:19:18 +01:00
Wolfgang Bumiller
77019edfe0 fix bug #841: replace get_used_paths with is_volume_in_use
get_used_paths returned a hash of used paths for all the
volumes in a VM's config, which is not enough to figure out
whether there are snapshots, as snapshots often have
different paths.  Eg. on ZFS it is not enough to check for
/dev/zvol/tank/vm-123-disk-1 because the snapshot's path is
/dev/zvol/tank/vm-123-disk-1@snap1 and thus we allowed
deleting the drive. Then when trying to delete the snapshot
later you get:
  zfs error: cannot open 'tank/vm-751-disk-1': dataset does not exist
and it refuses to delete the snapshot.

Since its only use was to check whether or not a drive is
still in use it is now renamed to is_volume_in_use and
beside checking paths now also checks volume-ids as those
should stay the same.
2015-12-10 12:13:12 +01:00
Dietmar Maurer
2bd70893fb always copy OVMF_VARS-pure-efi.fd file
To avoid the impression that we can store BIOS settings. They also
gets lost when we migrate the VM.
2015-12-10 11:11:02 +01:00
Dietmar Maurer
3edb45e749 introcude new 'bios' option (replace ovmf option) 2015-12-10 10:48:04 +01:00
Alexandre Derumier
a783c78e0d add ovmf uefi roms support V2
changelog:

use OVMF-pure-efi.fd instead OVMF_CODE-pure-efi.fd to have virtio drivers support

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2015-12-09 17:45:15 +01:00
Thomas Lamprecht
ab5904f7e0 qm: Add VMID auto completion to some commands
Add the respective completion function for the:
*) start
*) stop
*) shutdown
*) suspend
*) resume
*) sendkey
qm commands. The destroy command was left out on purpose for now.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2015-12-09 12:21:09 +01:00
Wolfgang Bumiller
1b2761c07c fix bug #828: activate disks before hotplugging them 2015-11-27 16:57:19 +01:00
Wolfgang Link
6738ab9c59 restore firewall config from backup 2015-11-26 11:50:00 +01:00
Wolfgang Link
c05f7f3f40 firewall config will now include in the backup and write to vma file. 2015-11-26 11:23:14 +01:00
Alexandre Derumier
1f720e28c7 reenable steal time
we have fixed it in kernel last month
https://www.mail-archive.com/pve-devel@pve.proxmox.com/msg14072.html

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2015-11-26 09:18:08 +01:00
Dietmar Maurer
ea002a8f6d fix bug #783: set KillMode=none, so that systemd don't kill them at shutdown 2015-11-24 16:52:22 +01:00
Emmanuel Kasper
d44712fc43 Don't treat serial devices as a local resource if they point to a socket.
Close: https://bugzilla.proxmox.com/show_bug.cgi?id=470
2015-11-13 07:01:12 +01:00
Dietmar Maurer
6bb91c1797 qemu_img_convert: activate source volume
For example, this is required if we copy from lvmthin snapshots.
2015-11-12 11:16:50 +01:00
Wolfgang Link
c4c844ef8e improve complete_storage, only show storages which have the capability to run qemu images. 2015-11-10 07:46:27 +01:00
Dietmar Maurer
db593da26c destroy VM: test for running VM before starting background task 2015-11-07 12:09:01 +01:00
Alexandre Derumier
208ba94e96 add pve-bridge-hotplug script
use it for nic hotplug, because pve-bridge script will
not work after a live migration, because of the PVE_MIGRATED_FROM env var.

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2015-11-06 16:22:54 +01:00
Alexandre Derumier
8718099ce4 nic hotplug : use pxe roms for older machinetype
we want to avoid mix some nics with pxe rom and other with efi rom.

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2015-11-06 10:51:59 +01:00
Alexandre Derumier
249c4a6c75 add qemu_use_old_bios_files sub
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2015-11-06 10:51:48 +01:00
Alexandre Derumier
42dbd2ee30 add qemu_machine_pxe
return machinename with .pxe suffix if a nic with pxe romfile exist

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2015-11-06 10:51:14 +01:00
Alexandre Derumier
7bac824e19 use qom-get to check if pxe file are used V2
fix qemu 2.4 pxe -> qemu 2.4 efi

Changelog : forget to add a check on qom-get result

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2015-11-06 07:55:07 +01:00
Wolfgang Bumiller
407e0b8bef migration: improve ipv6 case
Qemu parses hostnames in brackets correctly but sets an ipv6
flag for them as if they were ipv6 addresses, only insert
brackets for ipv6 addresses.
2015-11-06 07:53:03 +01:00
Wolfgang Bumiller
34456bf02e clone: use a fullclone hash instead of $drive->{full}
'full' is not a valid drive property which are now being
checked in print_property_string. Since it's only a
temporary value and passed to clone_disk as parameter it
can be stored separately.
2015-10-30 07:06:10 +01:00
Dietmar Maurer
c13e17d0d4 Revert "fix bug 790: encode description before writing to syslog"
This reverts commit 9ac5db408db2dc2380add3090bdd9e04f97e576c.

This is now fixed by a change in PVE::Cluster::log_msg().
2015-10-29 17:44:17 +01:00