Added: Jiri Denemark <jdenemar@xxxxxxxxxx> On Sun, Apr 14, 2013 at 01:45:35PM -0400, Cole Robinson wrote: > On 04/12/2013 05:50 AM, Guannan Ren wrote: > > On 04/11/2013 01:45 PM, Hu Tao wrote: > >> From: Ken ICHIKAWA <ichikawa.ken@xxxxxxxxxxxxxx> > >> > >> We couldn't use host-passthrough mode for virtual cpu from > >> virt-manager so far. This patch enables virt-manager to > >> configure host-passthrough mode. > >> > >> Signed-off-by: Ken ICHIKAWA <ichikawa.ken@xxxxxxxxxxxxxx> > >> --- > >> ui/vmm-details.ui | 21 +++++++++++++++++++-- > >> virtManager/details.py | 23 ++++++++++++++++++++++- > >> virtManager/domain.py | 13 ++++++++++--- > >> 3 files changed, 51 insertions(+), 6 deletions(-) > >> > >> diff --git a/ui/vmm-details.ui b/ui/vmm-details.ui > >> index ad0652d..b1a70b3 100644 > >> --- a/ui/vmm-details.ui > >> +++ b/ui/vmm-details.ui > >> @@ -2314,6 +2314,23 @@ I/O:</property> > >> <property > >> name="can_focus">False</property> > >> <property > >> name="spacing">6</property> > >> <child> > >> + <object > >> class="GtkCheckButton" id="host-passthrough-enable"> > >> + <property name="label" > >> translatable="yes">Use host-passthrough mode</property> > >> + <property > >> name="visible">True</property> > >> + <property > >> name="can_focus">True</property> > >> + <property > >> name="receives_default">False</property> > >> + <property > >> name="use_action_appearance">False</property> > >> + <property > >> name="active">True</property> > >> + <property > >> name="draw_indicator">True</property> > >> + <signal name="toggled" > >> handler="on_host_passthrough_enable_toggled" swapped="no"/> > >> + </object> > >> + <packing> > >> + <property > >> name="expand">True</property> > >> + <property > >> name="fill">True</property> > >> + <property > >> name="position">0</property> > >> + </packing> > >> + </child> > >> + <child> > >> <object class="GtkTable" > >> id="table15"> > >> <property > >> name="visible">True</property> > >> <property > >> name="can_focus">False</property> > >> @@ -2428,7 +2445,7 @@ I/O:</property> > >> <packing> > >> <property > >> name="expand">False</property> > >> <property > >> name="fill">True</property> > >> - <property > >> name="position">0</property> > >> + <property > >> name="position">1</property> > >> </packing> > >> </child> > >> <child> > >> @@ -2499,7 +2516,7 @@ I/O:</property> > >> <packing> > >> <property > >> name="expand">False</property> > >> <property > >> name="fill">True</property> > >> - <property > >> name="position">1</property> > >> + <property > >> name="position">2</property> > >> </packing> > >> </child> > >> </object> > > > > There are four modes we can let user choose: > > default(qemu64) > > custom > > host-model > > host-passthrough(cpu -host) > > > > Currently, the virt-manager supports > > default mode(by default) > > custom(choose from a ComboBox) > > host-model(Copy host CPU configuration Button) > > > > My idea is to use ComboBox which gives a list of these four modes, > > if the custom mode is selected, > > then, the model and feature is activated next, guiding user to > > choose cpu model and features. > > Or, the RadioButton is also an idea, but I prefer the ComboBox. > > > > By the way, for the CheckButton in this patch, I found the UI become > > not very smooth, can you do > > a little modification to make it perfect, although it look perfect > > in glade-3. > > > > So here I'm not sure we even want host-passthrough in the virt-manager UI. I > know it's valuable and useful, but there's the problem that libvirt 'taints' > the VM when you set this flag. This doesn't really have any functional effect, > but it basically means that libvirt devs consider this option to be not all > that supportable. Yes. But what if user knows the risk and just want the option? We can explicitly state that this option may not be well supported. > Exposing it in the UI seems like going against libvirt's wishes. libvirt supports it in xml, so I don't think this is a problem. > > It's also quite hard to explain host-model vs host-passthrough to an end user. > We could just throw them in a combo box, but I guarantee it will have people > asking over and over what the difference between host-model and > host-passthrough is. > > I'm fine with allowing this via virt-install though. > > I'm not sure what the end result UI should be here. If we use host-model when > libvirt is new enough, the current UI doesn't quite fit, because we don't know > what libvirt cpu model and feature flags we are going to get until we define > the VM, so hitting the 'copy' button won't update the UI. I guess we could > change it to a checkbox. > > Also, I don't know if host-model allows add/removing extra CPU flags, so if > host-model is selected, we might want to disable the feature list and model > drop down to make it clear they aren't editable. They should still be viewable > though so users can see the exact configuration. > > - Cole _______________________________________________ virt-tools-list mailing list virt-tools-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/virt-tools-list