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
Alexandre Derumier
bbd560974a
template_create : add template:1 option.
...
Also allow template create of non base-xxx renamable storage
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2013-04-22 06:59:18 +02:00
Dietmar Maurer
03da3f0d46
fix bug 377: make qm rescan work properly
2013-04-19 10:45:46 +02:00
Alexandre Derumier
96d695c08a
is_template : return 1 if template option == 1
...
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2013-04-19 06:56:30 +02:00
Alexandre Derumier
68eda3abc4
add template config option
...
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2013-04-19 06:56:03 +02:00
Dietmar Maurer
013d52755f
allow sparse restore for sheepdog and rbd
2013-04-18 06:14:50 +02:00
Dietmar Maurer
92f0fedcce
parse_net: fix warning about uninitialized value
2013-03-22 06:23:22 +01:00
Alexandre Derumier
1f219ef546
virtio disk hot-unplug: drive_del after device_del
...
we need to remove drive after device has correctly by remove.
With this patch:
Windows : if drive is locked/"mounted", the hot-unplug fail and disk is accessible (100% safe)
Linux: without hotplug module : the hot-unplug fail and disk is accessible (100% safe)
Linux : with hotplug module : the hot-unplug work, but no verification is done is the drive is mounted
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2013-03-07 08:37:49 +01:00
Alexandre Derumier
750886f87a
nic hot-unplug: delete netdev after device removal
...
Currently we delete netdev before acpi hot-unplug.
if guest don't support hotplug, this break network.
We need to remove netdev after the device had be correctly unplug.(we check that device has been correctly removed)
So, If guest don't support hotplug, It's simply thrown a unplug error message without breaking the network
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2013-03-07 08:37:23 +01:00
Alexandre Derumier
ef86170e9f
bugfix #340 : don't set cache=none to cdrom
...
Cdrom devices don't works with cache=none and no reason to force cache mode on cdrom
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2013-02-27 09:21:31 +01:00
Dietmar Maurer
eac6899d96
default cpu type is kvm64 now
2013-02-25 07:01:51 +01:00
Alexandre Derumier
11490cf228
set cache=none if option is not defined
...
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2013-02-25 06:11:37 +01:00
Alexandre Derumier
0ecf8463da
usb-tablet : always use uhci controller
...
- usb-tablet on ehci is buggy
- convert to -device syntax
info usb before
----------------
Device 0.2, Port 1, Speed 12 Mb/s, Product QEMU USB Tablet
info usb after
--------------
Device 0.2, Port 1, Speed 12 Mb/s, Product QEMU USB Tablet
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2013-02-22 11:53:52 +01:00
Alexandre Derumier
24f0d39a6c
uhci controller : use new -device syntax
...
we need an id to allow hotplug
info pci before
---------------
Bus 0, device 1, function 2:
USB controller: PCI device 8086:7020
IRQ 11.
BAR4: I/O at 0xc040 [0xc05f].
id ""
info pci after
--------------
Bus 0, device 1, function 2:
USB controller: PCI device 8086:7020
IRQ 11.
BAR4: I/O at 0xc040 [0xc05f].
id "uhci"
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2013-02-22 11:52:23 +01:00
Dietmar Maurer
fcc573ab24
Revert "enable usb2 controller by default"
...
This reverts commit 42869ac07d
.
2013-02-22 10:08:10 +01:00
Dietmar Maurer
2dbe827e38
disable hotplug by default
...
This reverts commit 6c52b6794e
Testing revealed that this has too many side effect, so we do not want
to change that for the 2.3 release.
2013-02-22 09:52:45 +01:00
Dietmar Maurer
6c52b6794e
hotplug/unplug devices by default
2013-02-19 10:47:17 +01:00
Alexandre Derumier
73aa03b87f
qemu_netdevadd : convert to qmp
...
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2013-02-19 10:32:01 +01:00
Alexandre Derumier
89c1e0f438
qemu_netdevdel : convert to qmp
...
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2013-02-19 10:31:51 +01:00
Alexandre Derumier
d695b5b725
qemu_deviceadd : convert to qmp
...
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2013-02-19 10:31:43 +01:00
Alexandre Derumier
5a77d8c105
qemu_devicedel : convert to qmp
...
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2013-02-19 10:31:28 +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
Alexandre Derumier
42869ac07d
enable usb2 controller by default
...
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2013-02-19 06:41:05 +01:00
Alexandre Derumier
a6f0e83b93
template_create : check has_feature template
...
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2013-02-18 06:19:14 +01:00
Dietmar Maurer
8b43bc11db
add missing newline
2013-02-15 11:08:28 +01:00
Dietmar Maurer
9cd0784249
template_create: check for 'clone' feature
2013-02-15 08:44:12 +01:00
Dietmar Maurer
3e2bbcdc0e
is_template: always return a defined value
...
use 0 instead of undef
2013-02-15 08:12:33 +01:00
Alexandre Derumier
4d8c851bcc
vmstatus : return template if vm is a template
...
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2013-02-15 08:09:36 +01:00
Dietmar Maurer
5295b23dfb
move template checks up one level
...
To avoid multiple/repeated calls to load_config().
2013-02-15 08:04:30 +01:00
Alexandre Derumier
f78fe36ece
forbid snapshot create if current it's a template
...
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2013-02-15 07:57:01 +01:00
Alexandre Derumier
3dcb98d52b
forbid vm_start if current config is a template.
...
if files (raw,qcow2) are a template, we forbid vm_start.
note : the readonly protection do already the job, but we need a clear message for users
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2013-02-15 07:52:28 +01:00
Alexandre Derumier
90b0c6b34a
forbid rollback if current config is a template.
...
if a qcow2 current is a template, we can't rollback to a previous snapshot.
(note that file readonly protection do already the job, but we need a clear error message for user)
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2013-02-15 07:52:09 +01:00
Alexandre Derumier
66aa07141f
forbid snapshot delete if it's a template
...
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2013-02-15 07:51:46 +01:00
Alexandre Derumier
624361b34a
add is_template sub
...
return 1 if vm is a full template (all disks are base image)
return 2 if vm is a semi-tempalte (mix of base and non-base image)
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2013-02-15 07:51:09 +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
ef1c835d19
do not set cache=none for .raw files
...
use qemu default instead (writeback)
2013-02-14 08:19:39 +01:00
Alexandre Derumier
abebe2f16c
qemu 1.4 fix : rename stats-polling-interval to guest-stats-polling-interval
...
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2013-02-13 10:00:41 +01:00
Dietmar Maurer
ebb5555800
fix tar restore: correctly check if VM config already exists
2013-01-28 09:54:00 +01:00
Dietmar Maurer
051347aab2
allow to suspend/resume VM during backup
...
bump version to 2.3-7
2013-01-17 10:25:39 +01:00
Dietmar Maurer
06094efd4d
allow to run as qemu-system-x86_64
...
This is usefull to debug.
2013-01-16 13:19:24 +01:00
Dietmar Maurer
907ea89128
fix bug #307 : correctly restore disk settings
...
bump version to 2.3-5
2013-01-07 06:49:11 +01:00
Alexandre Derumier
4ec05c4cc3
balloon: don't set balloon && polling interval at start when livemigrate
...
We don't need to set balloon value and polling interval when a vm is coming from a livemigrate.
(Values are keep in guest memory)
So with autoballooning, this avoid to set the ballon size at ballon_min value when the vm is migrated
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2013-01-04 12:07:59 +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
044321910c
add set migrate_downtime default value to 0.1 && add number type
...
can be integer or float
ex:
1
1.0
0.3
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2012-12-31 07:21:00 +01:00
Dietmar Maurer
074e01c819
correctly set shares (allow 0)
2012-12-28 14:05:58 +01:00
Alexandre Derumier
7ea975efe0
add sub has_feature
...
loop over each disk of the vm config file to find if feature is available.
If one of the disk doesn't have the feature, we return undef, else return 1
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2012-12-28 07:48:33 +01:00
Alexandre Derumier
3beb415bd7
move qmp migrate_set_down && migrate_set_speed to qemumigrate
...
so we can set the values when the vm is running
also use int() to get json working
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2012-12-27 12:43:39 +01:00
Dietmar Maurer
95381ce06c
use vm_mon_cmd_nocheck at startup
...
To avoid errors on migration.
2012-12-20 12:54:02 +01:00
Dietmar Maurer
4bdb05142c
report balloon_min in bytes (not MBs)
2012-12-19 09:08:16 +01:00
Dietmar Maurer
8d9ae0d21e
enable balloon by default, unless explicitly disabled
...
So that we can get memory stats from the guest.
2012-12-19 07:40:51 +01:00
Dietmar Maurer
8b1accf7ce
add shares property for auto-ballooning
...
Also allow to set 'balloon: 0' to disable the ballon driver.
2012-12-19 07:24:39 +01:00
Dietmar Maurer
64e7fcf2e2
use new query-balloon to get used/free memory
...
Also set stats-polling-interval on the balloon driver at startup.
bump version to 2.3-2
2012-12-18 12:52:18 +01:00
Dietmar Maurer
91bd6c909b
include new qemu backup feature
...
We can still restore old tar files. But new backups always use new vma
format.
Also moved rescan code from qm into PVE::Qemuserver
bump version to 2.3-1
2012-12-13 12:49:52 +01:00
Dietmar Maurer
98a0dc5e2a
cleanup cpu types
...
Remove: rhel specific types cpu64-rhel6 cpu64-rhel5
Add: SandyBridge Haswell Opteron_G4 Opteron_G5
2012-11-27 06:40:59 +01:00
Dietmar Maurer
fa7ae70505
fix version parser for qemu 1.3
2012-11-23 07:45:46 +01:00
Dietmar Maurer
42ca89538d
qmb balloon command expects bytes
2012-11-16 06:19:56 +01:00
Dietmar Maurer
4dac70e576
vzdump: restore sata drives correctly
2012-11-02 07:48:42 +01:00
Dietmar Maurer
a70ebde31c
add 'win8' ostype
...
Use same defaults as win7 for now.
2012-10-23 09:36:18 +02:00
Dietmar Maurer
585b6e2839
disable vzdump for VM containing snapshots
2012-09-27 09:42:48 +02:00
Dietmar Maurer
8c55950564
fix bug 251: use new command line syntax
2012-09-26 12:47:32 +02:00
Dietmar Maurer
fe6249f496
reserve more space for live snapshot state (2*memory)
2012-09-25 09:48:29 +02:00
Dietmar Maurer
d5769dc253
migrate volumes used inside snapshots including vmstate
...
Introduce new helper function foreach_volid()
2012-09-25 08:09:50 +02:00
Dietmar Maurer
9dcf4909f0
updates for async shapshot patch
2012-09-24 10:43:19 +02:00
Dietmar Maurer
681b2404cd
remove timeout when loading state from file.
...
So we finally have no timeout when we migrate a vm or when we load state.
2012-09-20 07:37:35 +02:00
Dietmar Maurer
8c609afd2b
fix syntax error
2012-09-19 12:37:33 +02:00
Dietmar Maurer
62de2cbdfa
we need to continue the VM after loading state
2012-09-19 10:40:30 +02:00
Dietmar Maurer
ab33a7c280
rollback: do important tests before stopping VM
2012-09-19 10:12:12 +02:00
Dietmar Maurer
6c47d54666
allow nexenta snapshots, use new -loadstate option
2012-09-18 09:23:47 +02:00
Dietmar Maurer
e2ea1bf1df
fix syntax error
2012-09-14 13:58:49 +02:00
Dietmar Maurer
bf5104f221
continue VM after snapshot rollback
2012-09-14 13:57:52 +02:00
Dietmar Maurer
a3222b9184
snapshot: save state and implement rollback
...
We automatically stop the VM on rollback, and start it again when there
is saved state.
2012-09-12 13:34:55 +02:00
Dietmar Maurer
18bfb361a0
snapshot: allocate/free volid for VM state
2012-09-12 11:59:48 +02:00
Dietmar Maurer
db7c26e55e
snapshot: don't overwrite main VM description
2012-09-12 10:17:41 +02:00
Dietmar Maurer
6cb1a8cfc1
snapshot_delete: correctly unlink parent refs
2012-09-12 10:10:08 +02:00
Dietmar Maurer
05e5ad3f8e
snapshot_create: correctly set parent when creating a new snapshot
2012-09-12 09:56:50 +02:00
Dietmar Maurer
030dd626f4
snapshot_create: check if vm is running before try to save state
2012-09-12 09:55:56 +02:00
Dietmar Maurer
2009f324ac
snapshot_delete: save changes after each drive snapshot removal
2012-09-12 08:58:33 +02:00
Dietmar Maurer
3ee28e388a
improve snapshot delete - add force option to API
2012-09-12 07:19:38 +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
ee2f90b14e
test snapshot capability, fix unused drive handling
2012-09-10 11:49:32 +02:00
Dietmar Maurer
b7ba6b7933
make 'parent' a real option
2012-09-10 10:15:14 +02:00
Dietmar Maurer
79e57b294c
fix snapshot rollback
2012-09-10 10:06:01 +02:00
Dietmar Maurer
ef59d1ca65
do not copy list of unused disk into snapshot config
2012-09-10 09:55:11 +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
22c377f0b7
update config on snapshot commands
2012-09-07 13:07:23 +02:00
Dietmar Maurer
0d18dcfc27
add save/load snapshot information, add basic snapshot handling stubs
2012-09-07 11:51:19 +02:00
Alexandre Derumier
fc46aff9fa
add qemu_volume_snapshot_delete
...
We need to split the delvm monitor command, like savevm, to delete snapshot onlinefor each volume (qcow2,sheepdog,rbd)
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2012-09-06 10:47:05 +02:00
Alexandre Derumier
e8f3f18e3d
add qga_unfreezefs
...
empty for now, need to implement
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2012-09-06 10:47:00 +02:00
Alexandre Derumier
3d5149c925
add qga_freezefs
...
empty for now, need to implement
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2012-09-06 10:46:57 +02:00
Alexandre Derumier
ae2aa1a876
add qemu_snapshot_end
...
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2012-09-06 10:46:55 +02:00
Alexandre Derumier
182e97d9b0
add qemu_snapshot_start
...
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2012-09-06 10:46:52 +02:00
Alexandre Derumier
1ab0057c8b
add qemu_volume_snapshot
...
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2012-09-06 10:42:44 +02:00
Dietmar Maurer
be79c214ac
set correct default for new 'agent' option
...
We do not enable that by default for now.
2012-09-04 06:46:53 +02:00
Dietmar Maurer
bc84dcca7d
rename option 'qga' to 'agent'
2012-09-04 06:44:08 +02:00
Alexandre Derumier
ab6a046f6b
add qemu guest agent support
...
this add chardev and virtio-serial devices for communication with guest agent.
vmconfig option :
qga: 1
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2012-09-04 06:29:10 +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
f36ed4f4a0
cleanup: split out parse_size
2012-08-29 13:01:52 +02:00