[et-mgmt-tools] [PATCH][RESEND] connecting console after install completes
Nobuhiro Itou
fj0873gn at aa.jp.fujitsu.com
Tue Mar 13 07:16:56 UTC 2007
Hi, Dan
Would you give me a comment on this patch?
If not, please apply it.
> When the domain restarts after install completes, the console is not connected.
> Therefore, if I don't connect the console for myself,
> I cannot be finished the setting after install completes.
>
> The attached patch adds to solve this problem.
>
>
> Signed-off-by: Nobuhiro Itou <fj0873gn at aa.jp.fujitsu.com>
Thanks,
Nobuhiro Itou.
diff -r 95196b0f37a5 virt-install
--- a/virt-install Mon Mar 12 12:39:59 2007 -0400
+++ b/virt-install Tue Mar 13 16:09:12 2007 +0900
@@ -509,6 +509,7 @@ def main():
# the domain
print "Guest installation complete... restarting guest."
dom.create()
+ guest.connect_console(conscb)
else:
print ("Domain installation does not appear to have been\n"
"successful. If it was, you can restart your domain\n"
diff -r 95196b0f37a5 virtinst/Guest.py
--- a/virtinst/Guest.py Mon Mar 12 12:39:59 2007 -0400
+++ b/virtinst/Guest.py Tue Mar 13 16:11:56 2007 +0900
@@ -575,6 +575,18 @@ class Guest(object):
# for inactive guest, or get the still running install..
return self.conn.lookupByName(self.name)
+ def connect_console(self, consolecb):
+ child = None
+ if consolecb:
+ logging.debug("Launching console callback")
+ child = consolecb(self.domain)
+
+ if child: # if we connected the console, wait for it to finish
+ try:
+ (pid, status) = os.waitpid(child, 0)
+ except OSError, (errno, msg):
+ print __name__, "waitpid:", msg
+
def validate_parms(self):
if self.domain is not None:
raise RuntimeError, "Domain already started!"
More information about the et-mgmt-tools
mailing list