mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-24 16:03:43 +08:00
Merge pull request #12280 from ioito/automated-cherry-pick-of-#12278-upstream-release-3.7
Automated cherry pick of #12278: fix(region): google vm mac addr
This commit is contained in:
@@ -290,10 +290,8 @@ func (instance *SInstance) GetOsType() cloudprovider.TOsType {
|
||||
for _, disk := range instance.Disks {
|
||||
if disk.Index == 0 {
|
||||
for _, license := range disk.Licenses {
|
||||
if strings.Index(strings.ToLower(license), "windows") < 0 {
|
||||
if strings.Contains(strings.ToLower(license), "windows") {
|
||||
return cloudprovider.OsTypeWindows
|
||||
} else {
|
||||
return cloudprovider.OsTypeLinux
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -45,7 +45,7 @@ func (nic *SNetworkInterface) GetIP() string {
|
||||
|
||||
func (nic *SNetworkInterface) GetMAC() string {
|
||||
ip, _ := netutils.NewIPV4Addr(nic.NetworkIP)
|
||||
return ip.ToMac("00:16:")
|
||||
return ip.ToMac("42:01:")
|
||||
}
|
||||
|
||||
func (nic *SNetworkInterface) GetDriver() string {
|
||||
|
||||
Reference in New Issue
Block a user