fastconnect / virtualbox-cloudify-driver Goto Github PK
View Code? Open in Web Editor NEWVirtualBox Cloudify Driver, for testing purpose
VirtualBox Cloudify Driver, for testing purpose
PublicIP == Bridged or HostOnlyInterface
PrivateIP == Internal Network
The VBox WebService should first be started on 0.0.0.0, because the IP of the HostOnlyInterface doesn't exist yet.
Then, it can search for the HostOnlyInterface defined in the configuration.
If it exists, assign the right IP.
It can connect to the WS using this IP.
Hey!
This looks like exactly what I want - very cool!
But I am quite new to Cloudify (used Vagrant though). I couldn't figure out where to put this driver and where to put my configuration file.
Could you provide a more detailed doc for that?
THANKS!
Hello,
Thanks for the help today.
I am still having trouble with booting it up but guess I just need to spend more time on it.
Here is a quick question: is that possible to not use vbox web service? How does Vagrant do it?
My environment is as follows:
Cloudify 2.3 is installed on Windows 7
VirtualBox is installed on the same Windows 7 box
I have a box called centos63mini, which I downloaded from https://dl.dropbox.com/u/7225008/Vagrant/CentOS-6.3-x86_64-minimal.box. All my boxes are put in the folder C:\Users\lchen.vagrant.d\boxes.
I can bootstrap a vbox cloud. The Cloudify manager is created successfully and up running.
When I install the helloworld application with the following command, it failed.
install-application -timeout 15 --verbose C:/software/gigaspaces-cloudify-2.3.0-ga/recipes/apps/helloworld
The log on cloudify manager is as below. It seems the cloud driver on the Cloudify Manager VM (centos 63 mini) cannot access the template box (C:\Users\lchen.vagrant.d\boxes\centos63mini\box.ovf) on my windows machine.
Does this have anything to do with the guest additions?
What enables the cloud driver on the centos VM to access the templates on the Windows host?
openspaces.grid.gsm.machines.exceptions.CannotDetermineIfNeedToStartMoreMachinesException: Cannot determine if more machines are needed in order to reach the minimum number of m
achines. Currently short of 1 machines. Will check again later since there are still some machines being started.
2013-02-01 20:32:51,301 ESM INFO [fr.fastconnect.cloudify.driver.provisioning.virtualbox.api.VirtualBoxService42] - Trying to create VM 'app-agent-1' cpus:1 memory:2048 from template: C:\Users\lchen.vagrant.d\boxes\centos63mini\box.ovf
2013-02-01 20:32:51,805 ESM INFO [org.openspaces.grid.gsm.strategy.ScaleStrategyProgressEventState] - [helloworld.tomcat] machines SLA enforcement is in progress.; Caused by: org.openspaces.grid.gsm.machines.exceptions.FailedToStartNewMachineException: Machines SLA Enforcement is in progress: Machine provisioning failed to start a new machine. Cause:org.openspaces.grid.gsm.machines.plugins.exceptions.ElasticMachineProvisioningException: Failed to provisiong machine: Failed to start machine: org.virtualbox_4_2.VBoxException: VirtualBox error: Cannot interpret appliance without reading it first (call read() before interpret()) (0x80004005)
at org.openspaces.grid.gsm.sla.exceptions.SlaEnforcementInProgressException.fillInStackTrace(SlaEnforcementInProgressException.java:54)
at java.lang.Throwable.(Throwable.java:218)
at java.lang.Exception.(Exception.java:59)
at org.openspaces.grid.gsm.sla.exceptions.SlaEnforcementInProgressException.(SlaEnforcementInProgressException.java:42)
at org.openspaces.grid.gsm.sla.exceptions.SlaEnforcementInProgressException.(SlaEnforcementInProgressException.java:33)
at org.openspaces.grid.gsm.machines.exceptions.MachinesSlaEnforcementInProgressException.(MachinesSlaEnforcementInProgressException.java:36)
at org.openspaces.grid.gsm.machines.exceptions.FailedToStartNewMachineException.(FailedToStartNewMachineException.java:31)
at org.openspaces.grid.gsm.machines.DefaultMachinesSlaEnforcementEndpoint.validateHealthyAgent(DefaultMachinesSlaEnforcementEndpoint.java:1080)
at org.openspaces.grid.gsm.machines.DefaultMachinesSlaEnforcementEndpoint.updateFutureAgentsState(DefaultMachinesSlaEnforcementEndpoint.java:895)
at org.openspaces.grid.gsm.machines.DefaultMachinesSlaEnforcementEndpoint.enforceSlaInternal(DefaultMachinesSlaEnforcementEndpoint.java:351)
at org.openspaces.grid.gsm.machines.DefaultMachinesSlaEnforcementEndpoint.enforceSla(DefaultMachinesSlaEnforcementEndpoint.java:171)
at org.openspaces.grid.gsm.strategy.AbstractCapacityScaleStrategyBean.enforceMachinesSla(AbstractCapacityScaleStrategyBean.java:345)
at org.openspaces.grid.gsm.strategy.AbstractCapacityScaleStrategyBean.enforcePlannedCapacity(AbstractCapacityScaleStrategyBean.java:229)
at org.openspaces.grid.gsm.strategy.AutomaticCapacityScaleStrategyBean.enforceSla(AutomaticCapacityScaleStrategyBean.java:196)
at org.openspaces.grid.gsm.strategy.AbstractScaleStrategyBean.run(AbstractScaleStrategyBean.java:370)
at org.openspaces.admin.internal.admin.DefaultAdmin$LoggerRunnable.run(DefaultAdmin.java:1941)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
Caused by: java.util.concurrent.ExecutionException: org.openspaces.grid.gsm.machines.plugins.exceptions.ElasticMachineProvisioningException: Failed to provisiong machine: Failed to start machine: org.virtualbox_4_2.VBoxException: VirtualBox error: Cannot interpret appliance without reading it first (call read() before interpret()) (0x80004005)
at org.openspaces.grid.gsm.machines.plugins.NonBlockingElasticMachineProvisioningAdapter$2.getException(NonBlockingElasticMachineProvisioningAdapter.java:132)
at org.openspaces.grid.gsm.machines.plugins.NonBlockingElasticMachineProvisioningAdapter$2.get(NonBlockingElasticMachineProvisioningAdapter.java:166)
at org.openspaces.grid.gsm.machines.plugins.NonBlockingElasticMachineProvisioningAdapter$2.get(NonBlockingElasticMachineProvisioningAdapter.java:123)
at org.openspaces.grid.gsm.machines.DefaultMachinesSlaEnforcementEndpoint.validateHealthyAgent(DefaultMachinesSlaEnforcementEndpoint.java:1059)
... 14 more
Caused by: org.openspaces.grid.gsm.machines.plugins.exceptions.ElasticMachineProvisioningException: Failed to provisiong machine: Failed to start machine: org.virtualbox_4_2.VBoxException: VirtualBox error: Cannot interpret appliance without reading it first (call read() before interpret()) (0x80004005)
at org.cloudifysource.esc.driver.provisioning.ElasticMachineProvisioningCloudifyAdapter.startMachine(ElasticMachineProvisioningCloudifyAdapter.java:270)
at org.openspaces.grid.gsm.machines.plugins.NonBlockingElasticMachineProvisioningAdapter$1.run(NonBlockingElasticMachineProvisioningAdapter.java:102)
... 6 more
Caused by: org.openspaces.grid.gsm.machines.plugins.exceptions.ElasticMachineProvisioningException: Failed to start machine: org.virtualbox_4_2.VBoxException: VirtualBox error: Cannot interpret appliance without reading it first (call read() before interpret()) (0x80004005)
at org.cloudifysource.esc.driver.provisioning.ElasticMachineProvisioningCloudifyAdapter.provisionMachine(ElasticMachineProvisioningCloudifyAdapter.java:456)
at org.cloudifysource.esc.driver.provisioning.ElasticMachineProvisioningCloudifyAdapter.startMachine(ElasticMachineProvisioningCloudifyAdapter.java:267)
... 7 more
Caused by: org.cloudifysource.esc.driver.provisioning.CloudProvisioningException: org.virtualbox_4_2.VBoxException: VirtualBox error: Cannot interpret appliance without reading it first (call read() before interpret()) (0x80004005)
at fr.fastconnect.cloudify.driver.provisioning.virtualbox.VirtualboxCloudifyDriver.startMachine(VirtualboxCloudifyDriver.java:271)
at org.cloudifysource.esc.driver.provisioning.ElasticMachineProvisioningCloudifyAdapter.provisionMachine(ElasticMachineProvisioningCloudifyAdapter.java:454)
... 8 more
Caused by: org.virtualbox_4_2.VBoxException: VirtualBox error: Cannot interpret appliance without reading it first (call read() before interpret()) (0x80004005)
at org.virtualbox_4_2.IAppliance.interpret(IAppliance.java:225)
at fr.fastconnect.cloudify.driver.provisioning.virtualbox.api.VirtualBoxService42.create(VirtualBoxService42.java:151)
at fr.fastconnect.cloudify.driver.provisioning.virtualbox.VirtualboxCloudifyDriver.startMachine(VirtualboxCloudifyDriver.java:219)
... 9 more
2013-02-01 20:32:51,809 ESM WARNING [org.openspaces.grid.gsm.strategy.ScaleStrategyProgressEventState] - [helloworld.tomcat] Machines SLA Enforcement is in progress: Machine provisioning failed to start a new machine. Cause:org.openspaces.grid.gsm.machines.plugins.exceptions.ElasticMachineProvisioningException: Failed to provisiong machine: Failed to start machine: org.virtualbox_4_2.VBoxException: VirtualBox error: Cannot interpret appliance without reading it first (call read() before interpret()) (0x80004005); Caused by: org.openspaces.grid.gsm.machines.exceptions.FailedToStartNewMachineException: Machines SLA Enforcement is in progress: Machine provisioning failed to start a new machine. Cause:org.openspaces.grid.gsm.machines.plugins.exceptions.ElasticMachineProvisioningException: Failed to provisiong machine: Failed to start machine: org.virtualbox_4_2.VBoxException: VirtualBox error: Cannot interpret appliance without reading it first (call read() before interpret()) (0x80004005)
at org.openspaces.grid.gsm.sla.exceptions.SlaEnforcementInProgressException.fillInStackTrace(SlaEnforcementInProgressException.java:54)
at java.lang.Throwable.(Throwable.java:218)
at java.lang.Exception.(Exception.java:59)
at org.openspaces.grid.gsm.sla.exceptions.SlaEnforcementInProgressException.(SlaEnforcementInProgressException.java:42)
at org.openspaces.grid.gsm.sla.exceptions.SlaEnforcementInProgressException.(SlaEnforcementInProgressException.java:33)
at org.openspaces.grid.gsm.machines.exceptions.MachinesSlaEnforcementInProgressException.(MachinesSlaEnforcementInProgressException.java:36)
at org.openspaces.grid.gsm.machines.exceptions.FailedToStartNewMachineException.(FailedToStartNewMachineException.java:31)
at org.openspaces.grid.gsm.machines.DefaultMachinesSlaEnforcementEndpoint.validateHealthyAgent(DefaultMachinesSlaEnforcementEndpoint.java:1080)
at org.openspaces.grid.gsm.machines.DefaultMachinesSlaEnforcementEndpoint.updateFutureAgentsState(DefaultMachinesSlaEnforcementEndpoint.java:895)
at org.openspaces.grid.gsm.machines.DefaultMachinesSlaEnforcementEndpoint.enforceSlaInternal(DefaultMachinesSlaEnforcementEndpoint.java:351)
at org.openspaces.grid.gsm.machines.DefaultMachinesSlaEnforcementEndpoint.enforceSla(DefaultMachinesSlaEnforcementEndpoint.java:171)
at org.openspaces.grid.gsm.strategy.AbstractCapacityScaleStrategyBean.enforceMachinesSla(AbstractCapacityScaleStrategyBean.java:345)
at org.openspaces.grid.gsm.strategy.AbstractCapacityScaleStrategyBean.enforcePlannedCapacity(AbstractCapacityScaleStrategyBean.java:229)
at org.openspaces.grid.gsm.strategy.AutomaticCapacityScaleStrategyBean.enforceSla(AutomaticCapacityScaleStrategyBean.java:196)
at org.openspaces.grid.gsm.strategy.AbstractScaleStrategyBean.run(AbstractScaleStrategyBean.java:370)
at org.openspaces.admin.internal.admin.DefaultAdmin$LoggerRunnable.run(DefaultAdmin.java:1941)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
Caused by: java.util.concurrent.ExecutionException: org.openspaces.grid.gsm.machines.plugins.exceptions.ElasticMachineProvisioningException: Failed to provisiong machine: Failed to start machine: org.virtualbox_4_2.VBoxException: VirtualBox error: Cannot interpret appliance without reading it first (call read() before interpret()) (0x80004005)
at org.openspaces.grid.gsm.machines.plugins.NonBlockingElasticMachineProvisioningAdapter$2.getException(NonBlockingElasticMachineProvisioningAdapter.java:132)
at org.openspaces.grid.gsm.machines.plugins.NonBlockingElasticMachineProvisioningAdapter$2.get(NonBlockingElasticMachineProvisioningAdapter.java:166)
at org.openspaces.grid.gsm.machines.plugins.NonBlockingElasticMachineProvisioningAdapter$2.get(NonBlockingElasticMachineProvisioningAdapter.java:123)
at org.openspaces.grid.gsm.machines.DefaultMachinesSlaEnforcementEndpoint.validateHealthyAgent(DefaultMachinesSlaEnforcementEndpoint.java:1059)
... 14 more
Caused by: org.openspaces.grid.gsm.machines.plugins.exceptions.ElasticMachineProvisioningException: Failed to provisiong machine: Failed to start machine: org.virtualbox_4_2.VBoxException: VirtualBox error: Cannot interpret appliance without reading it first (call read() before interpret()) (0x80004005)
at org.cloudifysource.esc.driver.provisioning.ElasticMachineProvisioningCloudifyAdapter.startMachine(ElasticMachineProvisioningCloudifyAdapter.java:270)
at org.openspaces.grid.gsm.machines.plugins.NonBlockingElasticMachineProvisioningAdapter$1.run(NonBlockingElasticMachineProvisioningAdapter.java:102)
... 6 more
Caused by: org.openspaces.grid.gsm.machines.plugins.exceptions.ElasticMachineProvisioningException: Failed to start machine: org.virtualbox_4_2.VBoxException: VirtualBox error: Cannot interpret appliance without reading it first (call read() before interpret()) (0x80004005)
at org.cloudifysource.esc.driver.provisioning.ElasticMachineProvisioningCloudifyAdapter.provisionMachine(ElasticMachineProvisioningCloudifyAdapter.java:456)
at org.cloudifysource.esc.driver.provisioning.ElasticMachineProvisioningCloudifyAdapter.startMachine(ElasticMachineProvisioningCloudifyAdapter.java:267)
... 7 more
Caused by: org.cloudifysource.esc.driver.provisioning.CloudProvisioningException: org.virtualbox_4_2.VBoxException: VirtualBox error: Cannot interpret appliance without reading it first (call read() before interpret()) (0x80004005)
at fr.fastconnect.cloudify.driver.provisioning.virtualbox.VirtualboxCloudifyDriver.startMachine(VirtualboxCloudifyDriver.java:271)
at org.cloudifysource.esc.driver.provisioning.ElasticMachineProvisioningCloudifyAdapter.provisionMachine(ElasticMachineProvisioningCloudifyAdapter.java:454)
... 8 more
Caused by: org.virtualbox_4_2.VBoxException: VirtualBox error: Cannot interpret appliance without reading it first (call read() before interpret()) (0x80004005)
at org.virtualbox_4_2.IAppliance.interpret(IAppliance.java:225)
at fr.fastconnect.cloudify.driver.provisioning.virtualbox.api.VirtualBoxService42.create(VirtualBoxService42.java:151)
at fr.fastconnect.cloudify.driver.provisioning.virtualbox.VirtualboxCloudifyDriver.startMachine(VirtualboxCloudifyDriver.java:219)
... 9 more
Instead of the "hack" to create files and write content to it, use the new fonctions of the 4.2 webservice
Instead of forcing IP, use the HostOnlyInterface DHCP and retrieve dynamically this IP
I'm working to get an instance of the virtualbox cloudify driver for my project. The allure of configuring virtualbox for my server development work is too strong to resist.
However, I'm encountering an error where the virtualboxUrl is not being set. I suspect I'm doing something wrong but I am fairly certain that the SERVER_URL is getting picked up because I know that setConfig is being called and I'm not getting the IllegalArgumentException saying it must be set.
Can you help me resolve this?
https://www.virtualbox.org/pipermail/vbox-dev/2013-June/011556.html
machine.LockMachine(session, LockType.LockType_Shared); ??
In my vbox driver configuration I use the following configuration:
imageId "precise64"
//...
custom ([
"vbox.boxes.path" : "~/.vagrant.d/boxes",
So your driver look for ~/.vagrant.d/boxes/precise64/box.ovf But since Vagrant manage several providers (not only VirtualBox), the path where it download the OVF file is different.
~/.vagrant.d/boxes/precise64/virtualbox/box.ovf
Can you update your driver to look into the two paths ?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.