465 Commits

Author SHA1 Message Date
Wei Zhou
258118efa6 CLOUDSTACK-4405: additional patch for bridge name and firewall rules issues after KVM upgrade to 4.2
There still exist two issues after Edison's commits.
(1) Migration from new hosts to old hosts failed.
The bridge name on old host is set to cloudVirBr* if network.bridge.name.schema is set to 3.0 in /etc/cloudstack/agent/agent.properties, but the actual bridge name is breth*-* after running cloudstack-agent-upgrade.
(2) all ports of vms (Basic zone, or Advanced zone with security groups) on old hosts are open, because the iptables rules are binding to device (bridge) name which is changed by cloudstack-agent-upgrade.

After this, the KVM upgrade steps :
a. Install 4.2 cloudstack agent on each kvm host
b. Run "cloudstack-agent-upgrade". This script will upgrade all the existing bridge name to new bridge name, and update related firewall rules.
c. install a libvirt hook:
    c1. mkdir /etc/libvirt/hooks
    c2. cp /usr/share/cloudstack-agent/lib/libvirtqemuhook /etc/libvirt/hooks/qemu
    c3. chmod +x /etc/libvirt/hooks/qemu
    c4. service libvirtd restart
    c5. service cloudstack-agent restart

Signed-off-by: Wei Zhou <w.zhou@leaseweb.com>
2013-09-24 09:55:00 +02:00
Edison Su
e325fb66ab CLOUDSTACK-4405: fix vm migration during the upgrade to 4.2
Signed-off-by: Wei Zhou <w.zhou@leaseweb.com>
2013-09-24 09:53:55 +02:00
Daan Hoogland
2614b00c51 sdn hosted vpc gateways (using lswitch) 2013-09-18 16:56:56 +02:00
Marcus Sorensen
2b4e994a4d CLOUDSTACK-3565 - fix for new libvirt behavior when defining NFS
pools that are already mounted in KVM hypervisor
2013-09-17 10:53:35 -06:00
Wido den Hollander
a709f34ff9 kvm: During migrate change the VNC listen address
The migrate method from libvirt supports passing down a different XML for running
the instance of the target hypervisor.

This enables the VNC to bind to the private IP Address of the hypervisor and during
migration this will be changed to the private IP address of the target host.

This way VNC doesn't listen world wide and is much safer.
2013-09-16 11:57:16 +02:00
Wei Zhou
5c141a46fc CLOUDSTACK-4610: fix incorrect value available_bytes of storage pool 2013-09-05 11:16:12 +02:00
Daan Hoogland
d9c06e538b CLOUDSTACK-4346 replace URI getHost() and create(String) calls with BroadcastDomainType methods 2013-09-01 22:53:23 +02:00
Wido den Hollander
c3a275fc75 CLOUDSTACK-4423: Do not always append .qcow2 to volume names when copying
Disk images are not always in the QCOW2 format, so don't assume that the
filename will always and in .qcow2
2013-08-27 18:34:39 +02:00
Min Chen
49dd7289c0 CLOUDSTACK-4468:template created from snapshot is destroyed once we
restart management server.
2013-08-26 11:58:53 -07:00
Toshiaki Hatano
914e7c4542 Revert "CLOUDSTACK-2328: Linux native VXLAN support on KVM hypervisor"
This reverts commit 34ae32e0c24777f9ac9cf265447688a3e21680c7.
2013-08-24 07:12:23 +00:00
Toshiaki Hatano
34ae32e0c2 CLOUDSTACK-2328: Linux native VXLAN support on KVM hypervisor
Initial patch for VXLAN support.
Fully functional, hopefully, for GuestNetwork - AdvancedZone.

Patch Note:
 in cloudstack-server
- Add isolation method VXLAN
- Add VxlanGuestNetworkGuru as plugin for VXLAN isolation
- Modify NetworkServiceImpl to handle extended vNet range for VXLAN isolation
- Add VXLAN isolation option in zoneWizard UI

 in cloudstack-agent (kvm)
- Add modifyvxlan.sh script that handle bridge/vxlan interface manipulation script
-- Usage is exactly same to modifyvlan.sh
- BridgeVifDriver will call modifyvxlan.sh instead of modifyvlan.sh when VXLAN is used for isolation

Database changes:
- No change in database structure.
- VXLAN isolation uses same tables that VLAN uses to store vNet allocation status.

Known Issue:
- Some resource still says 'VLAN' in log even if VXLAN is used
- in UI, "Network - GuestNetworks" dosen't display VNI
-- VLAN ID field displays "N/A"
2013-08-24 01:39:11 +00:00
Wido den Hollander
fb9ceba93b CLOUDSTACK-4424: Download RBD volume created from snapshot
This failed due to a RAW -> QCOW2 conversion (again).

The current code still makes to much assumptions about everything always
being QCOW2 while that is not always true.
2013-08-23 16:17:22 +02:00
Rajesh Battala
61c5b4bf75 fix for kvm test failure
(cherry picked from commit 6c593b0b16f37951c0c30b2ad3cff69835085fe2)
2013-08-20 20:14:53 +05:30
Nitin Mehta
e6b53e5529 CLOUDSTACK-4386
KVM - Create template from volume
Vmware - Create template from volume / Create template from snapshot
send the physical size in the copycommand which accordingly will populate template store ref and the usage_event tables with the right physical size
Signed off by : nitin mehta<nitin.mehta@citrix.com>
2013-08-20 19:21:32 +05:30
Edison Su
d89667ed47 fix unit test 2013-08-19 15:26:11 -07:00
Edison Su
3c098c0876 CLOUDSTACK-4338: fix NPE if create volume failed 2013-08-19 15:25:46 -07:00
Edison Su
a7f3e1ec97 CLOUDSTACK-4300: possible fix: cputune feature is only available after 0.9.0, so start vm can fail on rhel 6.1 2013-08-19 15:24:56 -07:00
Edison Su
90388ce77e CLOUDSTACK-4315: add code to clean up libvirt data structure after plug/unplug, that's the only thing I can do to fix this kind of libvirt issue 2013-08-14 16:59:07 -07:00
Edison Su
dd6b245221 CLOUDSTACK-4318: clean up snapshot stored in staging area, after backup snapshot to object store 2013-08-14 14:59:25 -07:00
Edison Su
374de76dae CLOUDSTACK-4324: need to clean up snapshot_store_ref, if creating snapshot failed. 2013-08-14 14:59:19 -07:00
Wido den Hollander
3c35faaf5a CLOUDSTACK-4278: Fix resizing RBD volumes
Although libvirt supports resizing RBD volumes (and other formats) the
Java bindings (libvirt-java) don't.

Right now we use the Java bindings for librbd to handle the resizing for us,
but in the future this should be done by libvirt rather then these
Java bindings.
2013-08-14 16:15:09 +02:00
Wido den Hollander
d7f738fb64 rbd: When the template is a RAW image, do not use a temp file when deploying 2013-08-14 13:28:08 +02:00
Wei Zhou
c3bc9d65dd Remove unused method deleteVbdByPath from KVM storage classes 2013-08-13 23:51:05 +02:00
Wido den Hollander
04f378bcff CLOUDSTACK-4114: Use RAW disk images for RBD instead of QCOW2 2013-08-13 16:14:45 +02:00
Hugo Trippaers
d57796b94f Fix XML validation errors 2013-08-13 08:25:45 +02:00
Edison Su
1a6b7d6714 CLOUDSTACK-4216: fix extract volume for kvm 2013-08-12 17:20:15 -07:00
Edison Su
9a89fd94fc CLOUDSTACK-4211: fix s3 on kvm 2013-08-12 17:20:09 -07:00
JijunLiu
8d53887cec add doc for kvm cpu model
Signed-off-by: Wei Zhou <w.zhou@leaseweb.com>
2013-08-12 15:19:25 +02:00
Wei Zhou
6d86af85ba CLOUDSTACK-2729: increase waiting timeout for global file lock to 300 seconds 2013-08-09 08:58:46 +02:00
Edison Su
ec2eafdfde CLOUDSTACK-3538: if passcmdline succeed, don't need to retry again, and increase the retry to 5 minutes at most 2013-08-08 17:21:38 -07:00
Wei Zhou
b2ed632396 CLOUDSTACK-2729: use spd.getTargetPath instead of mount path to fix issue on local storage 2013-08-08 16:38:07 +02:00
Edison Su
e115ee4026 CLOUDSTACK-3535: still maintain stop agent wont trigger HA 2013-08-07 14:43:16 -07:00
Edison Su
5b0314fff9 CLOUDSTACK-3535: add kvminvestigator to investirage kvm host
Conflicts:

	plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java
2013-08-07 11:44:19 -07:00
Marcus Sorensen
883210e1fe Revert "Summary: Use hypervisor as clock source for system vms"
removing due to CLOUDSTACK-2872, ubuntu 12.04's libvirt isn't new enough

This reverts commit c7ebcb4e8c287ae88d2f6e6d71cc536612a5e635.
2013-08-06 23:10:33 -06:00
Min Chen
45c34b9ca8 CLOUDSTACK-4116: Volume operations fail: InvocationTargetException when
invoking RPC callback for command: createVolumeCallback
2013-08-06 15:41:58 -07:00
Marcus Sorensen
e5741863f7 Summary: Quiet erroneous stopVM failures on kvm
Detail: Cloudstack tries to stop VMs all the time, for all sorts of reasons,
but usually just to get into a known state.  Libvirt throws an exception of
'Domain not found' when attempting to stop a VM that doesn't exist. This causes
problems for troubleshooting real issues. Domain not found should equate
to success if trying to stop.

BUG-ID: CLOUDSTACK-4011
Bugfix-for: 4.2
Signed-off-by: Marcus Sorensen <marcus@betterservers.com> 1375825281 -0600
2013-08-06 15:46:36 -06:00
Wei Zhou
5cb090ed40 CLOUDSTACK-2729: move unlock to finally block to handle failed libvirt operations 2013-08-06 12:40:06 +02:00
Wei Zhou
1e4ff7f453 CLOUDSTACK-2729: use file lock to prevent concurrent refreshPool/deleteVolume on KVM shared storage pool
Signed-off-by: Edison Su <sudison@gmail.com>
2013-08-05 11:24:03 -07:00
Wido den Hollander
52099e42b8 rbd: Move some logic from LibvirtComputingResource into KVMStorageProcessor
All this logic was in LibvirtComputingResource but seems redundant. Move it
into the KVMStorageProcessor
2013-08-05 17:34:13 +02:00
Wido den Hollander
3fb58c42c4 CLOUDSTACK-4004: Fix attaching a newly allocated RBD image to an Instance
Signed-off-by: Wido den Hollander <wido@42on.com>
2013-08-02 13:19:12 +02:00
JijunLiu
2903bb5fd9 Add cpu model for kvm guest.Now all the kvm guest's cpu model is 'QEMU Virtual CPU version xxx'. This will affect the activation of Windows OS and low performance. I add three mode for user to indicate the guest cpu model.add libvirt version check
Signed-off-by: Wei Zhou <w.zhou@leaseweb.com>
2013-08-02 11:56:59 +02:00
Edison Su
3a928d7db0 CLOUDSTACK-4008: return virtual size of volume in KVM 2013-08-01 13:25:49 -07:00
Chip Childers
8225374138 Updating pom.xml version numbers for release 4.3.0-SNAPSHOT
Signed-off-by: Chip Childers <chipchilders@apache.org>
2013-08-01 10:35:00 -04:00
Wido den Hollander
b611394cca rbd: Enable snapshotting of RBD images
Signed-off-by: Wido den Hollander <wido@42on.com>
2013-08-01 01:12:42 +02:00
Toshiaki Hatano
7774ecfd5a CLOUDSTACK-3959: [KVM] agent setup failed when physical interface name is in pXpY format
Add handling.

Signed-off-by: Edison Su <sudison@gmail.com>
2013-07-30 16:17:12 -07:00
Alex Huang
3d2e49bcfc Changed the log4j config files to log org.apache.cloudstack in debug and change the layout format 2013-07-26 20:35:49 -07:00
Edison Su
7f200d966e CLOUDSTACK-3681: fix bunch of bugs related to vmware, regarding to snapshot 2013-07-24 19:06:30 -07:00
Min Chen
2f1d4dd0ba CLOUDSTACK-3665:KVM specific issue in create volume from snapshot. 2013-07-24 18:36:28 -07:00
Jayapal
2d6644d961 CLOUDSTACK-2433 Enable rps and rfs in virtual router 2013-07-17 16:59:59 +05:30
Edison Su
bf32776f9f be able to upload template into swift 2013-07-16 18:07:06 -07:00