Fix KVM agent connection issue, and build

non-static inner class can't be serialized, also it lacks no-args
constructor.
This commit is contained in:
Sheng Yang 2011-08-04 11:56:37 -07:00
parent f7ef238e7c
commit a6bb0a855d
2 changed files with 4 additions and 2 deletions

View File

@ -26,9 +26,11 @@ import com.cloud.network.Networks.RouterPrivateIpStrategy;
import com.cloud.vm.VirtualMachine.State;
public class StartupRoutingCommand extends StartupCommand {
public class VmState {
public static class VmState {
State state;
String host;
public VmState() {
}
public VmState(State state, String host) {
this.state = state;
this.host = host;

View File

@ -2585,7 +2585,7 @@ public abstract class CitrixResourceBase implements ServerResource, HypervisorRe
if (s_logger.isTraceEnabled()) {
s_logger.trace("VM " + vm_name + ": powerstate = " + ps + "; vm state=" + state.toString());
}
VmState vm_state = cmd.new VmState(state, host_uuid);
VmState vm_state = new StartupRoutingCommand.VmState(state, host_uuid);
vmStates.put(vm_name, vm_state);
}
cmd.setChanges(vmStates);