SlideShare uma empresa Scribd logo
1 de 27
Supporting Hyper-V 3.0
Target, Strategy, Progress

donal.lafferty@citix.com

Dec 2nd, 2012
“CloudStack has a significant advantage in its
     ability to support multiple hypervisor types
     within the same zone…
     Xen, VMWare, KVM, OVM, but not Hyper-V.”

            Hyper-V 2012 (3.0) Support Functional Spec
              https://cwiki.apache.org/CLOUDSTACK/hyper-v-2012-30-support.html




2
Executive Summary
    • Hyper-V Server 2012
     ᵒNo NFS client support
     ᵒWMI for control
    • Plugin architecture
     ᵒOptimize Reuse
        • Agent Container
        • Message Bus
        • Service Contracts
    • Progress
     ᵒDeploy using XenServer surrogate
     ᵒDevelop on Windows                            Understand existing
     ᵒConnected Agent, WMI via PowerShell scripts    code to maximize
     ᵒStorage delayed for Javelin refactor                reuse!

3
Overview

    • Hyper-V 3.0
     ᵒWMI
     ᵒStorage
     ᵒRemote access
    • CloudStack Architecture
     ᵒPlugins
     ᵒAgent Container
    • Progress
     ᵒVM Startup on Hyper-V
     ᵒDev environment
                                Scope the problem!
     ᵒLandmines


4
Narrow the Focus

• No Windows Server 2012
 ᵒHyper-V Server 2012



• No NFS Client
 ᵒGet-WindowsFeature


• No SCVMM 2012 SP1
 ᵒService templates
    • See http://channel9.msdn.com/Events/TechEd/NorthAmerica/2012/MGT317
Storage

• Clients
 ᵒLocal
 ᵒiSCSI Initiator
    • http://blogs.technet.com/b/josebda/archive/2009/02/02/step-by-step-using-the-microsoft-iscsi-software-target-
      with-hyper-v-standalone-full-vhd.aspx
 ᵒSMB 3.0
    • http://blogs.technet.com/b/josebda/archive/2012/08/26/updated-links-on-windows-server-2012-file-server-and-
      smb-3-0.aspx


• VHD v VHDX
    • http://channel9.msdn.com/Events/TechEd/NewZealand/TechEd-New-Zealand-2012/VIR302 @48 min
    • Pushing the bounds of conformance
Ultimately Control via WMI
                            # VM details object
                            $wmiClassString = "" + $HyperVSvr +
• standardises access         "rootvirtualization:Msvm_VirtualSystemGlobalSettingData"
  to config and mgmt info   $wmiClass = [WMIClass]$wmiClassString
                            $sets= $wmiClass.CreateInstance()

• rootvirtualization      # Set VM properties
     • E.g. OpenStack       $sets.psbase.Properties.Item("ElementName").value=$VMName
• rootvirtualizationv2   # Create VM using the VirtualSystemManagementService object
     • E.g. migration       $VSMgmtSvc = gwmi MSVM_VirtualSystemManagementService `
                              -namespace "rootvirtualization" -computername $HyperVSvr
                            $VSMgmtSvc.DefineVirtualSystem($settings.psbase.GetText(1))
• PowerShell cmdlets
                            # Attach the vhdx to the VM and start
                            Add-VMHardDiskDrive -VMName $VMName -path $NewVHD
                            Start-vm $VMName
Remote Access

• RDP
 ᵒConsole GUI
• WBEM (Web-Based Enterprise Management)
 ᵒDCOM
• WinRM (Windows Remote Management)
 ᵒWS-Management protocol (http://dmtf.org/standards/wsman)
 ᵒSOAP
• Remote shell
Overview

    • Hyper-V 3.0
     ᵒWMI
     ᵒStorage
     ᵒRemote access
    • CloudStack Architecture
     ᵒPlugins
     ᵒAgents
    • Progress
     ᵒVM Startup on Hyper-V
     ᵒDev environment
                                Do not reinvent!
     ᵒLandmines


9
Agent Types
   CloudStack Manager         CloudStack Manager

     Hyper-V Plugin              Hyper-V Plugin
   DirectConnect Agent           Agent Manager


          WMI Remote Access           Message Bus


         WMI                     Connected Agent
      Hyper-V 3.0             (e.g. Windows Service)
                                WMI (or PowerShell)
   Hyper-V Server 2012
                                    Hyper-V 3.0
                              Hyper-V Server 2012
Reuse the Service Contracts
  public interface HypervisorResource extends ServerResource {
    StartAnswer execute(StartCommand cmd);
    StopAnswer execute(StopCommand cmd);
    RebootAnswer execute(RebootCommand cmd);
  }


  public interface StoragePoolResource {
    PrimaryStorageDownloadAnswer
           execute(PrimaryStorageDownloadCommand cmd);
    Answer execute(DestroyCommand cmd);
    CopyVolumeAnswer execute(CopyVolumeCommand cmd);
    CreateAnswer execute(CreateCommand cmd);
  }
What does the ServerResource do?

          Agent as a ServerResource Container




14
Agent Container Model

     • IAgentShell                          Server
                                                              …        …
      ᵒBootstrap multiple agents,          Resource
       O/S interaction, maintainability
     • Agent                                Agent          Agent       …
      ᵒMessaging infrastructure
                                                      IAgentShell
     • ServerResource
      ᵒexecuteRequest
      ᵒSupport methods…
                                          O/S            Agent Versioning   Message Bus



15
Message Bus                           Server
                                                               …
                                          Resource
     • Java New IO Wrapper                  Agent              …
      ᵒMultiplexing
      ᵒAsync message handling
      ᵒJava-specific                       Server             Server
                                          Handler            Handler

     • ServerHandler            Message
                                  Bus     NIO Client           …


                                                       TCP




16
Messaging

                         ServerResource.
                         executeRequest
                                              Response
                                             -Answer[]
          Request:        Agent.Request      -Version
          -Command[]       (out of band)     -Sequence
          -Version
                                             -Flags
          -Sequence
          -Flags
                       AgentRequestHandler

                         Server Handler



17
Overview

     • Hyper-V Ecosystem
      ᵒHypervisor control
      ᵒStorage models
     • Plug-in architecture
      ᵒPlugins
      ᵒAgent Container
     • Progress
      ᵒVM startup on Hyper-V
      ᵒDev environment
                                 „Landmines‟ are
      ᵒLandmines
                                hidden problems
                               obvious in hindsight!

18
Development Deployment

                 Windows7                              AD Domain
          (CloudStack Mgmt Server)                     Controller



   Hyper-V Cluster                                        XenServer Cluster
                              Primary: SMB3.0, iSCSI        (Surrogate for
 Windows Server 2012
(Hyper-V Role Enabled)                                       System VMs)
                                 Secondary: NFS
 Hyper-V Server 2012         Windows Server 2012
  (aka Headless HyperV)
                                                         XenServer 6.02
                              Storage Role Enabled
Take a tour…
     Hyper-V 3.0 VM launch




20
Dev Environment

• Management Server on Windows via Cygwin & Maven
    • https://cwiki.apache.org/confluence/display/CLOUDSTACK/Setting+up+a+CloudStack+dev+envi
      ronment+on+Windows
 ᵒDifferent Apache repo
    • https://github.com/lafferty/cshv3.git
• Landmines
 ᵒCygwin v Windows paths
 ᵒNo sudo in Cygwin
    • mvn errors ; ./utils/src/com/cloud/utils/script/Script.java
 ᵒWindows NFS server identity mapping
    • http://blogs.technet.com/b/filecab/archive/2012/10/09/nfs-identity-mapping-in-windows-server-
      2012.aspx
 ᵒOverride the version check.
    • ./agent/src/com/cloud/agent/AgentShell.java
Launch Codes…
• Management Server
 ᵒ./client/tomcatconf/components.xml.in
    <adapters key="com.cloud.resource.Discoverer">
      <adapter name="HyperV Agent" class="com.cloud.hypervisor.hyperv.HypervServerDiscoverer"/>
    …
    <adapters key="com.cloud.hypervisor.HypervisorGuru">
      <adapter name="HypervGuru" class="com.cloud.hypervisor.guru.HypervGuru"/>
    …
 ᵒmvn -pl :cloud-client-ui jetty:run
• Agent
 ᵒ./agent/conf/agent.properties
    resource=com.cloud.agent.resource.HypervResource
    host= …
 ᵒAdd var & log folders
    • E.g. mvn converts /var/run to c:varrun
 ᵒmvn exec:java -Dexec.mainClass=com.cloud.agent.AgentShell
    • From ./agent
    • Reference http://www.vineetmanohar.com/2009/11/3-ways-to-run-java-main-from-maven/
Power Shell Calls

• Poor feedback…
protected synchronized void runPowerShell(String psScript) throws Exception{
    Runtime runtime = Runtime.getRuntime();
    Process proc = runtime.exec(psScript);
    proc.getOutputStream().close();
    InputStream is = proc.getInputStream();
    InputStreamReader isr = new InputStreamReader(is);
    BufferedReader reader = new BufferedReader(isr);
    String line;
    while ((line = reader.readLine()) != null) { s_logger.debug("PowerShell feedback: " + line); }
    reader.close();
  }
Executive Summary
     • Hyper-V Server 2012
      ᵒNo NFS client support
      ᵒWMI for control
     • Plugin architecture
      ᵒOptimize Reuse
         • Agent containers
         • Message bus
         • Service contracts
     • Progress
      ᵒDeploy using XenServer surrogate
      ᵒDevelop on Windows                            Understand existing
      ᵒConnected Agent, WMI via PowerShell scripts    code to maximize
      ᵒStorage delayed for Javelin refactor                reuse!

24
Bonus Track…
     Bootstrapping Your Own Hyper-V Cluster




25
Host Registration
• No host discovery
 ᵒHypervDiscover.find should trigger agent connection
• Agent-side alternative
 ᵒConfig in GUI
 ᵒLook at database for Hyper-V Cluster‟s zone/pod/cluster
 ᵒSet in ./agent/conf/agent.properties
    • zone=
    • pod=
    • cluster=
 ᵒDefaults are 1,1,1
 ᵒLaunch agent
Debugging
• Import projects into Eclipse
 ᵒMakes source available!
• Config Maven to launch as debuggable task paused waiting for Eclipse to attach.
      export MAVEN_OPTS="-Xdebug -Xnoagent -Djava.compiler=NONE -
      Xrunjdwp:transport=dt_socket,address=4000,server=y,suspend=y
         - Based on http://www.mojavelinux.com/blog/archives/2007/03/remote_debugging_with_jetty/
• Log4j-cloud.xml.in
 ᵒRename to log4j-cloud.xml
 ᵒChange Threshold from INFO to TRACE
    • :%s/INFO/TRACE/g

Mais conteúdo relacionado

Mais procurados

Mais procurados (20)

Troubleshooting Apache Cloudstack
Troubleshooting Apache CloudstackTroubleshooting Apache Cloudstack
Troubleshooting Apache Cloudstack
 
EWD 3 Training Course Part 31: Using QEWD for Web and REST Services
EWD 3 Training Course Part 31: Using QEWD for Web and REST ServicesEWD 3 Training Course Part 31: Using QEWD for Web and REST Services
EWD 3 Training Course Part 31: Using QEWD for Web and REST Services
 
Kubernetes #4 volume &amp; stateful set
Kubernetes #4   volume &amp; stateful setKubernetes #4   volume &amp; stateful set
Kubernetes #4 volume &amp; stateful set
 
QEWD.js, JSON Web Tokens & MicroServices
QEWD.js, JSON Web Tokens & MicroServicesQEWD.js, JSON Web Tokens & MicroServices
QEWD.js, JSON Web Tokens & MicroServices
 
EWD 3 Training Course Part 5b: First Steps in Building a QEWD Application
EWD 3 Training Course Part 5b: First Steps in Building a QEWD ApplicationEWD 3 Training Course Part 5b: First Steps in Building a QEWD Application
EWD 3 Training Course Part 5b: First Steps in Building a QEWD Application
 
EWD 3 Training Course Part 34: QEWD Resilient Mode
EWD 3 Training Course Part 34: QEWD Resilient ModeEWD 3 Training Course Part 34: QEWD Resilient Mode
EWD 3 Training Course Part 34: QEWD Resilient Mode
 
Apache httpd 2.4: The Cloud Killer App
Apache httpd 2.4: The Cloud Killer AppApache httpd 2.4: The Cloud Killer App
Apache httpd 2.4: The Cloud Killer App
 
EWD 3 Training Course Part 36: Accessing REST and Web Services from a QEWD ap...
EWD 3 Training Course Part 36: Accessing REST and Web Services from a QEWD ap...EWD 3 Training Course Part 36: Accessing REST and Web Services from a QEWD ap...
EWD 3 Training Course Part 36: Accessing REST and Web Services from a QEWD ap...
 
Использование maven для сборки больших модульных c++ проектов на примере Odin...
Использование maven для сборки больших модульных c++ проектов на примере Odin...Использование maven для сборки больших модульных c++ проектов на примере Odin...
Использование maven для сборки больших модульных c++ проектов на примере Odin...
 
EWD 3 Training Course Part 14: Using Ajax for QEWD Messages
EWD 3 Training Course Part 14: Using Ajax for QEWD MessagesEWD 3 Training Course Part 14: Using Ajax for QEWD Messages
EWD 3 Training Course Part 14: Using Ajax for QEWD Messages
 
EWD 3 Training Course Part 43: Using JSON Web Tokens with QEWD REST Services
EWD 3 Training Course Part 43: Using JSON Web Tokens with QEWD REST ServicesEWD 3 Training Course Part 43: Using JSON Web Tokens with QEWD REST Services
EWD 3 Training Course Part 43: Using JSON Web Tokens with QEWD REST Services
 
EWD 3 Training Course Part 16: QEWD Services
EWD 3 Training Course Part 16: QEWD ServicesEWD 3 Training Course Part 16: QEWD Services
EWD 3 Training Course Part 16: QEWD Services
 
Continuous Delivery of Cloud Applications with Docker Containers and IBM Bluemix
Continuous Delivery of Cloud Applications with Docker Containers and IBM BluemixContinuous Delivery of Cloud Applications with Docker Containers and IBM Bluemix
Continuous Delivery of Cloud Applications with Docker Containers and IBM Bluemix
 
Kubernetes internals (Kubernetes 해부하기)
Kubernetes internals (Kubernetes 해부하기)Kubernetes internals (Kubernetes 해부하기)
Kubernetes internals (Kubernetes 해부하기)
 
EWD 3 Training Course Part 37: Building a React.js application with ewd-xpres...
EWD 3 Training Course Part 37: Building a React.js application with ewd-xpres...EWD 3 Training Course Part 37: Building a React.js application with ewd-xpres...
EWD 3 Training Course Part 37: Building a React.js application with ewd-xpres...
 
EWD 3 Training Course Part 38: Building a React.js application with QEWD, Part 2
EWD 3 Training Course Part 38: Building a React.js application with QEWD, Part 2EWD 3 Training Course Part 38: Building a React.js application with QEWD, Part 2
EWD 3 Training Course Part 38: Building a React.js application with QEWD, Part 2
 
Dwr
DwrDwr
Dwr
 
EWD 3 Training Course Part 11: Handling Errors in QEWD
EWD 3 Training Course Part 11: Handling Errors in QEWDEWD 3 Training Course Part 11: Handling Errors in QEWD
EWD 3 Training Course Part 11: Handling Errors in QEWD
 
Faster Java EE Builds with Gradle
Faster Java EE Builds with GradleFaster Java EE Builds with Gradle
Faster Java EE Builds with Gradle
 
WebLogic Scripting Tool Overview
WebLogic Scripting Tool OverviewWebLogic Scripting Tool Overview
WebLogic Scripting Tool Overview
 

Semelhante a Supporting Hyper-V 3.0 on Apache CloudStack

Routage à grande échelle des requêtes via RabbitMQ
Routage à grande échelle des requêtes via RabbitMQRoutage à grande échelle des requêtes via RabbitMQ
Routage à grande échelle des requêtes via RabbitMQ
Scaleway
 
2 Linux Container and Docker
2 Linux Container and Docker2 Linux Container and Docker
2 Linux Container and Docker
Fabio Fumarola
 
Is OSGi modularity always worth it?
Is OSGi modularity always worth it?Is OSGi modularity always worth it?
Is OSGi modularity always worth it?
glynnormington
 
Cloud Foundry Open Tour China
Cloud Foundry Open Tour ChinaCloud Foundry Open Tour China
Cloud Foundry Open Tour China
marklucovsky
 

Semelhante a Supporting Hyper-V 3.0 on Apache CloudStack (20)

Apache OpenWhisk Serverless Computing
Apache OpenWhisk Serverless ComputingApache OpenWhisk Serverless Computing
Apache OpenWhisk Serverless Computing
 
Routage à grande échelle des requêtes via RabbitMQ
Routage à grande échelle des requêtes via RabbitMQRoutage à grande échelle des requêtes via RabbitMQ
Routage à grande échelle des requêtes via RabbitMQ
 
2 Linux Container and Docker
2 Linux Container and Docker2 Linux Container and Docker
2 Linux Container and Docker
 
Server 2016 sneak peek
Server 2016 sneak peekServer 2016 sneak peek
Server 2016 sneak peek
 
70-412 Objectives
70-412 Objectives70-412 Objectives
70-412 Objectives
 
Deploying windows containers with kubernetes
Deploying windows containers with kubernetesDeploying windows containers with kubernetes
Deploying windows containers with kubernetes
 
Is OSGi modularity always worth it?
Is OSGi modularity always worth it?Is OSGi modularity always worth it?
Is OSGi modularity always worth it?
 
betterCode Workshop: Effizientes DevOps-Tooling mit Go
betterCode Workshop:  Effizientes DevOps-Tooling mit GobetterCode Workshop:  Effizientes DevOps-Tooling mit Go
betterCode Workshop: Effizientes DevOps-Tooling mit Go
 
WLS
WLSWLS
WLS
 
Develop with linux containers and docker
Develop with linux containers and dockerDevelop with linux containers and docker
Develop with linux containers and docker
 
Techdays SE 2016 - Micros.. err Microcosmos
Techdays SE 2016 - Micros.. err MicrocosmosTechdays SE 2016 - Micros.. err Microcosmos
Techdays SE 2016 - Micros.. err Microcosmos
 
Tech Talk: DevOps at LeanIX @ Startup Camp Berlin
Tech Talk: DevOps at LeanIX @ Startup Camp BerlinTech Talk: DevOps at LeanIX @ Startup Camp Berlin
Tech Talk: DevOps at LeanIX @ Startup Camp Berlin
 
OSv presentation from Linux Foundation Collaboration Summit
OSv presentation from Linux Foundation Collaboration SummitOSv presentation from Linux Foundation Collaboration Summit
OSv presentation from Linux Foundation Collaboration Summit
 
The future of the php development environment
The future of the php development environmentThe future of the php development environment
The future of the php development environment
 
Rohit yadav cloud stack internals
Rohit yadav   cloud stack internalsRohit yadav   cloud stack internals
Rohit yadav cloud stack internals
 
Cloud Foundry Open Tour China
Cloud Foundry Open Tour ChinaCloud Foundry Open Tour China
Cloud Foundry Open Tour China
 
Morning Coffee - Windows Server 2016
Morning Coffee - Windows Server 2016Morning Coffee - Windows Server 2016
Morning Coffee - Windows Server 2016
 
Linux containers and docker
Linux containers and dockerLinux containers and docker
Linux containers and docker
 
Docker Enterprise Workshop - Technical
Docker Enterprise Workshop - TechnicalDocker Enterprise Workshop - Technical
Docker Enterprise Workshop - Technical
 
CRaSH the shell for the JVM
CRaSH the shell for the JVMCRaSH the shell for the JVM
CRaSH the shell for the JVM
 

Último

EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
Earley Information Science
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 

Último (20)

Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 

Supporting Hyper-V 3.0 on Apache CloudStack

  • 1. Supporting Hyper-V 3.0 Target, Strategy, Progress donal.lafferty@citix.com Dec 2nd, 2012
  • 2. “CloudStack has a significant advantage in its ability to support multiple hypervisor types within the same zone… Xen, VMWare, KVM, OVM, but not Hyper-V.” Hyper-V 2012 (3.0) Support Functional Spec https://cwiki.apache.org/CLOUDSTACK/hyper-v-2012-30-support.html 2
  • 3. Executive Summary • Hyper-V Server 2012 ᵒNo NFS client support ᵒWMI for control • Plugin architecture ᵒOptimize Reuse • Agent Container • Message Bus • Service Contracts • Progress ᵒDeploy using XenServer surrogate ᵒDevelop on Windows Understand existing ᵒConnected Agent, WMI via PowerShell scripts code to maximize ᵒStorage delayed for Javelin refactor reuse! 3
  • 4. Overview • Hyper-V 3.0 ᵒWMI ᵒStorage ᵒRemote access • CloudStack Architecture ᵒPlugins ᵒAgent Container • Progress ᵒVM Startup on Hyper-V ᵒDev environment Scope the problem! ᵒLandmines 4
  • 5. Narrow the Focus • No Windows Server 2012 ᵒHyper-V Server 2012 • No NFS Client ᵒGet-WindowsFeature • No SCVMM 2012 SP1 ᵒService templates • See http://channel9.msdn.com/Events/TechEd/NorthAmerica/2012/MGT317
  • 6. Storage • Clients ᵒLocal ᵒiSCSI Initiator • http://blogs.technet.com/b/josebda/archive/2009/02/02/step-by-step-using-the-microsoft-iscsi-software-target- with-hyper-v-standalone-full-vhd.aspx ᵒSMB 3.0 • http://blogs.technet.com/b/josebda/archive/2012/08/26/updated-links-on-windows-server-2012-file-server-and- smb-3-0.aspx • VHD v VHDX • http://channel9.msdn.com/Events/TechEd/NewZealand/TechEd-New-Zealand-2012/VIR302 @48 min • Pushing the bounds of conformance
  • 7. Ultimately Control via WMI # VM details object $wmiClassString = "" + $HyperVSvr + • standardises access "rootvirtualization:Msvm_VirtualSystemGlobalSettingData" to config and mgmt info $wmiClass = [WMIClass]$wmiClassString $sets= $wmiClass.CreateInstance() • rootvirtualization # Set VM properties • E.g. OpenStack $sets.psbase.Properties.Item("ElementName").value=$VMName • rootvirtualizationv2 # Create VM using the VirtualSystemManagementService object • E.g. migration $VSMgmtSvc = gwmi MSVM_VirtualSystemManagementService ` -namespace "rootvirtualization" -computername $HyperVSvr $VSMgmtSvc.DefineVirtualSystem($settings.psbase.GetText(1)) • PowerShell cmdlets # Attach the vhdx to the VM and start Add-VMHardDiskDrive -VMName $VMName -path $NewVHD Start-vm $VMName
  • 8. Remote Access • RDP ᵒConsole GUI • WBEM (Web-Based Enterprise Management) ᵒDCOM • WinRM (Windows Remote Management) ᵒWS-Management protocol (http://dmtf.org/standards/wsman) ᵒSOAP • Remote shell
  • 9. Overview • Hyper-V 3.0 ᵒWMI ᵒStorage ᵒRemote access • CloudStack Architecture ᵒPlugins ᵒAgents • Progress ᵒVM Startup on Hyper-V ᵒDev environment Do not reinvent! ᵒLandmines 9
  • 10.
  • 11.
  • 12. Agent Types CloudStack Manager CloudStack Manager Hyper-V Plugin Hyper-V Plugin DirectConnect Agent Agent Manager WMI Remote Access Message Bus WMI Connected Agent Hyper-V 3.0 (e.g. Windows Service) WMI (or PowerShell) Hyper-V Server 2012 Hyper-V 3.0 Hyper-V Server 2012
  • 13. Reuse the Service Contracts public interface HypervisorResource extends ServerResource { StartAnswer execute(StartCommand cmd); StopAnswer execute(StopCommand cmd); RebootAnswer execute(RebootCommand cmd); } public interface StoragePoolResource { PrimaryStorageDownloadAnswer execute(PrimaryStorageDownloadCommand cmd); Answer execute(DestroyCommand cmd); CopyVolumeAnswer execute(CopyVolumeCommand cmd); CreateAnswer execute(CreateCommand cmd); }
  • 14. What does the ServerResource do? Agent as a ServerResource Container 14
  • 15. Agent Container Model • IAgentShell Server … … ᵒBootstrap multiple agents, Resource O/S interaction, maintainability • Agent Agent Agent … ᵒMessaging infrastructure IAgentShell • ServerResource ᵒexecuteRequest ᵒSupport methods… O/S Agent Versioning Message Bus 15
  • 16. Message Bus Server … Resource • Java New IO Wrapper Agent … ᵒMultiplexing ᵒAsync message handling ᵒJava-specific Server Server Handler Handler • ServerHandler Message Bus NIO Client … TCP 16
  • 17. Messaging ServerResource. executeRequest Response -Answer[] Request: Agent.Request -Version -Command[] (out of band) -Sequence -Version -Flags -Sequence -Flags AgentRequestHandler Server Handler 17
  • 18. Overview • Hyper-V Ecosystem ᵒHypervisor control ᵒStorage models • Plug-in architecture ᵒPlugins ᵒAgent Container • Progress ᵒVM startup on Hyper-V ᵒDev environment „Landmines‟ are ᵒLandmines hidden problems obvious in hindsight! 18
  • 19. Development Deployment Windows7 AD Domain (CloudStack Mgmt Server) Controller Hyper-V Cluster XenServer Cluster Primary: SMB3.0, iSCSI (Surrogate for Windows Server 2012 (Hyper-V Role Enabled) System VMs) Secondary: NFS Hyper-V Server 2012 Windows Server 2012 (aka Headless HyperV) XenServer 6.02 Storage Role Enabled
  • 20. Take a tour… Hyper-V 3.0 VM launch 20
  • 21. Dev Environment • Management Server on Windows via Cygwin & Maven • https://cwiki.apache.org/confluence/display/CLOUDSTACK/Setting+up+a+CloudStack+dev+envi ronment+on+Windows ᵒDifferent Apache repo • https://github.com/lafferty/cshv3.git • Landmines ᵒCygwin v Windows paths ᵒNo sudo in Cygwin • mvn errors ; ./utils/src/com/cloud/utils/script/Script.java ᵒWindows NFS server identity mapping • http://blogs.technet.com/b/filecab/archive/2012/10/09/nfs-identity-mapping-in-windows-server- 2012.aspx ᵒOverride the version check. • ./agent/src/com/cloud/agent/AgentShell.java
  • 22. Launch Codes… • Management Server ᵒ./client/tomcatconf/components.xml.in <adapters key="com.cloud.resource.Discoverer"> <adapter name="HyperV Agent" class="com.cloud.hypervisor.hyperv.HypervServerDiscoverer"/> … <adapters key="com.cloud.hypervisor.HypervisorGuru"> <adapter name="HypervGuru" class="com.cloud.hypervisor.guru.HypervGuru"/> … ᵒmvn -pl :cloud-client-ui jetty:run • Agent ᵒ./agent/conf/agent.properties resource=com.cloud.agent.resource.HypervResource host= … ᵒAdd var & log folders • E.g. mvn converts /var/run to c:varrun ᵒmvn exec:java -Dexec.mainClass=com.cloud.agent.AgentShell • From ./agent • Reference http://www.vineetmanohar.com/2009/11/3-ways-to-run-java-main-from-maven/
  • 23. Power Shell Calls • Poor feedback… protected synchronized void runPowerShell(String psScript) throws Exception{ Runtime runtime = Runtime.getRuntime(); Process proc = runtime.exec(psScript); proc.getOutputStream().close(); InputStream is = proc.getInputStream(); InputStreamReader isr = new InputStreamReader(is); BufferedReader reader = new BufferedReader(isr); String line; while ((line = reader.readLine()) != null) { s_logger.debug("PowerShell feedback: " + line); } reader.close(); }
  • 24. Executive Summary • Hyper-V Server 2012 ᵒNo NFS client support ᵒWMI for control • Plugin architecture ᵒOptimize Reuse • Agent containers • Message bus • Service contracts • Progress ᵒDeploy using XenServer surrogate ᵒDevelop on Windows Understand existing ᵒConnected Agent, WMI via PowerShell scripts code to maximize ᵒStorage delayed for Javelin refactor reuse! 24
  • 25. Bonus Track… Bootstrapping Your Own Hyper-V Cluster 25
  • 26. Host Registration • No host discovery ᵒHypervDiscover.find should trigger agent connection • Agent-side alternative ᵒConfig in GUI ᵒLook at database for Hyper-V Cluster‟s zone/pod/cluster ᵒSet in ./agent/conf/agent.properties • zone= • pod= • cluster= ᵒDefaults are 1,1,1 ᵒLaunch agent
  • 27. Debugging • Import projects into Eclipse ᵒMakes source available! • Config Maven to launch as debuggable task paused waiting for Eclipse to attach. export MAVEN_OPTS="-Xdebug -Xnoagent -Djava.compiler=NONE - Xrunjdwp:transport=dt_socket,address=4000,server=y,suspend=y - Based on http://www.mojavelinux.com/blog/archives/2007/03/remote_debugging_with_jetty/ • Log4j-cloud.xml.in ᵒRename to log4j-cloud.xml ᵒChange Threshold from INFO to TRACE • :%s/INFO/TRACE/g