Commit Graph

425 Commits

Author SHA1 Message Date
Rohit Yadav cf558be0f6 CLOUDSTACK-8613, CLOUDSTACK-6301: Dump KVM domain XML with secure flag
When dumping XML use appropriate flags:

1, VIR_DOMAIN_XML_SECURE (dump security sensitive information too)
8, VIR_DOMAIN_XML_MIGRATABLE (dump XML suitable for migration)

Source:
https://libvirt.org/html/libvirt-libvirt-domain.html#virDomainXMLFlags

This fixes CVE 2015-3252: VNC password lost during VM migration across KVM
hosts. The issue is also seen when a VM is rebooted.

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
(cherry picked from commit cb2aca7516)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-08-14 10:51:52 +05:30
Daan Hoogland 412016567f Updating pom.xml version numbers for release 4.4.5-SNAPSHOT
Signed-off-by: Daan Hoogland <daan@onecht.net>
2015-06-24 21:44:59 +02:00
Daan Hoogland 6f41061e14 Updating pom.xml version numbers for release 4.4.4
Signed-off-by: Daan Hoogland <daan.hoogland@gmail.com>
2015-06-18 11:17:09 +02:00
Remi Bergsma a26bbc2ce2 CLOUDSTACK-6181: Allow RBD volumes to be resized
We don't need an external script to investigate the format of the RBD volume,
we only have to ask Libvirt to resize the volume and that will ask librbd to
do so.

Backport for 4.4, original commit: 173909e99d
2015-05-21 22:57:12 +02:00
Daan Hoogland 28bcd6aeb7 Updating pom.xml version numbers for release 4.4.4-SNAPSHOT
Signed-off-by: Daan Hoogland <daan@onecht.net>
2015-04-19 15:52:25 +02:00
Daan Hoogland a22c334be5 Merge branch '4.4-RC20150415T1700' into 4.4 2015-04-19 15:48:06 +02:00
NuxRo 377cbd9f4e use eu.ceph.com as ceph.com is down
Same change as in 05e4ba7350

Signed-off-by: Rajani Karuturi <rajanikaruturi@gmail.com>

This closes #175
2015-04-17 09:46:09 +05:30
Daan Hoogland e9441d4786 Updating pom.xml version numbers for release 4.4.3
Signed-off-by: Daan Hoogland <dhoogland@schubergphilis.com>
2015-04-15 17:00:24 -05:00
Remi Bergsma 024a2924b7 kvm: improve CentOS 7 support
CentOS 7 does not ship with ifconfig anymore. We should use ip commands instead.
This also works on older versions, like CentOS 6 and Ubuntu 12.x/14.x, that we
support.

This closes #165

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-04-14 13:56:30 -05:00
Marcus Sorensen fe5d41d8c3 CLOUDSTACK-8263: KVM - virsh resize doesnt refresh libvirt's view of the volume size, refresh pool
Change-Id: I5ea54f7389d72b57bb625e4d87b45b65eb0c96cd
2015-02-18 12:55:37 -08:00
Marcus Sorensen fbb637791c CLOUDSTACK-8263: KVM - use virsh instead of libvirt for resizing qcow2, as libvirt bindings are insufficient
Change-Id: I08246219cb1469a46dc6a9ec76a8c3a67b0b8bf6
2015-02-17 18:10:27 -08:00
Marcus Sorensen f0893d5794 CLOUDSTACK-8263: KVM - notify qemu process of resized volume for libvirt-resized storage
Change-Id: Iddd8bb068855d3565075d3ecf7c6c0f074d00e1a
2015-02-17 17:23:18 -08:00
Rohit Yadav 422235c667 CLOUDSTACK-8198: Use random local storage UUID
Earlier host addition of multiple hosts with local storage failed due to
same local storage UUID being used where the storage path is same.

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
(cherry picked from commit bf17f640c6)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-02-03 22:37:57 +05:30
Marcus Sorensen 84a14f681f Introduced a typo in the license somehow on the last commit 2015-01-23 00:35:39 -08:00
Marcus Sorensen e2bb4cf583 LibvirtComputingResource: Expose KVMStoragePoolManager
KVMStoragePoolManager is a singleton in practice, any plugin
or extension of LibvirtComputingResource will need to act on
the specific instance of KVMStoragePoolManager that LibvirtComputingResource
has initialized. Therefore, expose this variable for those who
wish to call storage commands from plugins or extensions.

Conflicts:
	plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java
2015-01-23 00:13:19 -08:00
Wei Zhou 4a7532ee65 CLOUDSTACK-2823: pass cmdline info to system vms for 30 times
(cherry picked from commit 4eedfe53fc)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>

Conflicts:
	systemvm/patches/debian/config/etc/init.d/cloud-early-config
2014-12-11 13:14:01 +05:30
Daan Hoogland 7e409ea300 Updating pom.xml version numbers for release 4.4.3-SNAPSHOT
Signed-off-by: Daan Hoogland <daan@onecht.net>
2014-11-25 15:36:02 +01:00
Daan Hoogland e0420a6fec Updating pom.xml version numbers for release 4.4.2
Signed-off-by: Daan Hoogland <daan@onecht.net>
2014-11-21 03:41:26 +01:00
Daan Hoogland a2a82f517b CLOUDSTACK-3383 escaped "'s 2014-11-11 22:15:35 +01:00
Wido den Hollander ee8facd382 CLOUDSTACK-3383: Fetch CPU utilization more reliable.
This should fix that we can't gather CPU statistics on hypervisors
> Ubuntu 12.04
2014-11-11 21:48:50 +01:00
Daan Hoogland b9620c2cbe Updating pom.xml version numbers for release 4.4.2-SNAPSHOT
Signed-off-by: Daan Hoogland <daan@onecht.net>
2014-10-19 20:46:15 +02:00
Wido den Hollander 4f0fc5cb20 kvm: Return capitalized NONE when no disk cache mode is set
This caused Instances not to start under rare circumstances
2014-08-19 00:08:00 +02:00
Wei Zhou d0e0edca11 CLOUDSTACK-6893: fix enum ValueOf issue which causes systemvm fail to start
(cherry picked from commit 63ff5a7cbc)
2014-07-28 16:02:31 +02:00
Daan Hoogland c9383c441e Updating pom.xml version numbers for release 4.4.1-SNAPSHOT
Signed-off-by: Daan Hoogland <daan@onecht.net>
2014-07-23 16:55:31 +02:00
Santhosh Edukulla 61cf175f1c Coverity issues: Fixed conflicts
Signed-off-by: Daan Hoogland <daan@onecht.net>
2014-06-17 13:49:55 +02:00
Edison Su 91391e6779 CLOUDSTACK-6464: if guest network type is vlan://untagged, and traffic label is used, kvm agent needs to honor traffic label
(cherry picked from commit dfb59cd6cc)
2014-06-04 16:49:43 +02:00
Wido den Hollander 93cc3e80d9 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:39:49 +02:00
Amogh Vasekar 02bd3d0671 CLOUDSTACK-6358: As a part of supporting dynamic guest OS defined by user, removing the hard-coded dependencies.
This patch is for KVM

1. Local testing on KVM
2. Successfully got up system VMs
3. Successfully created a CentOS VM
4. Snapshots are not supported for KVM

 Signed off by :- Nitin Mehta<nitin.mehta@citrix.com>
2014-05-13 10:33:15 +02:00
Wido den Hollander 1aff3a5f08 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

Conflicts:

	plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/storage/LibvirtStorageAdaptor.java
2014-05-02 18:49:28 +02:00
Murali Reddy 4c0505f649 remove the unintended file checked in 2014-04-18 19:18:54 +05:30
Murali Reddy 18c269a575 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.
2014-04-18 18:14:14 +05:30
Murali Reddy 192856fdcc add support for sequence numner in the VPC topology updates and VPC
routing policy updates
2014-04-18 18:14:13 +05:30
Koushik Das 800e9dbac5 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:12:35 +05:30
Wido den Hollander 8764692b27 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 15:20:49 +02:00
Wido den Hollander 95f6f65312 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-04-11 15:20:34 +02:00
Wido den Hollander 75792bf08e CLOUDSTACK-4665: 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.

Conflicts:

	plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/storage/LibvirtStorageAdaptor.java
2014-04-10 15:59:12 +02:00
Kishan Kavala 295fa84d4d CLOUDSTACK-6371: Set snapshot size in copycommand answer during snapshot backup 2014-04-10 15:28:48 +05:30
Anthony Xu 73c4e83ace make sure volumeUuid is not full path 2014-04-08 16:35:31 -07:00
Sheng Yang c388afc8cd CLOUDSTACK-6309: Fix timeout in KVM when execute VR commands
Timeout is in seconds rather than milliseconds.
2014-03-31 11:29:02 -07:00
edison b2f4939402 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-27 17:38:40 -07:00
edison 04220daf4c CLOUDSTACK-5737: ignore umount secondary storage failure during backup snapshot 2014-03-27 17:38:38 -07:00
Edison Su 9900ae7002 CLOUDSTACK-5737: isExternalSnapshot should return true for CLVM and RBD only 2014-03-27 17:38:35 -07:00
Marcus Sorensen eacc1d7fff CLOUDSTACK-6292: Fix live migration of KVM when vnc ip address
changes

Submitted-by: Yoshikazu Nojima
2014-03-27 16:47:00 -06:00
Kishan Kavala 50b92054c5 CLOUDSTACK-6122: Map rbd image on host before attaching to Vm 2014-03-27 14:35:09 +05:30
Sheng Yang d56b45a1c3 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-24 13:37:38 -07:00
Marcus Sorensen e9e2ee3ac5 CLOUDSTACK-6181: Merge of resize root feature (resize-root branch) 2014-03-14 03:40:08 -06: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