Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding -cpu host for qemu for MacOS #11442

Merged
merged 1 commit into from
Sep 7, 2021
Merged

Adding -cpu host for qemu for MacOS #11442

merged 1 commit into from
Sep 7, 2021

Conversation

scottschreckengaust
Copy link
Contributor

Fixes #11421

@scottschreckengaust
Copy link
Contributor Author

/assign @mtrmac

@scottschreckengaust
Copy link
Contributor Author

/assign @baude

@rhatdan
Copy link
Member

rhatdan commented Sep 4, 2021

/approve
@ashley-cui @baude @jwhonce PTAL

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Sep 4, 2021
@baude
Copy link
Member

baude commented Sep 5, 2021

excellent PR. would you mind adding a better commit message for our changelogs?

@baude
Copy link
Member

baude commented Sep 5, 2021

LGTM, small ask to update commit message

@mheon
Copy link
Member

mheon commented Sep 5, 2021

/approve
LGTM once comment from @baude is addressed

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Sep 5, 2021

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: mheon, rhatdan, scottschreckengaust

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@scottschreckengaust
Copy link
Contributor Author

FYI: Before a MacOS release the PR #11449 may need to be merged. I had to patch pkg/machine/qemu/machine.go similar to PR #11449 to test locally:

@@ -622,10 +622,11 @@ func CheckActiveVM() (bool, string, error) {
 // startHostNetworking runs a binary on the host system that allows users
 // to setup port forwarding to the podman virtual machine
 func (v *MachineVM) startHostNetworking() error {
-       // TODO we may wish to configure the directory in containers common
        binary := filepath.Join("/usr/libexec/podman/", machine.ForwarderBinaryName)
        if _, err := os.Stat(binary); err != nil {
-               return err
+               if binary, err = exec.LookPath(machine.ForwarderBinaryName); err != nil {
+                       return err
+               }
        }
 
        // Listen on all at port 7777 for setting up and tearing

@mheon
Copy link
Member

mheon commented Sep 6, 2021

@baude What's the story with gvproxy lookup on main? It's drastically different from the 3.3 branch. Are we going to unify them at some point?

Adding the `-cpu host` option to the `addArchOptions` function for
darwin removes the warning message, "host doesn't support requested
feature: CPUID.80000001H:ECX.svm [bit 2]" by qemu-system-x86_64 when
using the `podman machine start` command on MacOS

Closes #11421

[NO TESTS NEEDED]

Signed-off-by: Scott Schreckengaust <scottschreckengaust@users.noreply.github.com>
@scottschreckengaust
Copy link
Contributor Author

LGTM, small ask to update commit message

Updated commit message.

@scottschreckengaust
Copy link
Contributor Author

/test

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Sep 6, 2021

@scottschreckengaust: Cannot trigger testing until a trusted user reviews the PR and leaves an /ok-to-test message.

In response to this:

/test

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@rhatdan
Copy link
Member

rhatdan commented Sep 7, 2021

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Sep 7, 2021
@openshift-merge-robot openshift-merge-robot merged commit 668deb2 into containers:main Sep 7, 2021
@scottschreckengaust
Copy link
Contributor Author

scottschreckengaust commented Sep 15, 2021

This looks like it is in the 3.3.1 release (commit is there) but still showing the warning on my mac. Local build and testing of the PR does not show the warning, can I get a confirmation that the warning message is still occurring (other than for me on a brew upgrade)?

@lazarillo
Copy link

lazarillo commented Sep 28, 2021

Yes, I am also seeing the warning.

Here are some details:

╰─❯ podman --version    
podman version 3.3.1

and

╰─❯ uname -a           
Darwin c02c2147md6v-c 20.6.0 Darwin Kernel Version 20.6.0: Mon Aug 30 06:12:21 PDT 2021; root:xnu-7195.141.6~3/RELEASE_X86_64 x86_64

This is what I see when I start up the machine:

╰─❯ podman machine start lazarillo
INFO[0000] waiting for clients...                       
INFO[0000] listening tcp://0.0.0.0:7777                 
INFO[0000] new connection from  to /var/folders/k3/lfc7ytr92fggrv0ppb4ry1gw0000gn/T/podman/qemu_lazarillo.sock 
Waiting for VM ...
qemu-system-x86_64: warning: host doesn't support requested feature: CPUID.80000001H:ECX.svm [bit 2]

(Nothing further... no "success", and the warning is still seen.)

I built it with homebrew today (2019-09-28).

Let me know if you need any further details or information.

@lazarillo
Copy link

I am not sure if this is related, but I also noticed that I am not able to connect to machines unless I am root.

I am just learning podman, but have been using Docker for a while. I was looking at a nice tutorial to get started and it had this example command to test a web server deployment:

podman run -dt -p 8080:8080/tcp -e HTTPD_VAR_RUN=/run/httpd -e HTTPD_MAIN_CONF_D_PATH=/etc/httpd/conf.d \
                  -e HTTPD_MAIN_CONF_PATH=/etc/httpd/conf \
                  -e HTTPD_CONTAINER_SCRIPTS_PATH=/usr/share/container-scripts/httpd/ \
                  registry.fedoraproject.org/f29/httpd /usr/bin/run-httpd

I could not get that command to "work", unless I ran it with root (sudo). Specifically, the command ran, but the port mapping was useless.

Without sudo, I just got:

╰─❯ curl localhost:8080                                                                                    
curl: (7) Failed to connect to localhost port 8080: Connection refused

But if I ran the command preceded by sudo, then I got the proper response:

╰─❯ curl localhost:8080                                                                                           
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
	<head>
		<title>Test Page for the Apache HTTP Server on Fedora</title>
.
.
.

@github-actions github-actions bot added the locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. label Sep 22, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 22, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

podman machine start reports error but seem to run ?
7 participants