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
Dietmar Maurer
03e480fce3
allow to specify sata as boot disk
2012-08-29 09:19:21 +02:00
Alexandre Derumier
e18b0b9964
livemigrate : activate xbzrle cache
...
This help migrate for vm with of lot of memory access (like database)
live migration tests working:
kvm 1.2 -> kvm 1.2 (xbzrle set on both side)
kvm 1.1 -> kvm 1.2 (xbzrle on target)
kvm 1.1 -> kvm 1.1 (xbzrle not set, qmp command try to set xbzrle but fail)
failing migration
kvm 1.2 -> kvm 1.1 fail, but this is expected.
I tested with a memory benchmark running on the vm with 4GB ram
without xbzrle : migration take 10min, with many network hang
with xbzrle : migration take 1min, no hang
I display xbzrle counters for debug purpose, we can remove them later
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2012-08-29 07:55:21 +02:00
Alexandre Derumier
d454d04033
use scsi-generic by default with libiscsi
...
This add scsi passthrough with libiscsi
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2012-08-29 07:50:48 +02:00
Alexandre Derumier
29972af3aa
scsihw: add megasas controller
...
It could be useful for windows7 and windows2008 , as they are no more classic lsi driver for these platform
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2012-08-29 07:40:07 +02:00
Dietmar Maurer
14db53662a
set default qmp timout to 3 seconds
...
And allow to pass timeout paramater to vm_qmp_command().
2012-08-27 13:13:36 +02:00
Alexandre Derumier
eb26097ef4
remove qmp socket file on vm_stop_cleanup
...
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2012-08-27 06:59:38 +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
Dietmar Maurer
f5eb281ad3
cleanup: detete trailing whitespace
2012-08-23 07:36:48 +02:00
Alexandre Derumier
b67900f17a
put target vm in singlestep mode and resume it only when config is moved
...
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2012-08-23 07:32:21 +02:00
Dietmar Maurer
d691e6d3ec
pve-bridge: use enviroment variable PVE_MIGRATED_FROM
...
We use environment variable to pass additional information the
the network script.
2012-08-23 07:26: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
7f4a5b5a6e
fix bug #236 : use correct shutdown timeout
2012-08-21 11:39:17 +02:00
Dietmar Maurer
a265061979
allow only 16 virtio devices
...
This is the same number we have in 1.9. In future, most users will uses virtio-scsi, so there is no real need to support more devices here.
2012-08-21 10:03:17 +02:00
Alexandre Derumier
9862764175
print_pci_addr : check if $bridges is initialized
...
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2012-08-21 09:59:42 +02:00
Alexandre Derumier
40f28a9fd9
add bridge hotplug
...
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2012-08-20 13:19:16 +02:00
Dietmar Maurer
3c770faaf8
fix description for max number of devices
2012-08-20 12:13:15 +02:00
Alexandre Derumier
5bdcf9379d
add pci-bridge support and bump MAX_NET and MAX_VIRTIO to 32 devices
...
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2012-08-20 11:25:48 +02:00
Dietmar Maurer
dab36e1ee9
fix bug 242: re-add old monitor code
2012-08-17 10:34:39 +02:00
Alexandre Derumier
c1175c9264
add qemu_block_resize
...
this call storage plugin resize first.
storage plugin will
return undef if we don't need to call qmp block_resize
or
return 1 if we need to call qmp block_resize
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2012-08-07 08:11:55 +02:00
Dietmar Maurer
af990afe34
correctly use new disksize() method
2012-08-01 13:44:54 +02:00
Dietmar Maurer
24afaca0b6
add size hint to drive options
...
We now store the size when we create a drive. This is just a hint, but
good enough to display on the GUI. We can now avoid to query the storage in
vmstatus().
2012-08-01 13:22:43 +02:00
Dietmar Maurer
b1a470ade6
remove more unused subs
2012-08-01 07:29:23 +02:00
Alexandre Derumier
3ea99fc4a1
remove old subs no more used
...
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2012-07-31 11:12:01 +02:00
Alexandre Derumier
cdd2008803
implement virtio-scsi-pci controller
...
This add the new virtio-scsi controller support.
http://wiki.qemu.org/Features/VirtioSCSI
Guest need kernel >= 3.4 to support. Windows drivers are also available in last virtio-win
Advantages :
- true scsi controller.(like lsi but a lot faster, around 5% slower than virtio-blk)
- multiples disk by controller (256 for now)
- scsi passthrough
- discard support (great for ssd or thinp storages)
- bootable
Hotplug is not yet available in 1.1. (already available in git)
to define lsi or virtio-scsi-pci controller for scsi disk:
scsihw: lsi|virtio-scsi-pci
default is lsi if not defined.
A megasas controller is comming form qemu 1.2, so we'll able to simply add it in the list of scsi controllers
lsi0 and lsi1 controllers have been renamed to generic scsihw0 and scsihw1,
so we can use them for both lsi or virtio-scsi controller type. (and use same pci slot addr).
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2012-07-31 11:11:19 +02:00
Alexandre Derumier
2a7993d9ef
replace file_size_info by volume_size_info.
...
Currently we only find a volume size by using qemu-img info (in file_size_info).
This doesn't works with "virtual" storage like sheepdog,rbd,iscsidirect,nexenta.
This also doesn't work with classic iscsi direct plugin.
So, we need to define a method for each plugin.
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2012-07-27 10:51:23 +02:00
Alexandre Derumier
f3f323a3fc
fixes for qemu_block_set_io_throttle
...
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2012-07-16 09:19:38 +02:00
Dietmar Maurer
03a33f3005
new option for vmstatus to query $full informations from KVM using qmp
2012-07-13 09:31:39 +02:00
Dietmar Maurer
7b7c6d1b5d
use qmp for everything - remove old monitor code
2012-07-13 09:00:21 +02:00
Dietmar Maurer
ceea9078ad
use qmp for vm_devices_list
2012-07-13 08:42:13 +02:00
Dietmar Maurer
9df5cbcc70
implement vm_human_monitor_command using qmp
2012-07-13 07:30:13 +02:00
Dietmar Maurer
26f11676c7
use new QMPClient code
2012-07-13 07:21:34 +02:00
Alexandre Derumier
ae287df075
qmp_read_available : correctly handle end of response
...
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2012-07-10 10:10:06 +02:00
Dietmar Maurer
bcb7c9cff5
fix whitespace errors
2012-06-26 06:42:18 +02:00
Alexandre Derumier
608164747f
convert cont monitor command (in vm_start) to qmp
...
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2012-06-26 06:35:35 +02:00
Alexandre Derumier
ec843725c7
convert migrate_set_downtime monitor command to qmp
...
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2012-06-26 06:34:56 +02:00
Alexandre Derumier
2f674c7a5f
convert migrate_set_speed monitor command to qmp
...
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2012-06-26 06:34:23 +02:00
Alexandre Derumier
988903cab5
convert system_powerdown and stop nocheck monitor command to qmp
...
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2012-06-26 06:33:34 +02:00
Alexandre Derumier
816e2c4a53
convert system_reset monitor command to qmp
...
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2012-06-26 06:31:57 +02:00
Alexandre Derumier
6f1dbbea52
convert block_io_throttle monitor command to qmp
...
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2012-06-26 06:31:39 +02:00
Alexandre Derumier
2d23ddc5db
convert balloon monitor command to qmp
...
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2012-06-26 06:31:13 +02:00
Alexandre Derumier
12060fe8c3
convert cont monitor command to qmp
...
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2012-06-26 06:30:45 +02:00
Alexandre Derumier
f77f91f3d4
convert stop monitor command to qmp
...
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2012-06-26 06:30:29 +02:00
Alexandre Derumier
0eedc444b7
add vm_mon_cmd and vm_mon_cmd_nocheck wrapper
...
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2012-06-26 06:29:54 +02:00
Alexandre Derumier
d967756b10
vm_qmp_command : reworks of the sub
...
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2012-06-26 06:26:40 +02:00
Alexandre Derumier
f667373f27
qmp_read_avail : reworks
...
qmp response could me more than 1 json.
we can have 1 json with event info, and 1 json with return infos.
We die if we receive an error message in response.
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2012-06-26 06:21:02 +02:00
Dietmar Maurer
97d62eb73c
fix coding style
2012-05-30 12:08:33 +02:00