mirror of
https://github.com/containers/podman.git
synced 2025-10-19 04:03:23 +08:00
update libhvee
this version of libhvee contains fixes related to machine stop required for windows hyperv [NO NEW TESTS NEEDED] Signed-off-by: Brent Baude <bbaude@redhat.com>
This commit is contained in:
2
go.mod
2
go.mod
@ -16,7 +16,7 @@ require (
|
||||
github.com/containers/common v0.55.1-0.20230824140149-b27c2ba2b7e1
|
||||
github.com/containers/conmon v2.0.20+incompatible
|
||||
github.com/containers/image/v5 v5.26.1-0.20230807184415-3fb422379cfa
|
||||
github.com/containers/libhvee v0.4.0
|
||||
github.com/containers/libhvee v0.4.1-0.20230816135538-b81ee3f10e1e
|
||||
github.com/containers/ocicrypt v1.1.8
|
||||
github.com/containers/psgo v1.8.0
|
||||
github.com/containers/storage v1.49.1-0.20230823084450-6902c2df7cca
|
||||
|
4
go.sum
4
go.sum
@ -252,8 +252,8 @@ github.com/containers/conmon v2.0.20+incompatible h1:YbCVSFSCqFjjVwHTPINGdMX1F6J
|
||||
github.com/containers/conmon v2.0.20+incompatible/go.mod h1:hgwZ2mtuDrppv78a/cOBNiCm6O0UMWGx1mu7P00nu5I=
|
||||
github.com/containers/image/v5 v5.26.1-0.20230807184415-3fb422379cfa h1:wDfVQtc6ik2MvsUmu/YRSyBAE5YUxdjcEDtuT1q2KDo=
|
||||
github.com/containers/image/v5 v5.26.1-0.20230807184415-3fb422379cfa/go.mod h1:apL4qwq31NV0gsSZQJPxYyTH0yzWavmMCjT8vsQaXSk=
|
||||
github.com/containers/libhvee v0.4.0 h1:HGHIIExgP2PjwjHKKoQM3B+3qakNIZcmmkiAO4luAZE=
|
||||
github.com/containers/libhvee v0.4.0/go.mod h1:fyWDxNQccveTdE3Oe+QRuLbwF/iyV0hDxXqRX5Svlic=
|
||||
github.com/containers/libhvee v0.4.1-0.20230816135538-b81ee3f10e1e h1:j8QuCCOnTxQNtVwARhgUhe3+QYhXpcuoy9YuIgpLWDE=
|
||||
github.com/containers/libhvee v0.4.1-0.20230816135538-b81ee3f10e1e/go.mod h1:I30im5oKCYBJMEa+r0jffZn+Yb5/8CnYeAJy+vb77Mg=
|
||||
github.com/containers/libtrust v0.0.0-20230121012942-c1716e8a8d01 h1:Qzk5C6cYglewc+UyGf6lc8Mj2UaPTHy/iF2De0/77CA=
|
||||
github.com/containers/libtrust v0.0.0-20230121012942-c1716e8a8d01/go.mod h1:9rfv8iPl1ZP7aqh9YA68wnZv2NUDbXdcdPHVz0pFbPY=
|
||||
github.com/containers/ocicrypt v1.0.1/go.mod h1:MeJDzk1RJHv89LjsH0Sp5KTY3ZYkjXO/C+bKAeWFIrc=
|
||||
|
24
vendor/github.com/containers/libhvee/pkg/hypervctl/vm.go
generated
vendored
24
vendor/github.com/containers/libhvee/pkg/hypervctl/vm.go
generated
vendored
@ -544,17 +544,6 @@ func (vm *VirtualMachine) remove() (int32, error) {
|
||||
return -1, err
|
||||
}
|
||||
|
||||
wmiInst, err := vm.fetchSystemSettingsInstance(srv)
|
||||
if err != nil {
|
||||
return -1, err
|
||||
}
|
||||
defer wmiInst.Close()
|
||||
|
||||
path, err := wmiInst.Path()
|
||||
if err != nil {
|
||||
return -1, err
|
||||
}
|
||||
|
||||
vsms, err := srv.GetSingletonInstance("Msvm_VirtualSystemManagementService")
|
||||
if err != nil {
|
||||
return -1, err
|
||||
@ -563,14 +552,13 @@ func (vm *VirtualMachine) remove() (int32, error) {
|
||||
|
||||
var (
|
||||
job *wmiext.Instance
|
||||
resultingSystem string
|
||||
)
|
||||
|
||||
// https://learn.microsoft.com/en-us/windows/win32/hyperv_v2/cim-virtualsystemmanagementservice-destroysystem
|
||||
if err := vsms.BeginInvoke("DestroySystem").
|
||||
In("AffectedSystem", path).
|
||||
In("AffectedSystem", vm.Path()).
|
||||
Execute().
|
||||
Out("Job", &job).
|
||||
Out("ResultingSystem", &resultingSystem).
|
||||
Out("ReturnValue", &res).End(); err != nil {
|
||||
return -1, err
|
||||
}
|
||||
@ -583,11 +571,10 @@ func (vm *VirtualMachine) remove() (int32, error) {
|
||||
}
|
||||
|
||||
func (vm *VirtualMachine) Remove(diskPath string) error {
|
||||
res, err := vm.remove()
|
||||
if err != nil {
|
||||
if _, err := vm.remove(); err != nil {
|
||||
return err
|
||||
}
|
||||
if DestroySystemResult(res) == VMDestroyCompletedwithNoError {
|
||||
|
||||
// Remove disk only if we were given one
|
||||
if len(diskPath) > 0 {
|
||||
if err := os.Remove(diskPath); err != nil {
|
||||
@ -596,9 +583,6 @@ func (vm *VirtualMachine) Remove(diskPath string) error {
|
||||
}
|
||||
return nil
|
||||
}
|
||||
return fmt.Errorf("failed to destroy system %s: %s", vm.Name, DestroySystemResult(res).Reason())
|
||||
|
||||
}
|
||||
|
||||
func (vm *VirtualMachine) State() EnabledState {
|
||||
return EnabledState(vm.EnabledState)
|
||||
|
2
vendor/modules.txt
vendored
2
vendor/modules.txt
vendored
@ -286,7 +286,7 @@ github.com/containers/image/v5/transports
|
||||
github.com/containers/image/v5/transports/alltransports
|
||||
github.com/containers/image/v5/types
|
||||
github.com/containers/image/v5/version
|
||||
# github.com/containers/libhvee v0.4.0
|
||||
# github.com/containers/libhvee v0.4.1-0.20230816135538-b81ee3f10e1e
|
||||
## explicit; go 1.18
|
||||
github.com/containers/libhvee/pkg/hypervctl
|
||||
github.com/containers/libhvee/pkg/kvp/ginsu
|
||||
|
Reference in New Issue
Block a user