Examples of GuestOSVO


Examples of com.cloud.storage.GuestOSVO

    private void createDhcpEntryCommand(VirtualRouter router, UserVm vm, NicVO nic, Commands cmds) {
        DhcpEntryCommand dhcpCommand = new DhcpEntryCommand(nic.getMacAddress(), nic.getIp4Address(), vm.getHostName());
        DataCenterVO dcVo = _dcDao.findById(router.getDataCenterIdToDeployIn());
        String gatewayIp = findGatewayIp(vm.getId());
        if (!gatewayIp.equals(nic.getGateway())) {
            GuestOSVO guestOS = _guestOSDao.findById(vm.getGuestOSId());
            // Don't set dhcp:router option for non-default nic on CentOS/RHEL, because they would set routing on wrong interface
            // This is tricky, we may need to update this when we have more information on various OS's behavior
            if (guestOS.getDisplayName().startsWith("CentOS") || guestOS.getDisplayName().startsWith("Red Hat Enterprise")) {
                gatewayIp = "0.0.0.0";
            }
        }
        dhcpCommand.setDefaultRouter(gatewayIp);
        dhcpCommand.setDefaultDns(findDefaultDnsIp(vm.getId()));
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.