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
Dietmar Maurer
3ee28e388a
improve snapshot delete - add force option to API
2012-09-12 07:19:38 +02:00
Dietmar Maurer
d788cea673
add API to get/set snapshot configuration.
...
You can currently only modify the 'description'.
2012-09-11 09:34:48 +02:00
Dietmar Maurer
782f4f753f
add description for snapshots
2012-09-11 09:00:26 +02:00
Dietmar Maurer
982c7f1273
add snapshot time stamp
2012-09-11 08:45:39 +02:00
Dietmar Maurer
0ea6bc6943
snapshot list: include current position
2012-09-11 08:33:20 +02:00
Dietmar Maurer
7b2257a8b5
fix typo
2012-09-10 12:08:55 +02:00
Dietmar Maurer
f1baf1df42
fix snapshot permissions - check for VM.Snapshot
2012-09-10 09:37:51 +02:00
Dietmar Maurer
8abd398b8a
register standard option for snapshot name
2012-09-10 08:55:04 +02:00
Dietmar Maurer
154ccdcdbc
improve snapshot REST interface
2012-09-10 07:58:06 +02:00
Dietmar Maurer
7e7d7b6113
split snapshot into separate methods.
...
We also start background tasks now. I also removed the 'digest'and 'force' parameters, because I think we do not need them here.
2012-09-10 07:32:33 +02:00
Dietmar Maurer
22c377f0b7
update config on snapshot commands
2012-09-07 13:07:23 +02:00
Alexandre Derumier
9dbd1ee434
add qm snapshot command
...
qm snapshot <vmid> <action> <snapshotname> --vmstate --freezefs
action : create|rollback|delete
vmstate : save the vmstate
freezefs: freezefs with qemu-ga
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2012-09-06 10:46:49 +02:00
Dietmar Maurer
9bf371a66b
use mbps instead of bps
...
The new parser automatically converts old bps to mbps.
2012-08-30 07:57:59 +02:00
Dietmar Maurer
af30308f36
we call vm_stop to target host,
...
to be sure that kvm process is killed (but it should kill itself),
and deactivate volumes
I slightly modified this patch (orig. from Alexandre) so that it apply cleanly.
2012-08-23 10:28:41 +02:00
Alexandre Derumier
7e8dcf2cb0
add migratedfrom param to start vm with conf file an another node
...
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2012-08-23 07:18:36 +02:00
Dietmar Maurer
f91b2e4554
fix for resize: final cleanups
2012-08-08 09:25:54 +02:00