Kitz ADSL Broadband Information
adsl spacer  
Support this site
Home Broadband ISPs Tech Routers Wiki Forum
 
     
   Compare ISP   Rate your ISP
   Glossary   Glossary
 
Please login or register.

Login with username, password and session length
Advanced search  

News:

Author Topic: Query About VMs  (Read 8196 times)

Weaver

  • Senior Kitizen
  • ******
  • Posts: 11459
  • Retd s/w dev; A&A; 4x7km ADSL2 lines; Firebrick
Query About VMs
« on: October 29, 2019, 01:54:22 AM »

[This topic has been created by splitting off the following posts from leonroy's High packet loss and occasional disconnection under load thread.

Maybe it's time for a new pfSense install.

I run a virtual instance, it's been faultless.

Apologies for straying off topic - a random question about your VM and major software components - can your software setup make use of paravirtualization ?
« Last Edit: October 29, 2019, 07:51:32 PM by burakkucat »
Logged

dee.jay

  • ISP Rep
  • Reg Member
  • *
  • Posts: 953
Re: Query About VMs
« Reply #1 on: October 29, 2019, 07:50:35 AM »

I don't believe so no - paravirtualization was no longer supported by ESX 5 upwards because of Intel VT and AMD VT technologies, which apparently are a lot faster.

Logged
Starlink and AAISP L2TP combo routed by opnSense on proxmox

Chrysalis

  • Content Team
  • Addicted Kitizen
  • *
  • Posts: 7382
  • VM Gig1 - AAISP L2TP
Re: Query About VMs
« Reply #2 on: October 29, 2019, 06:32:29 PM »

I always thought of paravirtualisation been modified kernel/drivers that dont fully emulate but instead are cut down specifically designed for a virtual environment, and in that respect it is still around e.g. vmx network drivers.  As emulating full hardware is expensive.

But maybe I am wrong and it isnt that. :)

actually seems I am right.

https://docs.vmware.com/en/VMware-vCloud-NFV-OpenStack-Edition/3.0/vmwa-vcloud-nfv30-performance-tunning/GUID-E2271E36-12BB-47CE-A765-5ECB5BBE7CC7.html

I think if you have hardware cpu virtualisation, then its probably fair to call it partial paravirtualization, as the hardware is usually just limited to the cpu and memory subsystem but rest of kit still has to be emulated, like graphics, i/o and networking.

If you have vt-d support you can also directly passthru hardware like i/o cards and gpu's.
« Last Edit: October 29, 2019, 06:34:53 PM by Chrysalis »
Logged

dee.jay

  • ISP Rep
  • Reg Member
  • *
  • Posts: 953
Re: Query About VMs
« Reply #3 on: October 29, 2019, 07:53:35 PM »

Ah yes, VT-d. I use that to passthrough the onboard SAS controller through to a FreeNAS VM.

You can get pretty crazy with VT-d if devices can support it. Probably the favourite thing I've done was to passthrough an nVidia GTX680 to a Windows VM with the machine itself running Arch Linux.

https://www.youtube.com/watch?v=YRFO942RLNE

^^ That's me. Old video, apparently that was 4 years ago I did that. Should try it on my more modern desktop.
« Last Edit: October 29, 2019, 08:00:35 PM by dee.jay »
Logged
Starlink and AAISP L2TP combo routed by opnSense on proxmox

Chrysalis

  • Content Team
  • Addicted Kitizen
  • *
  • Posts: 7382
  • VM Gig1 - AAISP L2TP
Re: Query About VMs
« Reply #4 on: October 29, 2019, 11:02:24 PM »

one of the reasons I am migrating away from esxi is you wouldnt be able to do that on consumer nvidia hardware as an artificial block in the drivers to make you buy quadro cards :p, but no problem with proxmox, qemu etc.
Logged

Weaver

  • Senior Kitizen
  • ******
  • Posts: 11459
  • Retd s/w dev; A&A; 4x7km ADSL2 lines; Firebrick
Re: Query About VMs
« Reply #5 on: October 30, 2019, 01:02:06 AM »

Yes, to @chyrs, basically. Paravirtualisation is where you run a special o/s or driver or app code which contains well-known secret handshake codes which are a hint for the VM to tell it to do something. It’s a very very high performance way of cheating, by giving hints to the VM that you wish for some operation to be done but you don’t have to emulate the hardware needed to carry it out, and I say cheating because full emulation including all the hardware is not necessarilly being done by the VM at all. It’s like the equivalent of adding a new instruction to the CPU’s instruction set, not to imply that that is literally the method used, but can be implemented by any distinctive hint sequence that the VM can recognise and which will not happen accidentally in existing code. If you provide paravirtualisation-aware drivers then several different similar operating systems could be used.
Logged

dee.jay

  • ISP Rep
  • Reg Member
  • *
  • Posts: 953
Re: Query About VMs
« Reply #6 on: October 30, 2019, 07:54:12 AM »

one of the reasons I am migrating away from esxi is you wouldnt be able to do that on consumer nvidia hardware as an artificial block in the drivers to make you buy quadro cards :p, but no problem with proxmox, qemu etc.

Yeah that is very true. I believe you can flash BIOS'es to consumer cards, but I don't know if that is still a valid exercise these days.

For a desktop it works fine with QEMU etc as you say.
Logged
Starlink and AAISP L2TP combo routed by opnSense on proxmox

niemand

  • Kitizen
  • ****
  • Posts: 1836
Re: Query About VMs
« Reply #7 on: November 07, 2019, 08:52:52 AM »

https://www.unixarena.com/2017/12/para-virtualization-full-virtualization-hardware-assisted-virtualization.html/ is a nice summary.

Guest OSes make calls to the hypervisor via APIs so it doesn't have to emulate everything - a microkernel sits on top of the hardware handling these calls.

There are also hybrids that not only use PV via the OS but also make calls directly to the device drivers the hypervisor would use. Hardware assistance as VMWare ESXi uses, where hypervisor spends much of its time sanitising then feeding directly to bare metal, plus PV calls that go entirely around the OS alleviating the need for the hypervisor to sanitise and handle edge case instructions and use the device drivers the hypervisor has installed as modules.

I'm most familiar with ESXi and, as a lot of what it does is close to bare metal, it can be pretty performant. Obviously certain instructions and sequences are trapped by it as they can't be handled by its normal operation and have to be emulated.

It's a fascinating technology overall and, like many other technologies, one that's becoming less of a concern as we increasingly run our applications on other people's computers.
Logged

Weaver

  • Senior Kitizen
  • ******
  • Posts: 11459
  • Retd s/w dev; A&A; 4x7km ADSL2 lines; Firebrick
Re: Query About VMs
« Reply #8 on: November 10, 2019, 05:50:47 AM »

Off topic: I wonder if someone could start trapping all unrecognised instructions and then handling them in software in cases where the processor is too old to know more recent instructions. I remember a runtime for a dos C compiler (JPI C) that would detect the presence of absence of an 8087 or the equivalent internal h/w floating point in a later processor and it would then patch code in the code segment of the loaded image so that 80x87 FP instructions would be changed to calls or jumps or traps/software interrupt instructions I forget which, anyway something that was short enough to fit in the byte length of the instruction (although I suppose you could in extremis put in a short jump and overwrite following instructions too, copying affected bytes to a short jump-off area somewhere provided that the instructions were relocatable [!!]). The chosen patch was short enough so that it could fit with no trouble anyway.

This was such a well thought out idea because it gave 100% full speed to modern processors and old processors did what they could, with the solution being about as good as anything could be, provided that the method chosen for the call-return patch code, be it an int instruction or a call or whatever, was as fast as possible to keep the overhead down.
Logged

dee.jay

  • ISP Rep
  • Reg Member
  • *
  • Posts: 953
Re: Query About VMs
« Reply #9 on: November 11, 2019, 08:13:33 PM »

I am pretty sure that ESX will only expose to the VM the instruction set that is available from the physical CPU.

It is important to keep CPU families the same when dealing with a vCenter environment, where VM's move across blades and such. If a VM moves to a blade with a newer instruction set CPU - it cannot then move back. (Note, when dealing with a large deployment of multiple ESX servers on shared storage, VM's will move around all day long in order to balance out the demand on CPU and memory.)

So, if one were to run a VM and run an application that expected newer instructions, it would simply fail to run - as the VM would only receive the same instruction set as the underlying hardware beneath it.
Logged
Starlink and AAISP L2TP combo routed by opnSense on proxmox

niemand

  • Kitizen
  • ****
  • Posts: 1836
Re: Query About VMs
« Reply #10 on: November 16, 2019, 11:46:32 PM »

Absolutely. VMs that are allowed to be vMotioned like that haven't a clue they have moved. They are snapshot and moved to a new LUN / volume. The VM is running with the same settings it was when originally powered on.
Logged

Chrysalis

  • Content Team
  • Addicted Kitizen
  • *
  • Posts: 7382
  • VM Gig1 - AAISP L2TP
Re: Query About VMs
« Reply #11 on: November 17, 2019, 08:38:09 AM »

When I updated my ESXi rig, the machine changed from intel i5 750 to AMD 2600X, different vendor and a much different era of hardware.  In terms of migrating VM's it was like as Carl said, as if there was no hardware swap at all, the reason been that the emulated kit is still the same, the only change was the cpu really.  Both AMD and Intel chips are x86_64 chips so share same cpu drivers.  It's only the cpu scheduling that differs between the two.
Logged

niemand

  • Kitizen
  • ****
  • Posts: 1836
Re: Query About VMs
« Reply #12 on: November 17, 2019, 06:28:41 PM »

Should mention that in the case of ESXi at least an awful lot of what it does is just sending instructions straight to the physical CPUs. There are key instructions it will trap and handle in different ways but a full-on CPU emulator it is not. It takes advantage of  VMMs much as a bunch of other full virtualisation options do.

I can't say I've had much exposure to paravirtualisation and I'm fine with that. Ideally hypervisor and hardware should take care of everything.
Logged
 

anything