Add a zipped version of the hyperv image that we can store in the archives on the jenkins server

This commit is contained in:
Hugo Trippaers 2014-01-23 09:06:00 +01:00
parent 9d735dd288
commit c2da280347
2 changed files with 7 additions and 7 deletions

View File

@ -106,7 +106,7 @@ public class XenServerStorageMotionStrategy implements DataMotionStrategy {
try {
VMInstanceVO instance = instanceDao.findById(vmTo.getId());
if (instance != null) {
if (srcHost.getClusterId() == destHost.getClusterId()) {
if (srcHost.getClusterId().equals(destHost.getClusterId())) {
answer = migrateVmWithVolumesWithinCluster(instance, vmTo, srcHost, destHost, volumeMap);
} else {
answer = migrateVmWithVolumesAcrossCluster(instance, vmTo, srcHost, destHost, volumeMap);
@ -126,7 +126,7 @@ public class XenServerStorageMotionStrategy implements DataMotionStrategy {
}
private Answer migrateVmWithVolumesAcrossCluster(VMInstanceVO vm, VirtualMachineTO to, Host srcHost, Host destHost, Map<VolumeInfo, DataStore> volumeToPool)
throws AgentUnavailableException {
throws AgentUnavailableException {
// Initiate migration of a virtual machine with it's volumes.
try {
@ -153,7 +153,7 @@ public class XenServerStorageMotionStrategy implements DataMotionStrategy {
}
MigrateWithStorageSendCommand sendCmd =
new MigrateWithStorageSendCommand(to, receiveAnswer.getVolumeToSr(), receiveAnswer.getNicToNetwork(), receiveAnswer.getToken());
new MigrateWithStorageSendCommand(to, receiveAnswer.getVolumeToSr(), receiveAnswer.getNicToNetwork(), receiveAnswer.getToken());
MigrateWithStorageSendAnswer sendAnswer = (MigrateWithStorageSendAnswer)agentMgr.send(srcHost.getId(), sendCmd);
if (sendAnswer == null) {
s_logger.error("Migration with storage of vm " + vm + " to host " + destHost + " failed.");
@ -184,7 +184,7 @@ public class XenServerStorageMotionStrategy implements DataMotionStrategy {
}
private Answer migrateVmWithVolumesWithinCluster(VMInstanceVO vm, VirtualMachineTO to, Host srcHost, Host destHost, Map<VolumeInfo, DataStore> volumeToPool)
throws AgentUnavailableException {
throws AgentUnavailableException {
// Initiate migration of a virtual machine with it's volumes.
try {

View File

@ -101,9 +101,9 @@ echo "$appliance exported for VMWare: dist/$appliance-$build_date-$branch-vmware
# Export for HyperV
vboxmanage clonehd $hdd_uuid $appliance-$build_date-$branch-hyperv.vhd --format VHD
# HyperV doesn't support import a zipped image from S3
#bzip2 $appliance-$build_date-$branch-hyperv.vhd
# HyperV doesn't support import a zipped image from S3, but we create a zipped version to save space on the jenkins box
zip $appliance-$build_date-$branch-hyperv.vhd.zip $appliance-$build_date-$branch-hyperv.vhd
echo "$appliance exported for HyperV: dist/$appliance-$build_date-$branch-hyperv.vhd"
mv *-hyperv.vhd *.bz2 *.ova dist/
mv *-hyperv.vhd *-hyperv.vhd.zip *.bz2 *.ova dist/