mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
Make system VM work on vmware
This commit is contained in:
parent
931059435c
commit
f6e0d2dd41
@ -407,6 +407,9 @@ public class Agent implements HandlerFactory, IAgentControl {
|
||||
s_logger.warn("Threw away a startup answer because we're reconnecting.");
|
||||
return;
|
||||
}
|
||||
|
||||
s_logger.info("Proccess agent startup answer, agent id = " + startup.getHostId());
|
||||
|
||||
setId(startup.getHostId());
|
||||
_pingInterval = startup.getPingInterval() * 1000; // change to ms.
|
||||
|
||||
|
||||
@ -91,6 +91,7 @@ public class ConsoleProxyResource extends ServerResourceBase implements ServerRe
|
||||
} else if(cmd instanceof WatchConsoleProxyLoadCommand) {
|
||||
return execute((WatchConsoleProxyLoadCommand)cmd);
|
||||
} else if (cmd instanceof ReadyCommand) {
|
||||
s_logger.info("Receive ReadyCommand, response with ReadyAnswer");
|
||||
return new ReadyAnswer((ReadyCommand)cmd);
|
||||
} else if(cmd instanceof CheckHealthCommand) {
|
||||
return new CheckHealthAnswer((CheckHealthCommand)cmd, true);
|
||||
|
||||
@ -264,6 +264,7 @@
|
||||
<include name="commons-logging-1.1.1.jar" />
|
||||
<include name="commons-dbcp-1.2.2.jar" />
|
||||
<include name="commons-pool-1.4.jar" />
|
||||
<include name="commons-discovery.jar" />
|
||||
<include name="backport-util-concurrent-3.0.jar" />
|
||||
<include name="httpcore-4.0.jar" />
|
||||
<include name="commons-httpclient-3.1.jar" />
|
||||
|
||||
@ -214,7 +214,11 @@ public class Request {
|
||||
String content = _content;
|
||||
if (content == null) {
|
||||
final Gson gson = s_gBuilder.create();
|
||||
try {
|
||||
content = gson.toJson(_cmds);
|
||||
} catch(Throwable e) {
|
||||
s_logger.error("Gson serialization error on Request.toString() " + getClass().getCanonicalName(), e);
|
||||
}
|
||||
}
|
||||
final StringBuilder buffer = new StringBuilder();
|
||||
buffer.append("{ ").append(getType());
|
||||
|
||||
@ -42,6 +42,8 @@ patch() {
|
||||
cp -f $EXTRA_MOUNT/authorized_keys /var/cache/cloud/authorized_keys
|
||||
privkey=/var/cache/cloud/authorized_keys
|
||||
umount $EXTRA_MOUNT
|
||||
elif [ -e /dev/cdrom1 ]; then
|
||||
vmware-guestd --cmd 'machine.id.get' > /var/cache/cloud/cmdline
|
||||
else
|
||||
cat /proc/cmdline > /var/cache/cloud/cmdline
|
||||
fi
|
||||
@ -51,6 +53,9 @@ patch() {
|
||||
elif [ -e /dev/cdrom ]; then
|
||||
# For KVM
|
||||
cdrom_dev=/dev/cdrom
|
||||
elif [ -e /dev/cdrom1 ]; then
|
||||
# for VmWare
|
||||
cdrom_dev=/dev/cdrom1
|
||||
fi
|
||||
|
||||
if [ -n "$cdrom_dev" ]; then
|
||||
|
||||
@ -2259,6 +2259,7 @@ public class AgentManagerImpl implements AgentManager, HandlerFactory {
|
||||
s_logger.info("Host " + attache.getId() + " is now ready to processing commands.");
|
||||
_hostDao.updateStatus(host, Event.Ready, _nodeId);
|
||||
}
|
||||
answer = new Answer(cmd);
|
||||
} else {
|
||||
answer = new Answer(cmd);
|
||||
}
|
||||
|
||||
@ -16,10 +16,10 @@ INSERT INTO `cloud`.`vm_template` (id, unique_name, name, public, created, type,
|
||||
VALUES (6, 'winxpsp3', 'WindowsXP-SP3', 1, now(), 'builtin', 0, 32, 1, 'http://nfs1.lab.vmops.com/templates/vmware/WinXPSP3.ova.bz2', '', 0, 'WindowsXP-SP3', 'OVA', 58, 1, 1, 'VMware');
|
||||
|
||||
INSERT INTO `cloud`.`vm_template` (id, unique_name, name, public, created, type, hvm, bits, account_id, url, checksum, enable_password, display_text, format, guest_os_id, featured, cross_zones, hypervisor_type)
|
||||
VALUES (7, 'centos53-x64', 'centos53-x64', 1, now(), 'builtin', 0, 64, 1, 'http://nfs1.lab.vmops.com/templates/vmware/CentOS5.3-x86_64.ova.bz2', '', 0, 'centos53-x64', 'OVA', 112, 1, 1, 'VMware');
|
||||
VALUES (7, 'centos53-x64', 'centos53-x64', 1, now(), 'builtin', 0, 64, 1, 'http://nfs1.lab.vmops.com/templates/vmware/CentOS5.3-x86_64.ova.bz2', '', 0, 'centos53-x64', 'OVA', 12, 1, 1, 'VMware');
|
||||
|
||||
INSERT INTO `cloud`.`vm_template` (id, unique_name, name, public, created, type, hvm, bits, account_id, url, checksum, enable_password, display_text, format, guest_os_id, featured, cross_zones, hypervisor_type)
|
||||
VALUES (8, 'routing_vmware', 'SystemVM Template (VMWare)', 0, now(), 'system', 0, 64, 1, 'http://nfs1.lab.vmops.com/templates/vmware/Blank.ova.bz2', '', 0, 'SystemVM Template VMWare', 'OVA', 47, 0, 1, 'VMware');
|
||||
VALUES (8, 'routing_vmware', 'SystemVM Template (VMWare)', 0, now(), 'system', 0, 32, 1, 'http://nfs1.lab.vmops.com/templates/vmware/systemvm.ova.bz2', '9bc05e1cabb4597063957f1a3f1bfa95', 0, 'SystemVM Template VMWare', 'OVA', 15, 0, 1, 'VMware');
|
||||
|
||||
INSERT INTO `cloud`.`guest_os_category` (id, name) VALUES (1, 'CentOS');
|
||||
INSERT INTO `cloud`.`guest_os_category` (id, name) VALUES (2, 'Debian');
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user