Nikola K. Zahariev
2009-Jun-09 09:25 UTC
[Xen-users] Switch Hardware Virtualization On/Off
Hello! I have a newbie question regarding the hardware virtualization in XEN. When is actually hardware virtualization being used? If we assume the CPU supports HV, does XEN use it by default? Is there a possibility to switch it off, so that paravirtualization is used? How can I check if I am currently using HV or PV? Thanks in advance! Best regards, Nikola _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Fajar A. Nugraha
2009-Jun-09 09:38 UTC
Re: [Xen-users] Switch Hardware Virtualization On/Off
On Tue, Jun 9, 2009 at 4:25 PM, Nikola K. Zahariev<nirangor@gmail.com> wrote:> When is actually hardware virtualization being used?When you use HVM guest.> If we assume the CPU supports HV, does XEN use it by default?Xen tries to use it when you create HVM guest. If it''s not available, domU creation failed.> Is there a possibility to switch it off, so that paravirtualization is used?Use PV guest.> How can I check if I am currently using HV or PV?Check what type of domU you''re using. It''s easiest to see from dom0 (by looking at domU config or xenstore). There are also files/folder specific to PV domU (for example, on linux PV domU "cat /sys/hypervisor/type" should return "xen"). Or you could look at this : http://lxr.xensource.com/lxr/source/tools/misc/xen-detect.c -- Fajar _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Nikola K. Zahariev
2009-Jun-09 09:49 UTC
Re: [Xen-users] Switch Hardware Virtualization On/Off
Thanks for the quick answer! How do I create the HVM guest? By including the following line in the config file: builder=''hvm'' ? And when I want to use PV I just drop it away? Thanks! br, Nikola On Tue, Jun 9, 2009 at 11:38 AM, Fajar A. Nugraha<fajar@fajar.net> wrote:> On Tue, Jun 9, 2009 at 4:25 PM, Nikola K. Zahariev<nirangor@gmail.com> wrote: >> When is actually hardware virtualization being used? > > When you use HVM guest. > >> If we assume the CPU supports HV, does XEN use it by default? > > Xen tries to use it when you create HVM guest. If it''s not available, > domU creation failed. > >> Is there a possibility to switch it off, so that paravirtualization is used? > > Use PV guest. > >> How can I check if I am currently using HV or PV? > > Check what type of domU you''re using. It''s easiest to see from dom0 > (by looking at domU config or xenstore). > There are also files/folder specific to PV domU (for example, on linux > PV domU "cat /sys/hypervisor/type" should return "xen"). Or you could > look at this : http://lxr.xensource.com/lxr/source/tools/misc/xen-detect.c > > -- > Fajar >_______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Fajar A. Nugraha
2009-Jun-09 10:00 UTC
Re: [Xen-users] Switch Hardware Virtualization On/Off
On Tue, Jun 9, 2009 at 4:49 PM, Nikola K. Zahariev<nirangor@gmail.com> wrote:> Thanks for the quick answer! > > How do I create the HVM guest? > > By including the following line in the config file: builder=''hvm'' ?Take a look at various /etc/xen/xmexample* For simple HVM guest, I use this (x86_64 domU) device_model = ''/usr/lib64/xen/bin/qemu-dm'' kernel = "/usr/lib/xen/boot/hvmloader" builder=''hvm'' sdl=0 vnc=1 acpi=1 boot="dc" usbdevice=''tablet''> > And when I want to use PV I just drop it away?I use these instead (pygrub-booted PV with vnc vfb) bootloader="/usr/bin/pygrub" vfb =[''type=vnc''] CPU, memory, disk, and NIC definition is the same for HVM and PV. -- Fajar _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
I think you''re talking about two different technologies, here. The CPU support for Virtualization Technology (VT) should be turned on and left on. There''s absolutely no reason to turn it off - it must be on for you to run an HVM domU, anyway. I also don''t know of any adverse effects of turning on VT (or AMD''s matching technology). HVM = Hardware Virtual Machine, which requires VT and which completely emulates a full hardware set for the guest. Paravirtualization requires that a guest kernel be modified to support PV technology. When a PV kernel and/or drivers are present and installed correctly, they will always be used and always should be used. In the absence of PV support in a guest, HVM must be used. A guest can either run a PV kernel or a standard kernel. If it runs a PV kernel, it is a PV domU, if it runs a standard kernel, it must be run inside an HVM domU. If you''re running an O/S that has a PV kernel available (Linux, BSD, Solaris), you should probably use a PV domU, although there may be certain situations where this is not desirable. This gets even a little more confusing because HVM domUs can have PV drivers that bypass some of the hardware emulation to provide improved performance (e.g. the Windows GPL PV drivers by James Harper). If you have access to these drivers, you should probably use them - the performance improvement is generally pretty good, and there''s not usually a reason to use the standard ones. -Nick>>> On 2009/06/09 at 03:25, "Nikola K. Zahariev" <nirangor@gmail.com> wrote:Hello! I have a newbie question regarding the hardware virtualization in XEN. When is actually hardware virtualization being used? If we assume the CPU supports HV, does XEN use it by default? Is there a possibility to switch it off, so that paravirtualization is used? How can I check if I am currently using HV or PV? Thanks in advance! Best regards, Nikola -------- This e-mail may contain confidential and privileged material for the sole use of the intended recipient. If this email is not intended for you, or you are not responsible for the delivery of this message to the intended recipient, please note that this message may contain SEAKR Engineering (SEAKR) Privileged/Proprietary Information. In such a case, you are strictly prohibited from downloading, photocopying, distributing or otherwise using this message, its contents or attachments in any way. If you have received this message in error, please notify us immediately by replying to this e-mail and delete the message from your mailbox. Information contained in this message that does not relate to the business of SEAKR is neither endorsed by nor attributable to SEAKR. _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Fajar A. Nugraha
2009-Jun-09 13:35 UTC
Re: [Xen-users] Switch Hardware Virtualization On/Off
On Tue, Jun 9, 2009 at 7:30 PM, Nick Couchman<Nick.Couchman@seakr.com> wrote:> I think you''re talking about two different technologies, here. The CPU > support for Virtualization Technology (VT) should be turned on and left on. > There''s absolutely no reason to turn it offSome vendors seem to think otherwise, and ship servers with VT disabled by default. Probably due to something like http://www.securityfocus.com/columnists/451 , even if no real threat currently exist.> A guest can either > run a PV kernel or a standard kernel. If it runs a PV kernel, it is a PV > domU, if it runs a standard kernel, it must be run inside an HVM domU.Yeah, but the limit gets blurred with pv_ops kernel, where the same kernel can be used for both :) -- Fajar _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Yeah, never quite figured out why VT is off by default, but maybe those security concerns explain it. It''s one of the first things I enable since I need to run Xen + HVM. As far as the pv_ops kernels go, it seems like you still have to run those instead an HVM, and it just uses more PV code in the HVM. I haven''t been able to get a pv_ops kernel to boot as a PV domU. -Nick>>> On 2009/06/09 at 07:35, "Fajar A. Nugraha" <fajar@fajar.net> wrote:On Tue, Jun 9, 2009 at 7:30 PM, Nick Couchman<Nick.Couchman@seakr.com> wrote:> I think you''re talking about two different technologies, here. The CPU > support for Virtualization Technology (VT) should be turned on and left on. > There''s absolutely no reason to turn it offSome vendors seem to think otherwise, and ship servers with VT disabled by default. Probably due to something like http://www.securityfocus.com/columnists/451 , even if no real threat currently exist.> A guest can either > run a PV kernel or a standard kernel. If it runs a PV kernel, it is a PV > domU, if it runs a standard kernel, it must be run inside an HVM domU.Yeah, but the limit gets blurred with pv_ops kernel, where the same kernel can be used for both :) -- Fajar -------- This e-mail may contain confidential and privileged material for the sole use of the intended recipient. If this email is not intended for you, or you are not responsible for the delivery of this message to the intended recipient, please note that this message may contain SEAKR Engineering (SEAKR) Privileged/Proprietary Information. In such a case, you are strictly prohibited from downloading, photocopying, distributing or otherwise using this message, its contents or attachments in any way. If you have received this message in error, please notify us immediately by replying to this e-mail and delete the message from your mailbox. Information contained in this message that does not relate to the business of SEAKR is neither endorsed by nor attributable to SEAKR. _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Fajar A. Nugraha
2009-Jun-10 01:17 UTC
Re: [Xen-users] Switch Hardware Virtualization On/Off
On Wed, Jun 10, 2009 at 5:09 AM, Nick Couchman<Nick.Couchman@seakr.com> wrote:> Yeah, never quite figured out why VT is off by default, but maybe those > security concerns explain it. It''s one of the first things I enable since I > need to run Xen + HVM. > > As far as the pv_ops kernels go, it seems like you still have to run those > instead an HVM, and it just uses more PV code in the HVM. I haven''t been > able to get a pv_ops kernel to boot as a PV domU.You probably got the same problem that bit me : NX is off by default on my BIOS :) You need to turn it on to run pv_ops as PV guest. -- Fajar _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Thanks for the hint - I''ll look into that! -Nick>>> On 2009/06/09 at 19:17, "Fajar A. Nugraha" <fajar@fajar.net> wrote:On Wed, Jun 10, 2009 at 5:09 AM, Nick Couchman<Nick.Couchman@seakr.com> wrote:> Yeah, never quite figured out why VT is off by default, but maybe those > security concerns explain it. It''s one of the first things I enable since I > need to run Xen + HVM. > > As far as the pv_ops kernels go, it seems like you still have to run those > instead an HVM, and it just uses more PV code in the HVM. I haven''t been > able to get a pv_ops kernel to boot as a PV domU.You probably got the same problem that bit me : NX is off by default on my BIOS :) You need to turn it on to run pv_ops as PV guest. -- Fajar -------- This e-mail may contain confidential and privileged material for the sole use of the intended recipient. If this email is not intended for you, or you are not responsible for the delivery of this message to the intended recipient, please note that this message may contain SEAKR Engineering (SEAKR) Privileged/Proprietary Information. In such a case, you are strictly prohibited from downloading, photocopying, distributing or otherwise using this message, its contents or attachments in any way. If you have received this message in error, please notify us immediately by replying to this e-mail and delete the message from your mailbox. Information contained in this message that does not relate to the business of SEAKR is neither endorsed by nor attributable to SEAKR. _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users