@@ -106,6 +106,14 @@ def parse_args():
106106 geng .add_option ("" , "--cpuset" , type = "string" , dest = "cpuset" ,
107107 action = "callback" , callback = cli .check_before_store ,
108108 help = _ ("Set which physical CPUs Domain can use." ))
109+ geng .add_option ("" , "--os-type" , type = "string" , dest = "distro_type" ,
110+ action = "callback" , callback = cli .check_before_store ,
111+ help = _ ("The OS type being installed, e.g. "
112+ "'linux', 'unix', 'windows'" ))
113+ geng .add_option ("" , "--os-variant" , type = "string" , dest = "distro_variant" ,
114+ action = "callback" , callback = cli .check_before_store ,
115+ help = _ ("The OS variant being installed, "
116+ "e.g. 'fedora6', 'rhel5', 'solaris10', 'win2k'" ))
109117 parser .add_option_group (geng )
110118
111119 fulg = OptionGroup (parser , _ ("Full Virtualization specific options." ))
@@ -169,6 +177,7 @@ def parse_args():
169177 parser .add_option_group (misc )
170178
171179 (options ,args ) = parser .parse_args ()
180+
172181 if len (args ) < 1 :
173182 parser .error (_ ("You need to provide an image XML descriptor" ))
174183 options .image = args [0 ]
@@ -220,6 +229,11 @@ def main():
220229 get_graphics (image .domain , options .vnc , options .vncport ,
221230 options .nographics , options .sdl , options .keymap , guest )
222231
232+ if options .distro_type :
233+ guest .set_os_type (options .distro_type )
234+ if options .distro_variant :
235+ guest .set_os_variant (options .distro_variant )
236+
223237 if installer .is_hvm ():
224238 if options .noacpi :
225239 guest .features ["acpi" ] = False
0 commit comments