host: fix isImportFromLibvirt (#13933)

should check __origin_id not getOriginId

Signed-off-by: wanyaoqi <wanyaoqi1995@163.com>
This commit is contained in:
wanyaoqi
2022-04-08 01:30:05 +08:00
committed by GitHub
parent 3e368eb93d
commit 2e7faba76c
+1 -1
View File
@@ -189,7 +189,7 @@ func (s *SKVMGuestInstance) getOriginId() string {
}
func (s *SKVMGuestInstance) isImportFromLibvirt() bool {
return len(s.getOriginId()) > 0
return s.Desc.Contains("metadata", "__origin_id")
}
func (s *SKVMGuestInstance) GetPid() int {