Skip to content
This repository was archived by the owner on Feb 8, 2021. It is now read-only.

Conversation

@gao-feng
Copy link
Contributor

@gao-feng gao-feng commented Aug 12, 2017

Env:
xen: 4.9
qemu: 2.10.0
guest kernel: 4.12.4

Todo:
a: Use one xenlight library for xen pv and hvm.
b: use vm_console to handle pv domain console output (done)
c: fix some weird problems in some wrong case.
1, host dom name will be (null) and fail to create xenpv domain(fixed)
2,hyperd panic when fail to create xenpv domain (fixed)
3,hyperd hang (disappear after fix bug 2)

Signed-off-by: Gao feng omarapazanadi@gmail.com

}()
}

func (xc *XenPvContext) connectConsole(vmid string, domId xl.Domid) error {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could it be possible to merge it into vm_console.go?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can only add another unix socket to pass console data, seems like pv doesn't have direct way to get console from unix socket.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems that adding ConnectConsole() io.Reader to the driver interface is a possible way to merge the code. What do you think?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@laijs
Good point!
Commit two adds ConsoleReader to the driver interface, please check.

@gao-feng gao-feng force-pushed the xenpv branch 3 times, most recently from 43faa09 to 3296e84 Compare August 16, 2017 03:04
ctx.Log(TRACE, "connected to %s", ctx.ConsoleSockName)

tc, err := telnet.NewConn(conn)
tc, err := telnet.NewConn(reader)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seams that the above code(L62-L69) should all be moved in to DCtx.ConsoleReader() (those who are using ctx.ConsoleSockName).
DCtx.ConsoleReader() for xenpv doesn't returns a telnet socket, you cannot use telnet.NewConn() for it.

Signed-off-by: Gao feng <omarapazanadi@gmail.com>
For the hypervisor whose console doesn't export as unix socket.

Signed-off-by: Gao feng <omarapazanadi@gmail.com>
Signed-off-by: Gao feng <omarapazanadi@gmail.com>
@gao-feng
Copy link
Contributor Author

@laijs
updated, xenlight-runv.go needs to access the private data Context.ctx in xenlight package, looks like use xenlight package as vendor is impossible.

@gnawux
Copy link
Member

gnawux commented Aug 29, 2017

hmm.... looks we need submit change request to official xenlight go binding in the future

@laijs laijs merged commit dd48fb9 into hyperhq:master Aug 30, 2017
jimoosciuc pushed a commit to jimoosciuc/runv that referenced this pull request May 26, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants