Commit Graph

540 Commits

Author SHA1 Message Date
Wolfgang Bumiller
17677004cc refuse to add non-replicatable disks to replicating VMs
Unless replication is explicitly disabled for them.
2017-06-27 10:37:07 +02:00
Thomas Lamprecht
0276584456 API HA tasks: we request states not execute them
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2017-06-27 07:59:12 +02:00
Dietmar Maurer
7c876ec165 PVE/API2/Qemu.pm: cleanup - remove unused $upid parameter 2017-06-12 11:09:47 +02:00
Dietmar Maurer
f53c6ad8b9 PVE/API2/Qemu.pm: aquire guest_migration_lock inside worker 2017-06-12 11:05:46 +02:00
Wolfgang Link
c068c1c3a9 Add a migration lock to avoid a replication on rollback-time. 2017-06-12 10:58:49 +02:00
Dominik Csapak
af6d2db4b3 check also pending changes when reverting/deleting
otherwise we are not able to revert/delete pending changes which
introduce a new config line

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2017-05-31 11:40:14 +02:00
Dietmar Maurer
95f42d61fa migrate: aquire guest_migration_lock during migration
To block replication jobs.
2017-05-31 07:57:03 +02:00
Dietmar Maurer
628bb7f231 do not allow destroy if there are replication jobs 2017-05-31 07:53:58 +02:00
Dietmar Maurer
3ab7663a91 remove 'replicate' configuration - we will store that in another file 2017-05-31 07:53:57 +02:00
Thomas Lamprecht
6318daca96 improve error on '{full, linked} clone not available' error
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2017-05-24 11:29:26 +02:00
Dominik Csapak
dd32a4664f use ReuseAddr for vncproxy
to avoid "Socket already in use" errors, when quickly opening/closing
console sessions on the webinterface

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2017-05-17 13:38:54 +02:00
Wolfgang Bumiller
175b51fdb5 Fix #1361: create disk: stricter parsing of storage:size
This fixes paths such as
/dev/disk/by-id/some-ID:0.5
being interpreted as a request to create a 0.5G-sized disk
in the storage named '/dev/disk/by-id/some-ID'.
2017-05-10 10:31:25 +02:00
Dietmar Maurer
3aa44d3b57 move get_replicatable_volumes from QemuServer.pm to QemuConfig.pm 2017-05-06 17:13:31 +02:00
Dietmar Maurer
64932aebff PVE::QemuServer::create_disks - run code inside eval
So that we can free allocated volumes ins something fails.

Thi bug was introduced with commit ae57f6b352
2017-05-06 17:00:20 +02:00
Dietmar Maurer
0342b45bee get_replicatable_volumes: replacemnet for PVE::ReplicationTools::get_syncable_guestdisks()
correctly scan for volumes inside snapshots.

This will also solve the cyclic package dependency propblem.
2017-05-06 15:11:46 +02:00
Dietmar Maurer
2286cb8c23 use a single replicate property (format pve-replicate) 2017-05-06 10:35:08 +02:00
Dominik Csapak
2c7fc94783 start vncproxy worker in the background
this allows it to use the vncproxy api call to use from pvesh,
because before we waited until the task finished to get the vncticket
which was too late

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2017-05-03 08:35:03 +02:00
Wolfgang Bumiller
6d449202ba api: replica: safer config update
Configuration updates should only happen if and after their
change has successfully taken effect.
2017-04-28 10:40:22 +02:00
Wolfgang Link
9b49ba658f Destroy all remote and local replication datasets when a VM will destroyed. 2017-04-28 10:11:33 +02:00
Wolfgang Link
9edac22f5f Insert new properties in the Qemu config for the PVE Replica.
This patch will include all necessary properties for the replication.
Also will it enable and disable a replication job
when appointed flags are set or deleted.
2017-04-28 10:11:33 +02:00
Alexandre Derumier
d80ad67f9d live storage migration : fix check of target storage availability
if we define a different target storeid for remote node,
and that storage is not available on source node

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2017-04-21 12:05:36 +02:00
Dominik Csapak
058ff55b39 turn off alarm timer after accepting a vnc connection
else we always get a failed task when the vnc connection is
running longer than $timeout

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2017-04-18 14:14:07 +02:00
Fabian Grünbichler
d2c6bf93ae update_vm: check whether opt is set before deleting
otherwise we get lots uninitialized warnings:

update VM 600: -delete unused7
Use of uninitialized value $data in split at /usr/share/perl5/PVE/JSONSchema.pm line 533.
Use of uninitialized value in concatenation (.) or string at /usr/share/perl5/PVE/API2/Qemu.pm line 1012.
Use of uninitialized value $volid in pattern match (m//) at /usr/share/perl5/PVE/QemuServer.pm line 1824.
Use of uninitialized value $volid in pattern match (m//) at /usr/share/perl5/PVE/Storage/Plugin.pm line 201.
Use of uninitialized value $volid in concatenation (.) or string at /usr/share/perl5/PVE/Storage/Plugin.pm line 205.

vs:

update VM 600: -delete unused7
cannot delete 'unused7' - not set in current configuration!

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2017-03-23 11:41:12 +01:00
Emmanuel Kasper
e248477e92 Use backticks instead of single quotes in qm resize description
Single quoted text in asciidoc is rendered in man pages
with underlines, which makes the '+' symbol very similar to '+/-'

Backticks are rendered with monospace text in HTML, normal text
in man pages, and still readable in raw format.
2017-03-02 10:38:19 +01:00
Wolfgang Bumiller
655d746212 remove netcat6 dependency
By simply using a socket.
2017-02-28 12:23:42 +01:00
Emmanuel Kasper
9a478b17c0 Improve error message when trying to shrink a volume, fix typo 2017-02-17 09:09:49 +01:00
Wolfgang Bumiller
9f11fc5fa2 don't pull HA modules for doc-generation 2017-02-06 16:13:30 +01:00
Fabian Grünbichler
fbd7dcce4d fix #1260: convert moved template disk to base
this was already possible manually via "qm template", but
doing it automatically when moving a disk of a template
makes more sense.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2017-01-26 10:03:20 +01:00
Dietmar Maurer
9bb3acf155 use new PVE::Storage::check_volume_access() 2017-01-18 17:23:03 +01:00
Alexandre Derumier
56af714629 add with-local-disks option for live storage migration
As Fabian as required,
add an extra flag "with-local-disks"  to enable live storage migration with localdisk.

default target storage is same sid than source, this can be overrided with
"targetstorage" option.

I will try improve this later, with optionnal mapping, disk by disk.

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2017-01-06 12:10:25 +01:00
Wolfgang Bumiller
bd2d5fe6ff cleanup: error messages 2017-01-05 10:03:16 +01:00
Wolfgang Bumiller
3b4cf0f0fc cleanup: whitespaces & style 2017-01-05 10:03:10 +01:00
Alexandre Derumier
5619e74aed live clone_vm : suspend or freezefs before block-job-cancel
if qga is enabled, we try to freeze the fs before cancelling block job.
if not , we pause the vm.

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2017-01-05 09:09:46 +01:00
Alexandre Derumier
b74cad8ae3 add live storage migration with vm migration
This allow to migrate disks on local storage  to a remote node storage.

When the target node start, a new volumes are created and exposed through qemu embedded nbd server.

qemu drive-mirror is launch on source vm for each disk with nbd server as target.

when drive-mirror reach 100% of 1 disk, we don't complete the block jobs and begin mirror of next disk.
(mirroring are parralel, but we try to mirroring them 1 by 1 to avoid storage && network overload)

Then we live migrate the vm to destination node. (drive-mirror still occur at the same time).

We the vm is livemigrate (source vm paused, target vm pause), we complete the block jobs mirror.

When is done we stop the source vm and resume the target vm

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2017-01-05 09:09:46 +01:00
Alexandre Derumier
2189246c5c add targetstorage to vm_start
This will create a new drive for each local drive found,
and start the vm with this new drives.

if targetstorage == 1, we use same sid than original vm disk

a nbd server is started in qemu and expose local volumes to network port

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2017-01-05 09:09:46 +01:00
Alexandre Derumier
c6fdd002b2 clone live vm : add support for multiple jobs
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2017-01-05 09:09:46 +01:00
Dietmar Maurer
249d8fedd8 qm agent: remove 'guest-' prefix from commands 2016-12-01 07:57:26 +01:00
Dietmar Maurer
57bdd45943 qm agent: directly return result
This is required for correct error handling. The previous
code simply cought all exceptions.
2016-12-01 07:23:16 +01:00
Dietmar Maurer
a5d5341cb2 qm agent: enumerate possible guest commands 2016-12-01 07:18:31 +01:00
Dietmar Maurer
c07a9e3d64 cleanup: reorder code so that emacs font-lock-mode works again
This is just a work around for emacs bugs.
2016-11-30 13:07:52 +01:00
Dietmar Maurer
f38c5e270f qm agent: add command line completion for vmid 2016-11-30 12:47:03 +01:00
Wolfgang Link
d1a474273b Add qm agent.
This command makes it possible to run commnads on the Qemu-Guest-Agent if it is installed and running.
2016-11-30 12:30:31 +01:00
Fabian Grünbichler
a8f2f42714 restrict monitor API to Sys.Modify for most commands
because these allow adding arbitrary devices to VMs (and
other potentially dangerous things).

whitelist 'info *' and 'help' as usable with just
VM.Monitor, if more are desired and requested they can be
added later.
2016-11-23 10:02:06 +01:00
Dietmar Maurer
ae849692d9 vm_shutdown: request 'stopped' state for HA enabled VMs 2016-11-23 08:03:08 +01:00
Dietmar Maurer
29ddbe702b combine option 'format' with previous line (avoid emacs confusion) 2016-11-23 06:40:33 +01:00
Dietmar Maurer
e0feef86ee use ha-manager 'stopped' state instead of 'disabled' 2016-11-23 06:23:21 +01:00
Thomas Lamprecht
2a7e2b82bb switch to 'ha-manager set'
ha-manager enabled/disabled will get removed

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2016-11-19 10:02:45 +01:00
Wolfgang Bumiller
f90912016a fix a perl warning when failing to parse a new drive string 2016-11-03 09:57:40 +01:00
Thomas Lamprecht
2de2d6f74e allow dedicated migration network, bug #1177
Without this patch we use the network were the cluster traffic runs
for sending migration traffic. This is not ideal as it may hinder
cluster traffic. Further some users have a powerful network which
would be perfect for migrations, with this patch they can run the
migration traffic over such a network without having the corosync
traffic on the same network.

The network is configurable through /etc/pve/datacenter.cfg which
got a new property, namely migration. migration has two
subproperties: type (replaces the old migration_unsecure property)
and network.

For the case of a network failure or that a VM has to be moved over
another network for arbitrary other reasons I added the
migration_type and migration_network parameters to qm migrate (and
respectively vm_start as this gets used on migration).
They allow overwriting the datacenter.cfg settings.

Fixes bug #1177

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2016-11-03 09:51:23 +01:00
Dietmar Maurer
e261de405e snapshot_list: add bash completion for vmid 2016-10-19 11:57:53 +02:00
Emmanuel Kasper
94a17e1dea Fix typo 2016-10-18 09:09:10 +02:00
Dominik Csapak
02daf96a15 fix #1131: activate volume before copying efidisk
before copying the efidisk image to a storage,
we first have to activate the volume

also, add the -n flag to qemu-img convert (prevents
creation of the target volume)

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2016-10-07 08:20:51 +02:00
Fabian Grünbichler
3a07a8a9ff forbid restore into existing template 2016-09-15 14:14:46 +02:00
Dominik Csapak
1a35631aab copy efivars disk on create
when we create the efidisk0 over the api,
we discard the size, and create a 128kbyte vdisk
and copy it there with qemu-img convert

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2016-09-08 11:19:04 +02:00
Fabian Grünbichler
dcce9b468d add lock check for move_disk API call
this API call changes the config quite drastically, and as
such should not be possible while an operation that holds a
lock is ongoing (e.g., migration, backup, snapshot).
2016-07-26 11:31:32 +02:00
Fabian Grünbichler
32acc380d3 deactivate new volumes after clone to other node
this might otherwise lead to volumes activated on the
source and target node, which is problematic for at least
LVM and Ceph.
2016-07-14 12:31:36 +02:00
Wolfgang Bumiller
b5b9979081 pass datacenter.cfg's mac_prefix to random_ether_addr 2016-07-14 09:02:24 +02:00
Wolfgang Bumiller
84b31f488c Fix #1051: typo: vpcus -> vcpus
Otherwise only root can change this setting.
2016-07-11 14:47:04 +02:00
Fabian Grünbichler
a3d0bafba5 remove old move disk snapshot check
this is no longer needed, if the moved disk was referenced
by a snapshot we have already died early, and the config is
locked.
2016-07-04 08:29:16 +02:00
Fabian Grünbichler
9dbf9b5417 fix #1040: warn early about moving a snapshotted disk
die if "delete source disk" is enabled, because a disk that
is referenced by snapshots must not be deleted.
2016-07-04 08:29:16 +02:00
Dominik Csapak
63d269d79e fix unnecessary root check for unused disks
we needed root@pam rights to remove an unused disk
from a vm (instead of the correct Storage rights)

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2016-06-10 10:36:34 +02:00
Dominik Csapak
6bcacc21b3 fix serial/parallel/numa permissions
moved numa\d+ persmission to VM.Config.CPU
and serial/parallel to root since it accesses the host hardware

also renamed remainingoptions to generaloptions to
reduce confusion, since the real remaining options
(those that we do not specify) require root

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2016-06-01 12:56:54 +02:00
Dominik Csapak
58cb690b06 fix #1010: whitelist options for permissions
instead of defaulting to VM.Config.Options for
all options not checked seperately, we
now have lists for the different config permissions
and check them accordingly.

for everything not given, we require root access
this is important especially for usbN and hostpciN
since they can change the host configuration

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2016-06-01 12:19:37 +02:00
Wolfgang Bumiller
b572a6065a Fix #643: activate volumes before resizing
The volume_size_info() call was what actually failed, but
the error reported to the gui came from afterwards trying to
resize the disk to a garabge size.
2016-04-21 10:33:36 +02:00
Thomas Lamprecht
4d2a734e1b vm_status: return more verbose HA state
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2016-04-19 09:01:02 +02:00
Wolfgang Bumiller
2e953867ad Fix #848: deactivate old volume after clone before deletion
Otherwise some move operations will fail to delete the old
disk (eg. when moving from ceph to local storage).

Note that in order for the deactivation to succeed we need
to make sure qemu has closed its file descriptors, so we
need to wait for the job to disappear the same way we do in
$cancel_job().
Factored the waiting out into $finish_job().
2016-04-13 08:24:13 +02:00
Dominik Csapak
8989736707 change shutdown behaviour on suspended vm
previously, when shutting down a suspended vm,
we successfully send the shutdown command to it,
but it will not shutdown (because it is suspended)

there we will run into the timeout and either
bail out with an error, or kill the process

when we not kill the process and resume the vm,
it will instantly shutdown, because of the previous
command

this patch checks the status of the vm beforehand,
and either bails out with an error that you cannot
shutdown a suspended vm, or stops the vm with the
correct qmp command (depending of forceStop)

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2016-04-12 17:18:55 +02:00
Fabian Grünbichler
8793d4950e Refactor add_unused_volume
Drop add_unused_volume from PVE::QemuServer in favor of
(identical) implementation in PVE::AbstractConfig
2016-03-08 11:42:51 +01:00
Fabian Grünbichler
b2c9558da8 Rework snapshot code, has_feature
Drop snapshot_create, snapshot_delete and snapshot_rollback
in favour of PVE::AbstractConfig. Qemu-specific parts are
implemented in __snapshot_XX methods in PVE::QemuConfig.

has_feature is made an implementation of the abstract
has_feature, and thus moves to PVE::QemuConfig.

Note: a new hook method needed to be introduced to be called
before creating a volume snapshot, after creating a volume
snapshot, and after unfreezing the guestfs after creating a
volume snapshot. The base method in PVE::AbstractConfig is a
noop, the implemention in PVE::QemuConfig runs the necessary
Qemu monitor commands.
2016-03-08 11:42:37 +01:00
Fabian Grünbichler
ffda963f46 Refactor basic config-related methods
Drop load_config, write_config, lock_config[_xx],
check_lock, check_protection, is_template and config_file
in favour of implementions in PVE::AbstractConfig.

Implement guest_type, __config_max_unused_disks,
config_file_lock and cfs_config_path from
PVE::AbstractConfig in PVE::QemuConfig.
2016-03-08 11:41:59 +01:00
Fabian Grünbichler
74479ee9bb Make foreach_drive order deterministic
Previously, foreach_drive iterated over all configuration
keys (in a random order) and checked whether the current key
is a valid drive name. Instead, we now iterate over a list
of valid drive names (with deterministic order) and check
whether a drive with such a name exists in the
configuration.

Also rename the two involved methods from valid_drive_name
to is_valid_drive_name (for the check) and from disknames
to valid_drive_names (for the list of valid keys), for
consistency. These two were only used in the qemu-server
code base.
2016-03-04 06:25:48 +01:00
Dietmar Maurer
346130b2ba fix typo 2016-03-04 06:22:22 +01:00
Emmanuel Kasper
d6c747ff12 document for end users the differences between shutdown and stop 2016-03-04 06:16:16 +01:00
Wolfgang Bumiller
12612b09ae Close #880: ability to show paused state via the CLI
qm list and qm status both show suspended VMs as 'running'
while the GUI's status summary shows them as 'paused'.

This patch makes 'qm status' always request the full status
and adds an optional '-full' parameter for 'qm list' to
use a full status query to include the 'paused' state. (This
is optional as it causes qmp requests to all running VMs.)
2016-03-01 11:59:44 +01:00
Alexandre Derumier
51eefb7e11 clone_vm : only deactivate sources volume if source vm if offline
We can clone online a running vm, we don't have to deactive source vm volume
if the source vm is running

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2016-02-25 08:48:12 +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
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
Dietmar Maurer
eb15b9f074 clone: correctly activate volumes (consider snapshots) 2016-01-22 11:54:34 +01:00
Wolfgang Bumiller
98cbd0f47e check for qorum when starting a VM 2016-01-10 14:55:25 +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
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
Dietmar Maurer
db593da26c destroy VM: test for running VM before starting background task 2015-11-07 12:09:01 +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 9ac5db408d.

This is now fixed by a change in PVE::Cluster::log_msg().
2015-10-29 17:44:17 +01:00
Dietmar Maurer
9ac5db408d fix bug 790: encode description before writing to syslog 2015-10-29 10:49:08 +01:00
Alexandre Derumier
289e0b8564 migrate : add nocheck for resume
Users have reported resume bug when HA is used.

They seem to have a little race (bench show >0s < 1s) between the vm conf file move on source node and replication to,
and resume on target node.

I don't known why this is only with HA, maybe this occur will standard migration too.

Anyway, we don't need to read the vm config file to resume the vm on target host,
as we are sure that the vm is migrated, and config file move action is correct in the cluster.

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2015-10-15 12:41:13 +02:00
Dietmar Maurer
5f20325f61 create: add better check for unused IDs 2015-10-05 12:43:07 +02:00
Alen Grizonic
ea2106258b boot order permissions change
to change to boot order it is needed to assign a user the
VM.Config.Disk privilege set with the add/modify/delete disk
permissions -> now the patch allows the boot order to be (re)defined
with the VM.Config.Options set - the modify any other VM configuration
2015-09-26 11:06:05 +02:00
Alen Grizonic
284fa4c728 VM protection mode
[PATCH v2] changes:

- changed call also for remove VM
2015-09-21 06:36:01 +02:00
Dietmar Maurer
0152058a03 code cleanups 2015-09-17 13:10:19 +02:00
Alen Grizonic
4d8d55f155 VM protection mode
changes:

- added common check_protection subroutine
- disk removal prevention
- restore over protected VM prevention
- changed man page message
2015-09-17 13:05:37 +02:00
Dietmar Maurer
65605ff730 avoid warning about undefined value 2015-09-10 09:37:55 +02:00
Dietmar Maurer
335af808a4 improve bash completion 2015-09-07 08:13:07 +02:00
Dietmar Maurer
65e866e5da implement a few bash completion helpers 2015-09-06 16:01:59 +02:00
Alen Grizonic
cb0e4540f7 VM protection mode added
used to prevent an unintended virtual machine remove operation

v3 changes:

- changed man page message
- removed protection parameter (where not needed)
2015-09-06 11:31:05 +02:00
Dietmar Maurer
952e3ac30f cleanup previous patch 2015-08-28 18:16:08 +02:00
Alen Grizonic
e9f2f8e5f9 HA resources check before destroying vm 2015-08-28 15:32:44 +02:00
Thomas Lamprecht
7f9e28e45c fix 'uninitialized value in concat' due to unnamed VM
This is an minor fix which let's you start the spice console on an
unnamed VM without getting the 'Use of uninitialized value in
concatenation' error.
Also changes the trailing comma from the $conf definition lineto an
semicolon.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2015-08-28 10:36:51 +02:00
Alen Grizonic
457010cc48 clone vm firewall config file
Signed-off-by: Alen Grizonic <a.grizonic@proxmox.com>
2015-08-25 06:49:26 +02:00
Wolfgang Link
a78ea5dfe9 fix bug #688: prevent copy unused disks in the config. 2015-08-20 12:28:05 +02:00
Alen Grizonic
e9abcde681 fix bug #603: vmid.fw file not deleted
Signed-off-by: Alen Grizonic <a.grizonic@proxmox.com>
2015-08-19 15:30:00 +02:00
Wolfgang Link
d662790a14 fix bug #517: improve error message
Get a understandble message,
if someone try to increase a qcow2 image where one or more snapshots reside
2015-08-18 16:35:00 +02:00
Wolfgang Bumiller
1bc483f6bc adapt /config and /pending API calls to force-delete 2015-08-18 16:29:10 +02:00
Alen Grizonic
37f438057a remove vm access permissions after destroy
removed duplicated code which was used in
PVE::AccessControl -> now in PVE::API2::Qemu

Signed-off-by: Alen Grizonic <a.grizonic@proxmox.com>
2015-08-14 08:07:24 +02:00
Wolfgang Bumiller
3dc38fbb74 pending-delete: remember force-deletes
The -force flag didn't have any effect since the pending
changes didn't carry over the the flag.
Now forced deletes have an exclamation mark prepended to the
option name.
2015-08-13 11:08:45 +02:00
Wolfgang Bumiller
af0eba7e35 pass port family to next_*_port() calls 2015-05-12 12:28:56 +02:00
Wolfgang Bumiller
d483fa010c Switch from netcat-traditional to netcat6
netcat6 supports both ipv4 and ipv6, contrary to netcat-traditional.
Additionally rather than using the alternatives-managed /bin/nc path,
/bin/nc6 is now used which always points to the netcat6 implementation,
allowing us to drop the netcat-openbsd conflict entry.
2015-05-12 06:39:08 +02:00
Dietmar Maurer
c44291cd1a fix ha resource names 2015-04-17 13:10:32 +02:00
Dietmar Maurer
2003f0f85b depend on pve-ha-manager 2015-03-27 12:47:56 +01:00
Dietmar Maurer
5b584381dd use new PVE::Cluster::vm_is_ha_managed 2015-03-02 10:31:46 +01:00
Dietmar Maurer
025e1d900b correct use hash with keys 2015-02-27 12:58:41 +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
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
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
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
Dietmar Maurer
915d3481b3 remove unused code
Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
2015-01-07 06:44:45 +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
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
1e7f272634 implement API/CLI to get pending changes
Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
2015-01-07 06:42:55 +01:00
Dietmar Maurer
3a11fadb41 vmconfig_hotplug_pending: improve hotplug error handling
Simplify code, and allow to partially apply pending changes using
a new $selection parameter.

Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
2015-01-07 06:42:48 +01:00
Dietmar Maurer
c750e90abd vmconfig_cleanup_pending: new method to clenup setting in [PENDING]
Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
2015-01-07 06:42:39 +01:00
Dietmar Maurer
6ca8b69870 fix balloon consistency check (consider pending changes)
Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
2015-01-07 06:42:22 +01:00
Dietmar Maurer
055d554dfa vm_start: apply pending changes
I move related helper methods into PVE::QemuServer.

Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
2015-01-07 06:42:17 +01:00
Dietmar Maurer
3900164009 implement vmconfig_apply_pending for stopped VM
Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
2015-01-07 06:42:11 +01:00
Dietmar Maurer
202d1f45e5 update_vm_api: always write into pending section
Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
2015-01-07 06:42:06 +01:00
Wolfgang Link
af9110ddd7 Fix in PVE::QemuServer::snapshot_create
remove the freezefs flag.
If Qemu Guest Agent flag is set in config the vm filesystem will always be frozen,
unless we save RAM.

also remove param freezefs in PVE::API2 snapshot,
because there is no use for it.

Signed-off-by: Wolfgang Link <wolfgang@linksystems.org>
Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
2014-12-04 12:30:35 +01:00
Dietmar Maurer
f34ebd5259 code cleanups 2014-12-01 09:50:11 +01:00
Dietmar Maurer
184955dc65 fix bug #542: return VMID as integer 2014-09-17 15:51:47 +02:00
Dietmar Maurer
cd11416f7a clone_vm: auto generate new uuid 2014-08-26 09:20:09 +02:00
Dietmar Maurer
debe88829e vm_stop: do not use ha commands if $migratedfrom is set 2014-07-29 06:51:02 +02:00
Stefan Priebe
64ff6fe44c API2: remove require full parameter for snapshot cloning
Signed-off-by: Stefan Priebe <s.priebe@profihost.ag>
2014-07-17 09:22:37 +02:00
Alexandre Derumier
e5e3ccbbc2 allow resize of virtio windows boot disk
virtio-win-0.1-74  have fixed the resize bug of virtio boot disk

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2014-07-16 12:47:04 +02:00
Dietmar Maurer
47314bf5e2 auto generate uuid on VM create
Other VM environments also generates an UUID by default.
2014-06-26 11:51:52 +02:00
Dietmar Maurer
d7fd6a445b require 'VM.Config.HWType' priviledge to change new smbios1 option 2014-06-26 11:17:10 +02:00
Dietmar Maurer
12a1e0f4e8 vncproxy: remove check if VM is running
Because this does not work when VM is on other cluster node.
2014-06-25 09:54:23 +02:00
Dietmar Maurer
7786f1b0b4 vncproxy: add check if VM is running
To provide better eror message for console task.
2014-06-25 07:20:23 +02:00
Dietmar Maurer
c422ce9347 protect websocket API with vncticket 2014-06-24 16:10:30 +02:00
Dietmar Maurer
4d00f52fbb fix a typo 2014-06-24 07:44:17 +02:00
Dietmar Maurer
5b25afb0b7 vncwebsocket: do not proxy connection 2014-06-18 12:44:46 +02:00
Dietmar Maurer
3e7567e05e do not use novnc wsproxy
Instead, we use new HTTPServer features.
2014-06-18 11:02:57 +02:00
Dietmar Maurer
983d458216 cleanup VNC websocket patch
Pass ticket via ENV{LC_PVE_TICKET} to vncproxy. Also remove 'unsecure' option, because
this is implied if we want a websocket connection.
2014-06-17 08:06:32 +02:00
Stefan Priebe
b4d5c00063 API2/Qemu: add unsecure and websocket options to vncpoxy also set qemu vnc server properties on the fly
Signed-off-by: Stefan Priebe <s.priebe@profihost.ag>
2014-06-17 08:05:28 +02:00
Dietmar Maurer
8cd00f4b24 do not ignore errors on tap_unplug 2014-05-08 15:45:25 +02:00
Alexandre Derumier
2dd4aa4c95 add firewall option to qemu network interface
this allow to disable firewall for a specific interface

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2014-05-08 08:35:37 +02:00
Dietmar Maurer
228a998ba3 depend on pve-firewall, add firewall API for VMs 2014-05-06 11:27:10 +02:00
Dietmar Maurer
19d13324e4 add linefeed to warn message and add changelog for previous commit 2014-04-17 09:29:46 +02:00
Alexandre Derumier
5b0bd20dd5 move_disk : don't delete disk if used in a previous snasphot v2
and set it as unused

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2014-04-17 07:44:17 +02:00
Lindsay Mathieson
68ab04470b Adds the VM name to the title for the spice clent, making it easier to identify which in window lists etc.
Signed-off-by: Lindsay Mathieson <lindsay.mathieson@gmail.com>
2014-01-31 06:51:16 +01:00
Dietmar Maurer
73272365bf deactivate volume after clone
To avoid lvm LVs to be active on several nodes.
2014-01-29 06:44:06 +01:00
Alexandre Derumier
838776ab65 add cpu_hotplug
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2014-01-14 07:29:25 +01:00
Dietmar Maurer
dd25eecf62 code cleanup
Use new helper methods.
2013-12-10 10:46:50 +01:00
Dietmar Maurer
78252ce7d0 spiceproxy: use POST instead of GET
using GET is a security risk (no CSRF checks)
2013-12-09 08:17:52 +01:00
Alexandre Derumier
74edd76ba8 qemuserver : iothrottle add support for throttling burst max
http://git.qemu.org/?p=qemu.git;a=commit;h=3e9fab690d59ac15956c3733fe0794ce1ae4c4af

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2013-12-05 06:31:06 +01:00
Dietmar Maurer
7aa608d655 include sendkey in directory index 2013-11-20 06:54:06 +01:00
Dietmar Maurer
baca276db5 deactivate volumes after clone to other node 2013-11-19 08:15:54 +01:00
Dietmar Maurer
1f1412d189 correcctly check if option is a drive 2013-10-14 07:35:04 +02:00
Dietmar Maurer
c9928b3d53 use new PVE::Storage::abs_filesystem_path()
The check_volume_access() method does no longer return a path.
2013-10-01 12:41:06 +02:00
Dietmar Maurer
fa8ea931ed whitespace cleanups 2013-09-05 07:44:52 +02:00
Dietmar Maurer
657533535d Allow VMAdmin to delete disk with Datastore.AllocateSpace permissions
Previosly, a VMAdmin/DatastoreUser was able to add/create new disks, but
unable to remove them.
2013-09-05 07:41:40 +02:00
Dietmar Maurer
2dc23d7253 vncproxy API: avoid warning about uninitialize value 2013-08-28 11:31:31 +02:00
Dietmar Maurer
a64d61460d avoid another compile warning 2013-08-12 09:53:02 +02:00
Dietmar Maurer
760fb3c842 fix warning about uninitialized value 2013-08-12 09:47:02 +02:00
Dietmar Maurer
2dc9c14820 load config from correct node 2013-08-06 08:15:14 +02:00
Dietmar Maurer
ef5e2be2a4 add ability to run without graphic card ('vga: serial[n]') 2013-07-31 09:19:36 +02:00
Dietmar Maurer
7c14dcae1f use STDIN to pass spice ticket 2013-07-24 12:19:51 +02:00
Dietmar Maurer
86b8228b59 new vga_conf_has_spice() helper
code cleanups
2013-07-24 12:01:03 +02:00
Alexandre Derumier
1481f3f23c add read_x509_subject_spice
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2013-07-24 09:45:32 +02:00
Dietmar Maurer
31178e138f fix docu 2013-07-18 08:29:12 +02:00
Dietmar Maurer
fb6c726010 spiceproxy: allow client to choose proxy address 2013-07-18 08:00:03 +02:00
Dietmar Maurer
451b2b815e spice: read cert subject name directly using Net::SSLeay
We now depend on libnet-ssleay-perl
2013-07-18 07:28:35 +02:00
Dietmar Maurer
943340a628 spice: use TLS
we now use a local tcp port instead of a unix socket, because that is
implemented and works with current spice libraries.
2013-07-17 11:33:02 +02:00
Dietmar Maurer
716a470c8c spiceproxy: set delete-this-file 2013-06-27 09:28:13 +02:00
Alexandre Derumier
af32683a67 spiceconfig: port can't be 0
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2013-06-27 06:12:46 +02:00
Alexandre Derumier
e554e5b9a9 spice : fix proxy address
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2013-06-27 06:10:34 +02:00
Dietmar Maurer
46246f04e9 vm status API: return info about spice 2013-06-26 13:37:14 +02:00
Dietmar Maurer
3309e65afa spiceproxy: remove socat, and return data to access the new spiceproxy server 2013-06-26 13:13:58 +02:00
Dietmar Maurer
eb15737004 kill socat if we do not get any connection within $timeout seconds 2013-06-25 14:34:59 +02:00
Dietmar Maurer
8bd0cbf5c3 spice proxy: try to cirrectly count open socat connections 2013-06-25 12:54:15 +02:00
Dietmar Maurer
5ecf258f2c limit spice ticket length to 59 charachters 2013-06-25 12:47:33 +02:00
Dietmar Maurer
288eeea8ae add spice proxy API
This is experimental code, spice connections are not encryped and thus insecure.
We use ticket passwords for spice auth, and do direct spice connections to
the nodes instead of using a tunnel.
2013-06-25 12:09:05 +02:00
Dietmar Maurer
9b2c0efbd6 correctly handle undef values when calling qemu_block_set_io_throttle 2013-06-12 07:08:02 +02:00
Dietmar Maurer
7043d946fc code cleanups
removed trailing white space
2013-06-11 07:27:31 +02:00
Dietmar Maurer
d52b8b77f8 simplify previous patch 2013-06-11 07:22:13 +02:00
Alexandre Derumier
09a8989501 create_disks : avoid storage scan v3
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2013-06-11 07:09:17 +02:00
Dietmar Maurer
5555edea95 update_vm_async: new asynchronous API 2013-06-07 11:41:58 +02:00
Dietmar Maurer
6dbe8b459b require VM.Config.HWType priviledges to modify 'machine' configuration 2013-06-06 06:22:32 +02:00
Dietmar Maurer
952958bc87 API extension: add 'machine' parameter to vm_start
This allows us to overwrite the machine type at start - useful for
migration to make sure we use the same machine at the target node.
2013-06-05 09:27:31 +02:00
Dietmar Maurer
70d45e33e9 move_disk: implement delete flag 2013-05-31 10:56:16 +02:00
Dietmar Maurer
43bc02a921 rename move to move_disk
Because that API call can only move a single disk (not the whole VM).
2013-05-31 08:46:21 +02:00
Dietmar Maurer
635c3c4426 move_vm: add original disk as unusedX 2013-05-29 12:15:30 +02:00
Dietmar Maurer
e2cd75fa65 move_vm: make it work with PVE::QemuServer:::clone_disk
- use POST instead of PUT (this is not idempotent).
- return task ID
- use declarative permission check
2013-05-29 12:07:56 +02:00
Alexandre Derumier
586bfa78d1 add qm move (storage migration)
qm move <vmid> <disk> <storage> --format [raw|qcow2|vmdk]

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2013-05-29 11:23:45 +02:00
Dietmar Maurer
c55fee03a0 allow to clone VM when name is not set 2013-05-29 11:18:54 +02:00
Dietmar Maurer
152fe752c4 factor out clone_disk
As suggested by Alexandre. Also cleanup  qemu_drive_mirror (fix white space).
2013-05-29 08:32:10 +02:00
Dietmar Maurer
a8e2f942bd fix unused disk handling
Show unused disks even if disk is used inside snapshots. But do not allow
to remove those disks.
2013-05-28 12:08:45 +02:00
Dietmar Maurer
7a907ce612 rescan: add check if config has really changed 2013-05-27 10:51:01 +02:00
Dietmar Maurer
6e46ac079f fix bug #389: avoid error if balloon is undefined 2013-05-22 07:15:44 +02:00
Dietmar Maurer
be51704915 use add_vm_to_pool/remove_vm_from_pool from PVE::AccessControl 2013-05-14 12:01:57 +02:00
Alexandre Derumier
b37558ca33 clone disk : keep source volume params
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2013-05-14 10:17:45 +02:00
Dietmar Maurer
4a5a259072 clone: check is we can clone to target storage 2013-05-13 11:17:38 +02:00
Dietmar Maurer
719893a944 has_features: also return a list of allowed nodes
This is useful if a feature is restricted to a limited set of nodes.
2013-05-06 08:56:17 +02:00
Dietmar Maurer
7758ce869d has_feature: add 'copy' to enum 2013-05-03 12:30:43 +02:00
Dietmar Maurer
7af0a6c88d create template: fix permission check
This function only works if the VM already exists. But pool permissions
are automatically inherited on existing VMs, so there is no need
to explicitly check pool permissions.
2013-05-03 09:14:25 +02:00
Dietmar Maurer
d703d4c010 clone: correctly add VM to pool 2013-05-03 09:08:39 +02:00
Dietmar Maurer
2dd530430b fix typo, whitespace cleanups 2013-05-03 08:39:41 +02:00
Alexandre Derumier
00b095caba vm_clone : add running vm drive mirror
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2013-05-03 08:37:18 +02:00
Dietmar Maurer
f9bfceefa6 restore: allow to overwrite existing VMs if user has VM.Backup permissions
The requirement to have VM.Allocate it non-obvious and confusing
if the VM already exists. If the user can backup, he should also be able
to restore that backup.
2013-05-03 07:47:08 +02:00
Dietmar Maurer
9418baad81 remane copy to clone 2013-05-02 11:42:22 +02:00
Dietmar Maurer
dba198b05e check has_feature copy for full clone 2013-05-02 07:17:15 +02:00
Dietmar Maurer
829967a93b copy_vm: re-structure code to allow more checks before fork 2013-05-02 07:10:46 +02:00
Alexandre Derumier
c6d0c8a702 fix : signal interrupt don't delete volume on full copy
Currently we  push newvolid to newvollist after qemu-img convert,
so if signal interrupt occur during qemu-img convert, the newvollist is empty and we can't free the volume

Instead, We need to push newvolid to newvollist just after volume creation

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2013-05-02 06:49:12 +02:00
Alexandre Derumier
751cc556dc fix "Use of uninitialized value $target"
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2013-05-02 06:40:01 +02:00
Dietmar Maurer
75466c4fa6 white-space cleanups 2013-04-30 11:46:38 +02:00
Dietmar Maurer
55173c6bd4 copy_vm: new option to move final VM to other node (option target)
This only works if the VM is on shared storage.
2013-04-30 11:44:39 +02:00
Alexandre Derumier
42a19c87bc vm_copy : add optional format parameter
can be qcow2,raw,vmdk

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2013-04-30 10:46:44 +02:00
Dietmar Maurer
a60ab1a6a2 copy_vm: add name and description option 2013-04-30 09:54:34 +02:00
Dietmar Maurer
9076d880a8 copy_vm: allow to copy from snapshot 2013-04-30 09:31:23 +02:00
Dietmar Maurer
4e4f83fea0 copy_vm: use exclusive lock for running VM
Because we can only run one block job to copy data.
2013-04-30 07:40:43 +02:00
Alexandre Derumier
81f043ebc0 copy_vm : add optional storage parameter
Optionnal target storage for full copy

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2013-04-30 07:16:54 +02:00
Alexandre Derumier
3732918544 vm_copy : fix typo in description
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2013-04-30 06:55:18 +02:00
Dietmar Maurer
b83e0181f1 implement copy_vm
This is based on patches from Alexandre Derumier <aderumier@odiso.com>.

It just implements copy/clone for stopped VMs and Templates. Copying
running VMs or copy from snapshots is not implemented.
2013-04-29 10:53:03 +02:00
Dietmar Maurer
6116f72902 implement shared file locks
and add a first prototype for copy_vm
2013-04-29 09:30:15 +02:00
Dietmar Maurer
218cab9a3a use correct package prefix 2013-04-22 10:57:24 +02:00
Dietmar Maurer
b91c2aae28 fix assertion 2013-04-22 09:43:54 +02:00
Dietmar Maurer
35c5fdefce move assertion so that we have all checks at the same place. 2013-04-22 07:10:58 +02:00
Dietmar Maurer
75e7e997e7 set template flag earlier 2013-04-22 07:08:51 +02:00
Dietmar Maurer
0402a80b77 do not allow template creation if there are snapshots. 2013-04-22 07:05:54 +02:00
Dietmar Maurer
bef4463b61 fix wrong comment 2013-04-22 07:02:10 +02:00
Stefan Priebe
b02691d817 use vm create permissions for templates
Signed-off-by: Stefan Priebe <s.priebe@profihost.ag>
2013-04-19 11:38:57 +02:00
Alexandre Derumier
de8f60b252 dynamic bridge rate/vlan change on nic update
if model change : we try to unplug like before
if bridge/nat change : we try to unplug like before

else if bridge, but rate/vlan/bridge change, we dynamicly change them without need hotplug

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2013-03-05 12:10:06 +01:00
Dietmar Maurer
bb1e32937a Revert "vncproxy: wait max 10s for the socket if it does not exist"
This reverts commit 58504d5edf.

The patch only works if the VM is on local host.
2013-02-28 12:49:21 +01:00
Stefan Priebe
58504d5edf vncproxy: wait max 10s for the socket if it does not exist
Signed-off-by: Stefan Priebe <s.priebe@profihost.ag>
2013-02-28 06:53:54 +01:00
Alexandre Derumier
f2965e67df forbid online resize a virtio windows bootdisk
Currently is give us bsod, it's a windows virtio-blk driver bug.

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2013-02-25 06:15:00 +01:00
Alexandre Derumier
e8a7e9b44c fix tablet hotplug
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2013-02-19 12:56:58 +01:00
Alexandre Derumier
9a8d6b6665 hot-unplug : add some warnings for differents guest os
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2013-02-19 10:38:50 +01:00
Alexandre Derumier
cd6ecb89eb hotplug/unplug tablet on config update
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2013-02-19 06:42:53 +01:00
Dietmar Maurer
03c2d0ad6f remove wrong permission check 2013-02-15 08:45:42 +01:00
Alexandre Derumier
04a69bb4fe add template_create
qm template <vmid> [-disk virtio0]

convert a full vm to a template (or only a disk if specify)

we orignal disk to /base (file) or base- (lvm,rbd,sheepdog,nexenta)
we create a snapshot @base if storage need it for clone
we protect the volume or snapshot

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2013-02-15 07:50:32 +01:00
Dietmar Maurer
ed2213500d vma restore: only delete disks contained in backup.
cleanup: remove unnecessary 'PVE::QemuServer::' prefix.
2013-01-04 06:57:11 +01:00
Alexandre Derumier
628e9a2b67 fix Bug #293: CDROM size not reset when set to use no media
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2013-01-02 06:30:24 +01:00
Dietmar Maurer
7bfdeb5f90 allow manual ballooning if shares is set to zero 2012-12-28 14:06:46 +01:00
Dietmar Maurer
ccd5438fa3 fix permission check for option 'shares' 2012-12-28 13:04:19 +01:00
Alexandre Derumier
1ac0d2ee0c api2: vm_feature
return true/false if vm has feature

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2012-12-28 07:49:37 +01:00
Stefan Priebe
6bb726c903 PVE/API2/Qemu: remove hardcoded blowfish cipher
Signed-off-by: Stefan Priebe <s.priebe@profihost.ag>
2012-10-31 13:57:58 +01:00
Dietmar Maurer
3da8510790 vncproxy: wait until vnc port is ready 2012-10-24 08:59:31 +02:00
Dietmar Maurer
6aa4651b89 include additional info in snapshot list 2012-09-13 09:45:48 +02:00
Dietmar Maurer
d191446898 pass 'digest', so that GUI can detect changes easily
Also use 'current' instead of '__current'
2012-09-13 09:13:39 +02:00