Commit Graph

8 Commits

Author SHA1 Message Date
Brent Baude 8019dc9e60 hyperv: add podman socket mapping
on machine start, create a socket representing the machine's podman
service socket so local (to the host) applications can take advanatge of
it.

[NO NEW TESTS NEEDED]

Signed-off-by: Brent Baude <bbaude@redhat.com>
2023-04-19 16:41:34 -05:00
Brent Baude 4b8230119e HyperV: wait on stop
When using podman machine with hyperv, stop was releasing the terminal
back top the user prematurely.  This resulted in users being able to run
subsequent commands while the vm was still stopped.  Commands like
machine stop were prone to failing.

[NO NEW TESTS NEEDED]

Signed-off-by: Brent Baude <bbaude@redhat.com>
2023-04-18 08:02:48 -05:00
Brent Baude 3222545ad5 Enabled network over vsock
podman machine with Microsoft HyperV will use hvsock on the guest and
vsock on the guest for its networking.  this pr enables the basics for
this to happen as well as changes to ignition to automatically set this
up with network manager.

the vm binary referenced in this pr is in containers/gvisor-tap-vsock
and will need to be added to distributions.

[NO NEW TESTS NEEDED]
Signed-off-by: Brent Baude <bbaude@redhat.com>
2023-04-17 12:34:37 -05:00
Brent Baude f488d9890c Add support for HVSOCK on hyperv
Windows HyperV uses HVSocks (Windows adaptation of vsock) for
communicating between vms and the host.  Podman machine in Qemu uses a
virtual UDS to signal the host that the machine is booted.  In HyperV,
we can use a HVSOCK for the same purpose.

One of the big aspects of using HVSOCK on Windows is that the HVSOCK
must be entered into the Windows registry.  So now part of init and rm
of a podman machine, entries must be added and removed respectively.
Also duplicates are a no-no.

Signed-off-by: Brent Baude <bbaude@redhat.com>
2023-04-14 13:53:25 -05:00
OpenShift Merge Robot ac2efdb862
Merge pull request #17949 from baude/hypervset
implement podman machine set for hyperv
2023-03-28 17:41:40 +02:00
Brent Baude 51d068ecc7 implement podman machine set for hyperv
add the ability to set cpu and processor counts on an existing vm.

Signed-off-by: Brent Baude <bbaude@redhat.com>

[NO NEW TESTS NEEDED]
2023-03-27 16:11:24 -05:00
Brent Baude 518eafaa34 hyperv: lookup machine on local filesystem first
when looking for a machine, look it up locally first to prevent
accidental collision with non-podman machine vms.  in the cast of
`podman machine ls`, only list podman machines found by json files

Enabled remove with force.

[NO NEW TESTS NEEDED]

Signed-off-by: Brent Baude <bbaude@redhat.com>
2023-03-27 10:17:06 -05:00
Brent Baude 0dac214f56 basic hypverv machine implementation
with libhvee, we are able to do the basics of podman machine management
on hyperv.  The basic functions like init, rm, stop, and start are all
functional.  Start and stop will periodically throw a benign error
processing the hyperv message being returned from the action.  The error
is described in the todo's below.

notable items:

* no podman commands will work (like ps, images, etc)
* the machine must be initialized with --image-path and fed a custom image.
* disk size is set to 100GB statically.
* the vm joins the default hyperv network which is TCP/IP network based.
* podman machine ssh does not work
* podman machine set does not work
* you can grab the ip address from hyperv and fake a machine connection
  with `podman system connection`.
* when booting, use the hyperv console to know the boot is complete.

TODOs:
* podman machine ssh
* podman machine set
* podman machine rm needs force bool
* disk size in NewMachine is set to 100GB
* podman start needs to wait until fully booted
* establish a boot complete signal from guest
* implement gvproxy like user networking
* fix benign failures in stop/start -> Error: error 2147749890 (FormatMessage failed with: The system cannot find message text for message number 0x%1 in the message file for %2.)

[NO NEW TESTS NEEDED]

Signed-off-by: Brent Baude <bbaude@redhat.com>
2023-03-17 16:02:28 -05:00