mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-24 16:03:43 +08:00
Merge pull request #15848 from ioito/hotfix/qx-vm-public-ip
fix(region): vm created with public ip
This commit is contained in:
@@ -550,7 +550,8 @@ func (self *SManagedVirtualizedGuestDriver) RemoteDeployGuestForCreate(ctx conte
|
||||
|
||||
ret, expect, eipSync := 0, len(desc.DataDisks)+1, false
|
||||
err = cloudprovider.RetryUntil(func() (bool, error) {
|
||||
if desc.PublicIpBw > 0 {
|
||||
// 虚拟机启动后才分配静态公网IP,否则取不到public ip
|
||||
if desc.PublicIpBw > 0 && initialState == api.VM_RUNNING {
|
||||
eip, _ := iVM.GetIEIP()
|
||||
if eip == nil {
|
||||
iVM.Refresh()
|
||||
|
||||
Reference in New Issue
Block a user