465 Commits

Author SHA1 Message Date
amoghvk
3d8dd1c921 Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/cloudstack 2014-07-14 17:30:12 -07:00
Amogh Vasekar
09069fcc87 CLOUDSTACK-6358: Add missing patches in master for KVM 2014-07-14 16:51:55 -07:00
Edison Su
e1095b0110 revert the change made by commit: a600d840 2014-07-14 14:10:16 -07:00
ynojima
e7392cdac6 Remove "--output" option from qemu-img info command call
since the option is not supported by qemu-img in CentOS 6.3
2014-07-13 00:33:16 -06:00
Hugo Trippaers
b9145beab6 Fix CID 1116267 Don't modify the set while the iterator is still in use. 2014-07-04 16:48:28 +02:00
Santhosh Edukulla
a600d8408e Fixed Resource Leaks, null dereferences, few other issues reported by coverity 2014-07-04 16:17:58 +05:30
Wido den Hollander
84cfb47281 kvm: Use getStoragePool after createStoragePool when we create a libvirt pool
This removes some redundant code
2014-05-28 10:34:20 +02:00
Marcus Sorensen
7ce3034299 CLOUDSTACK-6790: Disable PXE ROM for system vm nics 2014-05-27 16:52:26 -06:00
Marcus Sorensen
f3a0d257b8 CLOUDSTACK-6788: Add agent property to optionally disable kvmclock on guests 2014-05-27 16:16:41 -06:00
Wido den Hollander
48899e4c81 CLOUDSTACK-6783: Return a proper LibvirtStoragePool object after creating the pool
In situations where libvirt lost the storage pool the KVM Agent will re-create the
storage pool in libvirt.

This could be then libvirt is restarted for example.

The object returned internally was missing essential information like the sourceDir
aka the Ceph pool, the monitor IPs, cephx information and such.

In this case the first operation on this newly created pool would fail. All operations
afterwards would succeed.
2014-05-27 16:21:07 +02:00
Wido den Hollander
a7004db7c8 rbd: Create snapshot for cloning operations only when it is required
We used to create the snapshot after the copy from Secondary Storage,
but it could be that we never use the snapshot.

Now we check if the snapshot exists prior to performing the cloning operation
2014-05-02 11:55:34 +02:00
Wido den Hollander
3962577329 CLOUDSTACK-4549: Do not force RBD snapshot backups to RAW format
Since we use qemu-img to copy from RBD to Secondary Storage we no
longer have to force to RAW images, but can stick with QCOW2

When the snapshot backups are QCOW2 format they can easily be deployed
again when restoring from a backup
2014-05-01 21:03:11 +02:00
Wido den Hollander
c1116142a3 kvm: Better handle different volume formats when creating a volume
The KVMStorageProcessor no longer has a hardcoded if-statement which sets
RBD volumes to RAW, this is now handled in the LibvirtStorageAdapter

The Management Server still sends QCOW2 as format. That's a fix for later.
2014-05-01 21:03:11 +02:00
Murali Reddy
42b5e1858c incorporate change in getGuestNicModel signature, while handling OVS in
OvsVifDriver
2014-04-25 15:41:02 +05:30
Murali Reddy
771abe4286 fix KVM plug-in for OVS tunnel network. Fix addreses two issues.
fix  mismatch of ovs-host-setup, ovs_host_setup used Libvirt resource and
scripts

plug the nic to OVS bridges created for the tunnel network.

Conflicts:
	plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/OvsVifDriver.java
2014-04-25 15:02:17 +05:30
Marcus Sorensen
6ca4e3acb6 CLOUDSTACK-6500: Make KVM agent aware of rootDiskController
and nicAdapter parameters passed in StartCommand, provided
    by template details
2014-04-24 19:01:33 -06:00
Wido den Hollander
c9b22af6c7 kvm: Add more log lines around storage pool operations 2014-04-17 17:42:17 +02:00
Koushik Das
5e90b75c98 CLOUDSTACK-6402: Fix StopCommand so that VMs are not removed accidentally as part of vmsync
Added a new flag 'checkBeforeCleanup' to StopCommand based on which check is done to see if VM is running in HV host.
If VM is running then in this case it is not stopped and the operation bails out.
Also modified the MS code to call the StopCommand with appropriate value for the flag based on the context.
Currently it is only set to 'true' when called from the new vmsync logic based on powerstate of VM. For rest it
is set to 'false' meaning no change in behaviour.
2014-04-14 16:52:37 +05:30
Wido den Hollander
8d2baf8017 rbd: Use qemu-img to backup up a RBD snapshot to Secondary Storage
This reduces the amount of time and storage it takes dramatically. We no longer
do a full copy, but a sparse copy. The destination image is still in RAW
format, but we only copy over used blocks.

Qemu is also better in doing this then us doing it in Java code.
2014-04-11 14:00:08 +02:00
Marcus Sorensen
11f5bdd78d CLOUDSTACK-6191 Add support for specifying volume provisioning
type (thin, sparse, fat) in disk/compute offerings.

Submitted-by: Yoshikazu Nojima <mail@ynojima.net>
Reviewed-by: Marcus Sorensen, Mike Tutowski
2014-04-10 09:23:04 -06:00
Wido den Hollander
4ba688f07d kvm: Add more debugging information when a volume is deleted.
There was no clear reference of libvirt being instructed to remove
the volume
2014-04-10 14:33:49 +02:00
Kishan Kavala
85072cb6b9 CLOUDSTACK-6371: Set snapshot size in copycommand answer during snapshot backup 2014-04-10 14:45:14 +05:30
Wido den Hollander
0615d4e6a5 rbd: Check if a snapshot is protected before trying to unprotect
Otherwise a RBDException will be thrown with the message that the snapshot
isn't protected.
	modified:   plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/storage/LibvirtStorageAdaptor.java
2014-04-10 05:30:06 +02:00
Anthony Xu
8d1c90684f make sure volumeUuid is not full path 2014-04-08 16:34:59 -07:00
Wido den Hollander
6da087e601 rbd: Add some more debugging while deleting a physical disk 2014-04-07 06:20:57 +02:00
Sheng Yang
b2ffd86570 CLOUDSTACK-6309: Fix timeout in KVM when execute VR commands
Timeout is in seconds rather than milliseconds.
2014-03-31 11:30:06 -07:00
edison
d1d855fef4 CLOUDSTACK-5857: for some reasons, delete secondary pool failed during copy template from secondary storage to primary storage, but the volume is already copied to primary storage, we didn't clean up the volume on primary storage, then all the following copy the same template to primary storage failed, as we are always using the same uuid when creating a new volume, libvirt complaining that the volume already exists.
Current fix is ignoring "the delete secondary storage error".
2014-03-28 16:23:34 -07:00
edison
a8bfb3dd00 CLOUDSTACK-5737: ignore umount secondary storage failure during backup snapshot 2014-03-28 16:22:24 -07:00
Edison Su
b1bba4b3fb CLOUDSTACK-5737: isExternalSnapshot should return true for CLVM and RBD only 2014-03-28 16:14:59 -07:00
Daan Hoogland
8b62b2cb92 findbugs: exclude known spiffy hacks a.k.a. false positives 2014-03-28 14:28:10 +01:00
Marcus Sorensen
7390f99afb CLOUDSTACK-6292: Fix live migration of KVM when vnc ip address
changes

Submitted-by: Yoshikazu Nojima
2014-03-27 16:45:42 -06:00
Kishan Kavala
fe7b753b03 CLOUDSTACK-6122: Map rbd image on host before attaching to Vm 2014-03-27 14:53:36 +05:30
Wido den Hollander
9763faf85e rbd: Use qemu-img to convert from QCOW2 templates to RBD directly.
This saves the step of writing to a temporary image in /tmp first before
writing to RBD.

This is possible due to a new version in librbd. With the rbd_default_format
setting we can now force qemu-img to create format 2 RBD images.

This is available since Ceph version 0.67.5 (Dumpling).
2014-03-24 16:35:13 +01:00
Sheng Yang
1d3a6eaa50 CLOUDSTACK-6047: Fix timeout issue when try to execute aggregated commands
Add executeInVR() with timeout interface to VirtualRouterDeployer

AggregationControlCommand with Action.Finish may take longer than normal command
since it would execute all the commands in one execution, and it may result in
SSH timeout for SshHelper or other mechanism communicate with VR.

Introduce an new executeInVR() interface with added timeout period for waiting
FinishAggregationCommand to complete execution.
2014-03-18 17:43:59 -07:00
Marcus Sorensen
d638d04cbf CLOUDSTACK-6181: Merge of resize root feature (resize-root branch) 2014-03-14 07:17:33 -06:00
Hugo Trippaers
4402685e11 Update master to 4.5.0-SNAPSHOT 2014-03-14 14:55:26 +01:00
Murali Reddy
36541a2f4c adding distributed routing support for KVM OVS
some check style error fixes
2014-03-14 16:56:38 +05:30
Murali Reddy
e045883c52 introduce OvsNetworkTopologyGuru that has convinenace functions to
- get the hosts on which VPC spans given vpc id
   - get the VM's in the VPC
   - get the hosts on which a network spans
   - get the VPC's to which a hosts is part of
   - get VM's of a VPC on a hosts

introduces capability to build a physical toplogy representation of a
VPC. This json file is encapsulated in
OvsVpcPhysicalTopologyConfigCommand, and is used to send full topology
to hypervisor hosts. On hypervisor this json config can be used to setup
tunnels, configure bridge, add flow rules etc

Ovs GURU, to use different broasdcast scheme VS://vpcid.gerkey for the
networks in VPC that use distributed routing

each VIF and tunnel interface to carry the network UUID in other/options
config
2014-03-14 16:56:37 +05:30
Alena Prokharchyk
6c23e201ad 1) More fixes for the problems found by findBugs
2) Corrected some logging in  MidoNetPublicNetworkGuru - removed .toString method call on the objects in the log body as toString is called on the object by default when use log4j
2014-03-13 16:05:45 -07:00
Kishan Kavala
6d4b979c4d CLOUDSTACK-6122: LXC systemVms run on KVM. If they are not included in the VmState report, MS assumes that system Vms are not running. MS will stop these Vms and spin new ones. So on LXC hosts, KVM Vms also have to be included in the Vmlist 2014-03-11 23:49:28 +05:30
Marcus Sorensen
c874e20c24 CLOUDSTACK-6225: Check libvirt version and volume format before
adding flag VIR_STORAGE_VOL_RESIZE_ALLOCATE to resize volume
libvirt call
2014-03-11 11:13:12 -06:00
Anthony Xu
ab1d3af460 Use seperate path to sync VM metadata for XS
VM status sync only does VM status sync
2014-03-05 15:44:50 -08:00
Marcus Sorensen
e5449e29c9 CLOUDSTACK-6203: KVM Migration fixes. Moved migration to a thread
so we can monitor it and potentially take action to make migration
complete if admin has defined such.
2014-03-05 12:24:04 -07:00
Marcus Sorensen
fb0b2eb267 CLOUDSTACK-6192: Return failure on StartCommand and PrepareForMigrationCommand
when connectPhysicalDisk fails, rather than continuing on
2014-03-04 14:18:51 -07:00
Wido den Hollander
1f9649bc3b kvm: Fix a NullPointerException which occurs when storage pool creation fails
Also make the logging around creating a RBD storage pool a bit better when creating
that fails.
2014-03-04 16:03:11 +01:00
Kelven Yang
414b1cbb22 let KVM only report running VM to workaround the problem when KVM still keeps stopped-VM around in some cases 2014-02-28 15:35:59 -08:00
Jayapal
cb1c287433 CLOUDSTACK-6183: Unplug the nic when all the ips from the public subnet is released 2014-02-28 16:46:57 +05:30
Min Chen
a6f17675d4 CLOUDSTACK-6175:s3.singleupload.max.size option not applicable for
backup snapshot on KVM.
2014-02-26 15:13:49 -08:00
Wido den Hollander
abf3c055c2 templates: Add FreeBSD 10 template
With VirtIO enabled on KVM. FreeBSD 10 supports VirtIO for both the
network and the disks. This frees us from IDE and E1000 which should
also improve performance.
2014-02-25 14:56:24 +01:00
Niels de Vos
14689d7810 Gluster should store volumes in qcow2 format
By default all network disks are in RAW format. Gluster works fine with
QCOW2 which has some advantages.

Disks are by default in QCOW2 format. It is possible to run into
a mismatch, where the disk is in QCOW2 format, but QEMU gets started
with format=raw. This causes the virtual machines to lockup on boot.

Failures to start a virtual machine can be verified by checking the log
of the virtual machine, and compare the output of 'qemu-img info'.

In /var/log/libvirt/qemu/<VM>.log find the URL for the drive:

    -drive file=gluster+tcp://...,format=raw,..

Compare this with the 'qemu-img info' output of the same file, mounted
under /mnt/<pool-uuid>/<img-uuid>:

    # qemu-img info /mnt/<pool-uuid>/<img-uuid>
    ...
    file format: qcow2
    ...

This change makes passes the format when creating a disk located on RBD
(RAW only) and Gluster (QCOW2).

Signed-off-by: Niels de Vos <ndevos@redhat.com>
2014-02-25 12:08:46 +01:00