diff --git a/api/src/org/apache/cloudstack/api/response/VpnUsersResponse.java b/api/src/org/apache/cloudstack/api/response/VpnUsersResponse.java
index e654e8a522a..c29a37e7a48 100644
--- a/api/src/org/apache/cloudstack/api/response/VpnUsersResponse.java
+++ b/api/src/org/apache/cloudstack/api/response/VpnUsersResponse.java
@@ -48,6 +48,8 @@ public class VpnUsersResponse extends BaseResponse implements ControlledEntityRe
@SerializedName(ApiConstants.PROJECT) @Param(description="the project name of the vpn")
private String projectName;
+ @SerializedName(ApiConstants.STATE) @Param(description="the state of the Vpn User")
+ private String state;
public void setId(String id) {
this.id = id;
@@ -80,4 +82,12 @@ public class VpnUsersResponse extends BaseResponse implements ControlledEntityRe
this.projectName = projectName;
}
+ public String getState() {
+ return state;
+ }
+
+ public void setState(String state) {
+ this.state = state;
+ }
+
}
diff --git a/docs/en-US/Installation_Guide.xml b/docs/en-US/Installation_Guide.xml
index 2f60acac984..f2f27ad9621 100644
--- a/docs/en-US/Installation_Guide.xml
+++ b/docs/en-US/Installation_Guide.xml
@@ -57,5 +57,6 @@
+
diff --git a/docs/en-US/best-practices.xml b/docs/en-US/best-practices.xml
new file mode 100644
index 00000000000..41d7cde9036
--- /dev/null
+++ b/docs/en-US/best-practices.xml
@@ -0,0 +1,82 @@
+
+
+%BOOK_ENTITIES;
+]>
+
+
+
+
+ Best Practices
+ Deploying a cloud is challenging. There are many different technology choices to make, and &PRODUCT; is flexible enough in its configuration that there are many possible ways to combine and configure the chosen technology. This section contains suggestions and requirements about cloud deployments.
+ These should be treated as suggestions and not absolutes. However, we do encourage anyone planning to build a cloud outside of these guidelines to seek guidance and advice on the project mailing lists.
+
+ Process Best Practices
+
+
+ A staging system that models the production environment is strongly advised. It is critical if customizations have been applied to &PRODUCT;.
+
+
+ Allow adequate time for installation, a beta, and learning the system. Installs with basic networking can be done in hours. Installs with advanced networking usually take several days for the first attempt, with complicated installations taking longer. For a full production system, allow at least 4-8 weeks for a beta to work through all of the integration issues. You can get help from fellow users on the cloudstack-users mailing list.
+
+
+
+
+ Setup Best Practices
+
+
+ Each host should be configured to accept connections only from well-known entities such as the &PRODUCT; Management Server or your network monitoring software.
+
+
+ Use multiple clusters per pod if you need to achieve a certain switch density.
+
+
+ Primary storage mountpoints or LUNs should not exceed 6 TB in size. It is better to have multiple smaller primary storage elements per cluster than one large one.
+
+
+ When exporting shares on primary storage, avoid data loss by restricting the range of IP addresses that can access the storage. See "Linux NFS on Local Disks and DAS" or "Linux NFS on iSCSI".
+
+
+ NIC bonding is straightforward to implement and provides increased reliability.
+
+
+ 10G networks are generally recommended for storage access when larger servers that can support relatively more VMs are used.
+
+
+ Host capacity should generally be modeled in terms of RAM for the guests. Storage and CPU may be overprovisioned. RAM may not. RAM is usually the limiting factor in capacity designs.
+
+
+ (XenServer) Configure the XenServer dom0 settings to allocate more memory to dom0. This can enable XenServer to handle larger numbers of virtual machines. We recommend 2940 MB of RAM for XenServer dom0. For instructions on how to do this, see http://support.citrix.com/article/CTX126531. The article refers to XenServer 5.6, but the same information applies to XenServer 6.0.
+
+
+
+
+ Maintenance Best Practices
+
+
+ Monitor host disk space. Many host failures occur because the host's root disk fills up from logs that were not rotated adequately.
+
+
+ Monitor the total number of VM instances in each cluster, and disable allocation to the cluster if the total is approaching the maximum that the hypervisor can handle. Be sure to leave a safety margin to allow for the possibility of one or more hosts failing, which would increase the VM load on the other hosts as the VMs are redeployed. Consult the documentation for your chosen hypervisor to find the maximum permitted number of VMs per host, then use &PRODUCT; global configuration settings to set this as the default limit. Monitor the VM activity in each cluster and keep the total number of VMs below a safe level that allows for the occasional host failure. For example, if there are N hosts in the cluster, and you want to allow for one host in the cluster to be down at any given time, the total number of VM instances you can permit in the cluster is at most (N-1) * (per-host-limit). Once a cluster reaches this number of VMs, use the &PRODUCT; UI to disable allocation to the cluster.
+
+
+ The lack of up-do-date hotfixes can lead to data corruption and lost VMs.
+ Be sure all the hotfixes provided by the hypervisor vendor are applied. Track the release of hypervisor patches through your hypervisor vendor’s support channel, and apply patches as soon as possible after they are released. &PRODUCT; will not track or notify you of required hypervisor patches. It is essential that your hosts are completely up to date with the provided hypervisor patches. The hypervisor vendor is likely to refuse to support any system that is not up to date with patches.
+
+
diff --git a/docs/en-US/changed-apicommands-4.1.xml b/docs/en-US/changed-apicommands-4.1.xml
index 42bd088afb3..f0045a56de3 100644
--- a/docs/en-US/changed-apicommands-4.1.xml
+++ b/docs/en-US/changed-apicommands-4.1.xml
@@ -34,15 +34,139 @@
createNetworkOffering
+
+
+ The following request parameters have been added:
+
+
+ isPersistent
+
+
+ startipv6
+
+
+ endipv6
+
+
+ ip6gateway
+
+
+ ip6cidr
+
+
+
+
+
+
listNetworkOfferings
listNetworks
- The following request parameters is added: isPersistent.
- This parameter determines if the network or network offering created or listed by
- using this offering are persistent or not.
+ The following request parameters has been added: isPersistent
+ This parameter determines if the network or network offering listed by using this
+ offering are persistent or not.
+
+
+ createVlanIpRange
+
+
+ The following request parameters have been added:
+
+
+ startipv6
+
+
+ endipv6
+
+
+ ip6gateway
+
+
+ ip6cidr
+
+
+
+
+
+
+ deployVirtualMachine
+
+
+ The following parameter has been added: ip6Address.
+ The following parameter is updated to accept the IPv6 address:
+ iptonetworklist.
+
+
+
+
+ CreateZoneCmd
+
+
+ The following parameter are added: ip6dns1, ip6dns2.
+
+
+
+
+ listRouters
+ listVirtualMachines
+
+
+ For nic responses, the following fields has been added.
+
+
+ ip6address
+
+
+ ip6gateway
+
+
+ ip6cidr
+
+
+
+
+
+
+ listVlanIpRanges
+
+
+ For nic responses, the following fields has been added.
+
+
+ startipv6
+
+
+ endipv6
+
+
+ ip6gateway
+
+
+ ip6cidr
+
+
+
+
+
+
+ listRouters
+ listZones
+
+
+ For DomainRouter and DataCenter response, the following fields have been
+ added.
+
+
+ ip6dns1
+
+
+ ip6dns2
+
+
+
+
addF5LoadBalancer
diff --git a/docs/en-US/ipv6-support.xml b/docs/en-US/ipv6-support.xml
new file mode 100644
index 00000000000..22a5d7a5370
--- /dev/null
+++ b/docs/en-US/ipv6-support.xml
@@ -0,0 +1,191 @@
+
+
+%BOOK_ENTITIES;
+]>
+
+
+
+ IPv6 Support in &PRODUCT;
+ &PRODUCT;supports Internet Protocol version 6 (IPv6), the recent version of the Internet
+ Protocol (IP) that defines routing the network traffic. IPv6 uses a 128-bit address that
+ exponentially expands the current address space that is available to the users. IPv6 addresses
+ consist of eight groups of four hexadecimal digits separated by colons, for example,
+ 5001:0dt8:83a3:1012:1000:8s2e:0870:7454. &PRODUCT; supports IPv6 for public IPs in shared
+ networks. With IPv6 support, VMs in shared networks can obtain both IPv4 and IPv6 addresses from
+ the DHCP server. You can deploy VMs either in a IPv6 or IPv4 network, or in a dual network
+ environment. If IPv6 network is used, the VM generates a link-local IPv6 address by itself, and
+ receives a stateful IPv6 address from the DHCPv6 server.
+ IPv6 is supported only on KVM and XenServer hypervisors. The IPv6 support is only an
+ experimental feature.
+ Here's the sequence of events when IPv6 is used:
+
+
+ The administrator creates an IPv6 shared network in an advanced zone.
+
+
+ The user deploys a VM in an IPv6 shared network.
+
+
+ The user VM generates an IPv6 link local address by itself, and gets an IPv6 global or
+ site local address through DHCPv6.
+ For information on API changes, see .
+
+
+
+ Prerequisites and Guidelines
+ Consider the following:
+
+
+ CIDR size must be 64 for IPv6 networks.
+
+
+ The DHCP client of the guest VMs should support generating DUID based on Link-layer
+ Address (DUID- LL). DUID-LL derives from the MAC address of guest VMs, and therefore the
+ user VM can be identified by using DUID. See Dynamic Host Configuration Protocol for IPv6
+ for more information.
+
+
+ The gateway of the guest network generates Router Advisement and Response messages to
+ Router Solicitation. The M (Managed Address Configuration) flag of Router Advisement
+ should enable stateful IP address configuration. Set the M flag to where the end nodes
+ receive their IPv6 addresses from the DHCPv6 server as opposed to the router or
+ switch.
+
+ The M flag is the 1-bit Managed Address Configuration flag for Router Advisement.
+ When set, Dynamic Host Configuration Protocol (DHCPv6) is available for address
+ configuration in addition to any IPs set by using stateless address
+ auto-configuration.
+
+
+
+ Use the System VM template exclusively designed to support IPv6. Download the System
+ VM template from http://nfs1.lab.vmops.com/templates/routing/debian/ipv6/.
+
+
+ The concept of Default Network applies to IPv6 networks. However, unlike IPv4
+ &PRODUCT; does not control the routing information of IPv6 in shared network; the choice
+ of Default Network will not affect the routing in the user VM.
+
+
+ In a multiple shared network, the default route is set by the rack router, rather than
+ the DHCP server, which is out of &PRODUCT; control. Therefore, in order for the user VM to
+ get only the default route from the default NIC, modify the configuration of the user VM,
+ and set non-default NIC's accept_ra to 0 explicitly. The
+ accept_ra parameter accepts Router Advertisements and auto-configure
+ /proc/sys/net/ipv6/conf/interface with received data.
+
+
+
+
+ Limitations of IPv6 in &PRODUCT;
+ The following are not yet supported:
+
+
+ Security groups
+
+
+ Userdata and metadata
+
+
+ Passwords
+
+
+ The administrator cannot specify the IPv6 address of a VM.
+
+
+
+
+ Network Configuration for DHCPv6
+ Use DUID-LL to get IPv6 address from DHCP server
+
+
+ Set up dhclient by using DUID-LL.
+ Perform the following for DHCP Client 4.2 and above:
+
+
+ Run the following command on the selected VM to get the dhcpv6 offer from
+ VR:
+ dhclient -6 -D LL <dev>
+
+
+ Perform the following for DHCP Client 4.1:
+
+
+ Open the following to the dhclient configuration file:
+ vi /etc/dhcp/dhclient.conf
+
+
+ Add the following to the dhclient configuration file:
+ send dhcp6.client-id = concat(00:03:00, hardware);
+
+
+
+
+ Get IPv6 address from DHCP server as part of the system or network restart.
+ Based on the operating systems, perform the following:
+ On CentOS 6.2:
+
+
+ Open the Ethernet interface configuration file:
+ vi /etc/sysconfig/network-scripts/ifcfg-eth0
+ The ifcfg-eth0 file controls the first NIC in a system.
+
+
+ Make the necessary configuration changes, as given below:
+ DEVICE=eth0
+HWADDR=06:A0:F0:00:00:38
+NM_CONTROLLED=no
+ONBOOT=yes
+BOOTPROTO=dhcp6
+TYPE=Ethernet
+USERCTL=no
+PEERDNS=yes
+IPV6INIT=yes
+DHCPV6C=yes
+
+
+ Open the following:
+ vi /etc/sysconfig/network
+
+
+ Make the necessary configuration changes, as given below:
+ NETWORKING=yes
+HOSTNAME=centos62mgmt.lab.vmops.com
+NETWORKING_IPV6=yes
+IPV6_AUTOCONF=no
+
+
+ On Ubuntu 12.10
+
+
+ Open the following:
+ etc/network/interfaces:
+
+
+ Make the necessary configuration changes, as given below:
+ iface eth0 inet6 dhcp
+autoconf 0
+accept_ra 1
+
+
+
+
+
+
diff --git a/docs/en-US/whats-new.xml b/docs/en-US/whats-new.xml
index 761d7a2eb37..252f87d0543 100644
--- a/docs/en-US/whats-new.xml
+++ b/docs/en-US/whats-new.xml
@@ -1,5 +1,5 @@
-
%BOOK_ENTITIES;
]>
@@ -25,6 +25,7 @@
What's New in the API for 4.1
+
diff --git a/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/manager/VmwareStorageManagerImpl.java b/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/manager/VmwareStorageManagerImpl.java
index e11dd53f3c9..1f116455761 100644
--- a/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/manager/VmwareStorageManagerImpl.java
+++ b/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/manager/VmwareStorageManagerImpl.java
@@ -684,13 +684,16 @@ public class VmwareStorageManagerImpl implements VmwareStorageManager {
String secondaryMountPoint = _mountService.getMountPoint(secStorageUrl);
String srcOVAFileName = secondaryMountPoint + "/" + secStorageDir + "/"
+ backupName + "." + ImageFormat.OVA.getFileExtension();
-
+ String snapshotDir = "";
+ if (backupName.contains("/")){
+ snapshotDir = backupName.split("/")[0];
+ }
String srcFileName = getOVFFilePath(srcOVAFileName);
if(srcFileName == null) {
Script command = new Script("tar", 0, s_logger);
command.add("--no-same-owner");
command.add("-xf", srcOVAFileName);
- command.setWorkDir(secondaryMountPoint + "/" + secStorageDir);
+ command.setWorkDir(secondaryMountPoint + "/" + secStorageDir + "/" + snapshotDir);
s_logger.info("Executing command: " + command.toString());
String result = command.execute();
if(result != null) {
@@ -731,7 +734,7 @@ public class VmwareStorageManagerImpl implements VmwareStorageManager {
String backupUuid = UUID.randomUUID().toString();
exportVolumeToSecondaryStroage(vmMo, volumePath, secStorageUrl,
getSnapshotRelativeDirInSecStorage(accountId, volumeId), backupUuid, workerVmName);
- return backupUuid;
+ return backupUuid + "/" + backupUuid;
}
private void exportVolumeToSecondaryStroage(VirtualMachineMO vmMo, String volumePath,
@@ -739,8 +742,8 @@ public class VmwareStorageManagerImpl implements VmwareStorageManager {
String workerVmName) throws Exception {
String secondaryMountPoint = _mountService.getMountPoint(secStorageUrl);
- String exportPath = secondaryMountPoint + "/" + secStorageDir;
-
+ String exportPath = secondaryMountPoint + "/" + secStorageDir + "/" + exportName;
+
synchronized(exportPath.intern()) {
if(!new File(exportPath).exists()) {
Script command = new Script(false, "mkdir", _timeout, s_logger);
diff --git a/server/src/com/cloud/api/ApiResponseHelper.java b/server/src/com/cloud/api/ApiResponseHelper.java
index 4c3d7e54d09..f33601f76ec 100755
--- a/server/src/com/cloud/api/ApiResponseHelper.java
+++ b/server/src/com/cloud/api/ApiResponseHelper.java
@@ -1106,6 +1106,7 @@ public class ApiResponseHelper implements ResponseGenerator {
VpnUsersResponse vpnResponse = new VpnUsersResponse();
vpnResponse.setId(vpnUser.getUuid());
vpnResponse.setUserName(vpnUser.getUsername());
+ vpnResponse.setState(vpnUser.getState().toString());
populateOwner(vpnResponse, vpnUser);
diff --git a/server/src/com/cloud/network/vpn/RemoteAccessVpnManagerImpl.java b/server/src/com/cloud/network/vpn/RemoteAccessVpnManagerImpl.java
index 82c0015e317..d64a0212b46 100755
--- a/server/src/com/cloud/network/vpn/RemoteAccessVpnManagerImpl.java
+++ b/server/src/com/cloud/network/vpn/RemoteAccessVpnManagerImpl.java
@@ -511,13 +511,13 @@ public class RemoteAccessVpnManagerImpl extends ManagerBase implements RemoteAcc
sb.and("id", sb.entity().getId(), SearchCriteria.Op.EQ);
sb.and("username", sb.entity().getUsername(), SearchCriteria.Op.EQ);
- sb.and("state", sb.entity().getState(), SearchCriteria.Op.EQ);
+ sb.and("state", sb.entity().getState(), Op.IN);
SearchCriteria sc = sb.create();
_accountMgr.buildACLSearchCriteria(sc, domainId, isRecursive, permittedAccounts, listProjectResourcesCriteria);
//list only active users
- sc.setParameters("state", State.Active);
+ sc.setParameters("state", State.Active, State.Add);
if (id != null) {
sc.setParameters("id", id);
diff --git a/tools/cli/cloudmonkey/cloudmonkey.py b/tools/cli/cloudmonkey/cloudmonkey.py
index f750c3afa8d..e94d53091ac 100644
--- a/tools/cli/cloudmonkey/cloudmonkey.py
+++ b/tools/cli/cloudmonkey/cloudmonkey.py
@@ -489,7 +489,7 @@ def main():
print __description__, "(%s)" % __projecturl__
shell = CloudMonkeyShell(sys.argv[0], options.cfile)
- if len(sys.argv) > 1:
+ if len(args) > 1:
shell.onecmd(' '.join(args))
else:
shell.cmdloop()