我正在使用 Azure 的 java api 来自动创建 vnet、子网和 vm 实例。我想要做的是运行创建 vnet 的代码,在该 vnet 中建立一个初始子网,然后在该子网中创建一个带有 Nic 的 VM。我可以毫无问题地做到这一点,但是当我再次尝试时,我得到了这个错误:
资源引用的子网与可用性集中其他 VM 的子网不在同一个虚拟网络中。
我什至没有创建任何可用性集。为什么它给我这个问题?
谢谢,
亚当
以下是错误响应的全文:
17:02:01,249 ERROR WFLYEJB0034: EJB Invocation failed on component AzureDriver for method public abstract java.util.concurrent.Future net.maxgigapop.mrs.driver.IHandleDriverSystemCall.commitDelta(net.maxgigapop.mrs.bean.DriverSystemDelta): javax.ejb.EJBException: com.microsoft.azure.CloudException: Subnet subnet-d39c3ca7-39c9-494a-9a82-a5812e9346f8 referenced by resource /subscriptions/08d719ed-dc6a-40a9-8e12-4e3a28ad01a6/resourceGroups/StackV/providers/Microsoft.Network/networkInterfaces/nic0/ipConfigurations/primary is not in the same Virtual Network /subscriptions/08d719ed-dc6a-40a9-8e12-4e3a28ad01a6/resourceGroups/StackV/providers/Microsoft.Network/virtualNetworks/vpc-d530ea45-2a89-4360-8a71-8dcd62b9019a as the subnets of other VMs in the availability set.: Subnet subnet-d39c3ca7-39c9-494a-9a82-a5812e9346f8 referenced by resource /subscriptions/08d719ed-dc6a-40a9-8e12-4e3a28ad01a6/resourceGroups/StackV/providers/Microsoft.Network/networkInterfaces/nic0/ipConfigurations/primary is not in the same Virtual Network /subscriptions/08d719ed-dc6a-40a9-8e12-4e3a28ad01a6/resourceGroups/StackV/providers/Microsoft.Network/virtualNetworks/vpc-d530ea45-2a89-4360-8a71-8dcd62b9019a as the subnets of other VMs in the availability set.
at org.jboss.as.ejb3.tx.CMTTxInterceptor.handleExceptionInOurTx(CMTTxInterceptor.java:187)
at org.jboss.as.ejb3.tx.CMTTxInterceptor.invokeInOurTx(CMTTxInterceptor.java:277)
at org.jboss.as.ejb3.tx.CMTTxInterceptor.required(CMTTxInterceptor.java:327)
at org.jboss.as.ejb3.tx.CMTTxInterceptor.processInvocation(CMTTxInterceptor.java:239)
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
at org.jboss.as.ejb3.component.interceptors.CurrentInvocationContextInterceptor.processInvocation(CurrentInvocationContextInterceptor.java:41)
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
at org.jboss.as.ejb3.component.invocationmetrics.WaitTimeInterceptor.processInvocation(WaitTimeInterceptor.java:47)
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
at org.jboss.as.ejb3.security.SecurityContextInterceptor.processInvocation(SecurityContextInterceptor.java:100)
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
at org.jboss.as.ejb3.deployment.processors.StartupAwaitInterceptor.processInvocation(StartupAwaitInterceptor.java:22)
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
at org.jboss.as.ejb3.component.interceptors.ShutDownInterceptorFactory$1.processInvocation(ShutDownInterceptorFactory.java:64)
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
at org.jboss.as.ejb3.component.interceptors.LoggingInterceptor.processInvocation(LoggingInterceptor.java:67)
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
at org.jboss.as.ee.component.NamespaceContextInterceptor.processInvocation(NamespaceContextInterceptor.java:50)
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
at org.jboss.as.ejb3.component.interceptors.AdditionalSetupInterceptor.processInvocation(AdditionalSetupInterceptor.java:54)
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
at org.jboss.invocation.ContextClassLoaderInterceptor.processInvocation(ContextClassLoaderInterceptor.java:64)
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
at org.jboss.invocation.InterceptorContext.run(InterceptorContext.java:356)
at org.wildfly.security.manager.WildFlySecurityManager.doChecked(WildFlySecurityManager.java:636)
at org.jboss.invocation.AccessCheckingInterceptor.processInvocation(AccessCheckingInterceptor.java:61)
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
at org.jboss.invocation.InterceptorContext.run(InterceptorContext.java:356)
at org.jboss.invocation.PrivilegedWithCombinerInterceptor.processInvocation(PrivilegedWithCombinerInterceptor.java:80)
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61)
at org.jboss.as.ee.component.ViewService$View.invoke(ViewService.java:198)
at org.jboss.as.ee.component.ViewDescription$1.processInvocation(ViewDescription.java:185)
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
at org.jboss.as.ejb3.component.interceptors.LogDiagnosticContextRecoveryInterceptor.processInvocation(LogDiagnosticContextRecoveryInterceptor.java:82)
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
at org.jboss.as.ejb3.component.interceptors.AsyncFutureInterceptorFactory$1$2.runInvocation(AsyncFutureInterceptorFactory.java:104)
at org.jboss.as.ejb3.component.interceptors.AsyncInvocationTask.run(AsyncInvocationTask.java:74)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
at org.jboss.threads.JBossThread.run(JBossThread.java:320)
Caused by: com.microsoft.azure.CloudException: Subnet subnet-d39c3ca7-39c9-494a-9a82-a5812e9346f8 referenced by resource /subscriptions/08d719ed-dc6a-40a9-8e12-4e3a28ad01a6/resourceGroups/StackV/providers/Microsoft.Network/networkInterfaces/nic0/ipConfigurations/primary is not in the same Virtual Network /subscriptions/08d719ed-dc6a-40a9-8e12-4e3a28ad01a6/resourceGroups/StackV/providers/Microsoft.Network/virtualNetworks/vpc-d530ea45-2a89-4360-8a71-8dcd62b9019a as the subnets of other VMs in the availability set.: Subnet subnet-d39c3ca7-39c9-494a-9a82-a5812e9346f8 referenced by resource /subscriptions/08d719ed-dc6a-40a9-8e12-4e3a28ad01a6/resourceGroups/StackV/providers/Microsoft.Network/networkInterfaces/nic0/ipConfigurations/primary is not in the same Virtual Network /subscriptions/08d719ed-dc6a-40a9-8e12-4e3a28ad01a6/resourceGroups/StackV/providers/Microsoft.Network/virtualNetworks/vpc-d530ea45-2a89-4360-8a71-8dcd62b9019a as the subnets of other VMs in the availability set.
at com.microsoft.azure.AzureClient.createExceptionFromResponse(AzureClient.java:724)
at com.microsoft.azure.AzureClient.access$100(AzureClient.java:33)
at com.microsoft.azure.AzureClient$3.call(AzureClient.java:160)
at com.microsoft.azure.AzureClient$3.call(AzureClient.java:157)
at rx.internal.operators.OnSubscribeMap$MapSubscriber.onNext(OnSubscribeMap.java:69)
at retrofit2.adapter.rxjava.RxJavaCallAdapterFactory$RequestArbiter.request(RxJavaCallAdapterFactory.java:173)
at rx.Subscriber.setProducer(Subscriber.java:211)
at rx.internal.operators.OnSubscribeMap$MapSubscriber.setProducer(OnSubscribeMap.java:102)
at retrofit2.adapter.rxjava.RxJavaCallAdapterFactory$CallOnSubscribe.call(RxJavaCallAdapterFactory.java:152)
at retrofit2.adapter.rxjava.RxJavaCallAdapterFactory$CallOnSubscribe.call(RxJavaCallAdapterFactory.java:138)
at rx.Observable.unsafeSubscribe(Observable.java:10142)
at rx.internal.operators.OnSubscribeMap.call(OnSubscribeMap.java:48)
at rx.internal.operators.OnSubscribeMap.call(OnSubscribeMap.java:33)
at rx.Observable.unsafeSubscribe(Observable.java:10142)
at rx.internal.operators.OnSubscribeSingle.call(OnSubscribeSingle.java:81)
at rx.internal.operators.OnSubscribeSingle.call(OnSubscribeSingle.java:27)
at rx.internal.operators.SingleToObservable.call(SingleToObservable.java:39)
at rx.internal.operators.SingleToObservable.call(SingleToObservable.java:27)
at rx.Observable.unsafeSubscribe(Observable.java:10142)
at rx.internal.operators.OnSubscribeMap.call(OnSubscribeMap.java:48)
at rx.internal.operators.OnSubscribeMap.call(OnSubscribeMap.java:33)
at rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:48)
at rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:30)
at rx.Observable.unsafeSubscribe(Observable.java:10142)
at rx.internal.operators.DeferredScalarSubscriber.subscribeTo(DeferredScalarSubscriber.java:153)
at rx.internal.operators.OnSubscribeTakeLastOne.call(OnSubscribeTakeLastOne.java:32)
at rx.internal.operators.OnSubscribeTakeLastOne.call(OnSubscribeTakeLastOne.java:22)
at rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:48)
at rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:30)
at rx.Observable.unsafeSubscribe(Observable.java:10142)
at rx.internal.operators.OnSubscribeMap.call(OnSubscribeMap.java:48)
at rx.internal.operators.OnSubscribeMap.call(OnSubscribeMap.java:33)
at rx.Observable.unsafeSubscribe(Observable.java:10142)
at rx.internal.operators.OnSubscribeMap.call(OnSubscribeMap.java:48)
at rx.internal.operators.OnSubscribeMap.call(OnSubscribeMap.java:33)
at rx.Observable.unsafeSubscribe(Observable.java:10142)
at rx.internal.operators.OnSubscribeMap.call(OnSubscribeMap.java:48)
at rx.internal.operators.OnSubscribeMap.call(OnSubscribeMap.java:33)
at rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:48)
at rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:30)
at rx.Observable.unsafeSubscribe(Observable.java:10142)
at rx.internal.operators.OperatorSubscribeOn$1.call(OperatorSubscribeOn.java:94)
at rx.internal.schedulers.CachedThreadScheduler$EventLoopWorker$1.call(CachedThreadScheduler.java:230)
at rx.internal.schedulers.ScheduledAction.run(ScheduledAction.java:55)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: rx.exceptions.OnErrorThrowable$OnNextValue: OnError while emitting onNext value: retrofit2.Response.class
at rx.exceptions.OnErrorThrowable.addValueAsLastCause(OnErrorThrowable.java:118)
at rx.internal.operators.OnSubscribeMap$MapSubscriber.onNext(OnSubscribeMap.java:73)
... 46 more