Virtual Machine or Dual Boot? - Page 1
Forum section: electronics / general

author: MatteoX
author_rank: Regular Contributor
timestamp: May 03, 2020, 11:20:50 pm
content: I was given an HP ZBook G3 laptop for free. The machine was decommissioned and has HD removed but it has 16 GB RAM. It has 2 slots for PCIe M.2 SSDs and another one for 2.5" HDD. I'll get an M.2 drive (most likely a 500 GB Samsung EVO 970) and maybe later a bigger 2.5" HD.I am planning to install Ubuntu and Windows 10. Some software I need runs only on Windows, so I don't have a choice. Usage between the operating systems will be pretty much balanced (maybe 60% Windows, 40% Linux)How do you guys configure your dual OS computers? Should I go with dual boot or virtual machine? Dual boot will be faster but VM is more convenient to switch. If I decide to use VM would it be better (re. performance ) to install Windows 10 and run Linux as VM or vice versa?

author: ajb
author_rank: Super Contributor
timestamp: May 03, 2020, 11:33:08 pm
content: First consideration is whether the software you want to run will work adequately under virtualization. I suspect windows applications are more likely to be picky about that than Linux applications, but it depends a lot on the specific software. You may just have to try it and see. If you have software that talks to specific USB hardware that may be a deal breaker.

author: MatteoX
author_rank: Regular Contributor
timestamp: May 03, 2020, 11:57:00 pm
content: Quote from: ajb on May 03, 2020, 11:33:08 pmYou are right. I completely forgot about USB and drivers for nonstandard/special hardware.I used Linux just for development (mainly in c and c++) and run it as a VM on Windows without problems but didn't run any special USB drivers under it.

author: bill_c
author_rank: Regular Contributor
timestamp: May 04, 2020, 01:32:24 am
content: I run windowz as guest OS on several machines and never had problems with any USB devices. I did have problems trying to use a special PCI card but was too lazy to see if it was possible to solve. Many games don't like virtual graphics.If you only spend large chunks of time on an OS before switching to the other, then dual boot. if you switch between them often during testing stuff then VM is better but guest will be slightly slower. You can drag and drop files between host and guest, may not be as easy with dual boot.

author: greenpossum
author_rank: Frequent Contributor
timestamp: May 04, 2020, 01:44:40 am
content: I run Windows XP in a VM to drive a TL866 programmer using USB forwarding. Works a treat. Yes I know about the TL866 CLI tools. Have also forwarded things like WiFi dongles and upgraded the firmware of a DVD drive on the host using a Windows guest.

author: MatteoX
author_rank: Regular Contributor
timestamp: May 04, 2020, 01:48:40 am
content: Quote from: bill_c on May 04, 2020, 01:32:24 amI forgot to mention that I don't play computer games.The problem is even if I spend considerable amount of time in one OS, I need to access the second one quite often - even for the short period of time. It can become very annoying with dual boot. The other option is to have two separate systems (I have enough computers lying around) but then I need to use a KVM switch. When I looked at them a while ago, they didn't support higher resolution graphics (4K)

author: NiHaoMike
author_rank: Super Contributor
timestamp: May 04, 2020, 01:58:33 am
content: Quote from: MatteoX on May 04, 2020, 01:48:40 am4K HDMI switches are very common, as are USB switches. It shouldn't be too difficult to link the two together.

author: themadhippy
author_rank: Super Contributor
timestamp: May 04, 2020, 02:32:59 am
content: Do both,its what ive done,although i cant recall the last time i actually booted windows,even the virtual machine is getting used less as wine gets betterQuoteset up a separate partition on the hard drive and make it available to the operating systems and virtual machines

author: profanum429
author_rank: Regular Contributor
timestamp: May 04, 2020, 02:46:55 am
content: I run Windows 10 as my main OS on my desktop and OS X on my Macbook; I have a common Windows 10 VM that I have on both machines; I like to keep my development segregated from the primary OS; no real reason other than I like the containerization it provides. I've only had some hiccups before with some USB stuff (mainly things like a ULINKpro tracing JTAG programmer in an old version of Vmware. These days everything seems to work just fine, including pretty demanding stuff like streaming trace with a SEGGER J-Trace Pro. I also keep a Linux VM around that runs anything I need to do on that; never had any issues with it.PCI cards would be a different issue, but USB stuff seems to work pretty well for me. For PCI stuff you might be looking at running Linux and doing PCI passthrough (VFIO stuff). I've played around with it, basically giving my graphics card to the VM and you do get basically native performance in a VM, it's pretty neat.This is all through Vmware Workstation in Windows and Fusion on OS X.

author: Rick Law
author_rank: Super Contributor
timestamp: May 04, 2020, 02:54:14 am
content: Personally, I think dual boot and VM are entirely different animal.In dual boot, you are running the exact target system without any layers in between the OS and the hardware. A dual-booted OS should have absolutely no difference with the uni-booted counter part.Whereas, a VM is an application on your physical machine to emulate a different machine. The VM application creates and manages this pretend machine to run another OS on this machine. Anything your VM residing "client" OS needs, it asks the pretend machine that is your application and your application in turn gives it to your VM residing "client" OS. So, your VM application is the added layer, the middle man. A well designed/implemented VM of course will have no ill side effect for its clients and the client doesn't need to know it is running on a pretend machine. But we here all know that nothing is perfect, so some side effect will exist - at the very least, it will be slower. You client OS is but one of the many other applications that your host machine may be running.In that manner, I don't think they are even choices on the same par. One merely allow you to select what to start: start A or start B. The other is A pretending to be B, or pretending to be C, while at the same time still doing whatever A is doing.That said, from what I recall reading, almost all Intel CPU these days use some form of micro-code. So, the CPU we see is really itself a virtual machine... Just like people. You never know if they are for real...

author: MatteoX
author_rank: Regular Contributor
timestamp: May 04, 2020, 03:36:58 am
content: Quote from: NiHaoMike on May 04, 2020, 01:58:33 amIndeed. When I looked a while ago, 4K @60Hz switches were not available or were very expensive. I just did a quick search, they are now available for roughly $100. Any recommendations?

author: Masa
author_rank: Contributor
timestamp: May 04, 2020, 03:46:19 am
content: Quote from: MatteoX on May 04, 2020, 01:48:40 amRemote desktop is one option with multiple computers.In that case, the other computer just needs a network connection.

author: Masa
author_rank: Contributor
timestamp: May 04, 2020, 04:03:53 am
content: Quote from: Rick Law on May 04, 2020, 02:54:14 amActually VM's are much more powerful nowadays than pure software virtualization in the past, because there is hardware support for it in the modern processors.https://en.wikipedia.org/wiki/X86_virtualizationhttps://en.wikipedia.org/wiki/Hardware-assisted_virtualization

author: 0culus
author_rank: Super Contributor
timestamp: May 04, 2020, 04:49:30 am
content: I'd give virtualization a try. I daily drive Macs (and my work desktop is a trashcan Mac Pro), but I use Vmware Fusion (macOS equivalent of Workstation on the PC side) both at home (it's really not that expensive) and at work (paid for by work) and I love it. I can have multiple different Linux machines configured for different things and on reasonably modern hardware they run very well. Snapshots are super useful too...if you blow something up you can just go back to your last snapshot. Or rebuild the VM. A heck of a lot easier than fiddling around with a dual boot setup where Windows decided to destroy the Linux partition (happened to me).Vmware is also a *lot* more reliable for USB and such in my experience vs. Virtualbox. Case in point, trying to get Vivado to communicate with my FPGA boards when I was doing my MS was...impossible. It worked out of the box with Fusion (incidentally this frustration is what pushed me to forking over for Vmware). And with VM guest integration properly set up, it's seamless with no rebooting.

author: 0db
author_rank: Frequent Contributor
timestamp: May 04, 2020, 10:04:36 am
content: Quote from: 0culus on May 04, 2020, 04:49:30 amJust bought a Mac, that's what I am going to try. Thanks for the feedback.

author: Bicurico
author_rank: Super Contributor
timestamp: May 04, 2020, 10:22:53 am
content: Hi,First off, congratulations for such a great free laptop!The HP Z-Series are workstations which are normally meant for commercial CAD/CAM/CAE applications using Windows.In my opinion these machines were NOT designed to run Linux and you won't take full advantage of its capabilities under this OS. I don't know what graphics board is fitted, but it might be an nVidia Quadro. I doubt it will work with full 3D accelartion on Linux, but then again, are there any 3D applications on Linux in the first place?I would definetly install Windows as the single OS and then use Linux within VirtualBox. This will give you access to whatever applications you want to run on Linux, while not giving you all the dual-boot pain and risks (it is easy to screw up Grub and not so easy to get rid of it).You can pass USB devices to virtual machines with pretty good support, even USB-3.0 devices work mostly.And you won't have to struggle with uncommon drivers for Linux.And no, I have nothing against Linux - I used it myself when needed. But why take a laptop designed to run Windows based commercial CAD/CAM/CAE applications and run it with native Linux?Regards,Vitor

author: Rick Law
author_rank: Super Contributor
timestamp: May 04, 2020, 07:43:02 pm
content: Quote from: Masa on May 04, 2020, 04:03:53 amI understand that VM technology has improved. CICS partitioning is over 1/2 century old, so improvement with the virtualization concept is to be expected. It is not like running Double DOS anymore. I agree.Hypervisor types hardware-driven virtualization is not exactly new either - around decade old now. But regardless of age, it is still at least two extra layers (your OS, your VM app) between the hardware and the OS. Present-day processing speed may make the extra processing delay less visible, but additional layers will always introduce additional uncertainty. More you add, more to fail -- that, in my opinion, is facts of life and can't be avoided.If one is using production software, one can reasonably expect that everything would work. If one is developing software, one can never be sure where odd failures came from. So adding a layer in between merely adds more potential points of failure to track down.

author: NiHaoMike
author_rank: Super Contributor
timestamp: May 05, 2020, 01:01:23 am
content: Quote from: MatteoX on May 04, 2020, 03:36:58 amJust search "4k hdmi switch" and there are lots of cheaper switches out there, some around $20. Read the reviews to get an idea of which ones are good.Quote from: Bicurico on May 04, 2020, 10:22:53 amNvidia works great on Linux if you install the official driver. The open source "Nouveau" driver is better used for GPUs that are no longer supported by the latest driver.

author: brucehoult
author_rank: Super Contributor
timestamp: May 05, 2020, 02:18:23 am
content: It depends what you're doing on each OS.I use Linux and MacOS as my main OSes (on different machines) and run a Windows VM only to deal with people who want to collaborate on MS Office documents and wacky corporate software and/or web sites that work only with IE. VirtualBox is perfectly fine for that and in fact I've been fine so far running Windows 7 in it.

author: MatteoX
author_rank: Regular Contributor
timestamp: May 05, 2020, 02:46:36 am
content: Quote from: Bicurico on May 04, 2020, 10:22:53 amIt has an Nvidia video card but I don't know which one yet. It needs some disassembly to access it and I was lazy. I don't have have M.2 SSD yet, delivery is in about 10 days for the model I want. Maybe I'll grab sth else.Most likely I will not run any apps on Linux that will need 3D acceleration. Most of my CAD stuff is under Windows (Orcad, Spice, FPGA,...)QuoteAs you suggested, I'll probably start with Windows and run Linux under virtual machine. I have used Virtual Box but I don't have any experience with the free VMWare version (Workstation Player). Although I am not planning of buying VmWare Workstation Pro I quickly compared with the Player and I don't see that Player is missing anything crucial for basic use.Which one has better support for special external hardware?

author: MatteoX
author_rank: Regular Contributor
timestamp: May 05, 2020, 02:56:15 am
content: Quote from: brucehoult on May 05, 2020, 02:18:23 amI run Orcad/ Xilinx tools/ Spice/ and some other stuff under windows. Also MS Office (I know, I could use something under Linux but there are always some compatibility issues with Office, especially when working with other people). So most likely I'll be spending 50% - 60% time in Windows.Any comparison VirtualBox vs VMWare Player?

author: MatteoX
author_rank: Regular Contributor
timestamp: May 05, 2020, 03:29:26 am
content: Quote from: NiHaoMike on May 05, 2020, 01:01:23 amI did a very quick search - I need to do more research. I would rather not spend $100 if I don't have to. I'll probably start with Windows and run Linux in a VM.

author: Ian.M
author_rank: Super Contributor
timestamp: May 05, 2020, 11:12:07 am
content: This looks like its worth a look:https://www.makeuseof.com/tag/linux-desktop-windows-subsystem/(GUI Linux X applications and even an X desktop under Windows Subsystem for Linux)Even if it doesn't meet *ALL* your Linux needs, it should be possible to keep selected Linux and windows applications and their data on other (OS specific) partitions, and dual boot between Win 10 + WSL, and Linux + WINE, sharing the applications and data.

author: rstofer
author_rank: Super Contributor
timestamp: May 05, 2020, 02:29:15 pm
content: On my relatively high end desktop, I dual boot. Yes, it would be a PITA if I had to do it often, but I don't.On my laptop with Win 10, I have installed the Win10 version of Ubuntu with the bash shell. It does not support a linux desktop but all of the command line stuff works.https://itsfoss.com/install-bash-on-windows/I have never even thought about drivers and such. I just don't tend to have a lot of USB gadgets that I care to run under this shell.So, I'm playing with Raspbian on a Raspberry Pi and it seems important to run the desktop from my iPad while I'm watching TV in the media room. VNC works really well. I get the full desktop and all that that implies. I can open a shell, edit and compile code, whatever. I can even pull up Chrome and wander the Internet. VNC is very nice and it's really easy to implement. Raspi-config to turn on VNC (might as well turn on SSH if it isn't already) and you're good to go. Now download a VNC client for your remote platform and everything just works.Not that it's particularly useful but I can make a VNC connection from my cell phone. Somehow, the 27" monitor and real keyboard seems more workable.

author: Wuerstchenhund
author_rank: Super Contributor
timestamp: May 09, 2020, 11:52:34 am
content: Quote from: Bicurico on May 04, 2020, 10:22:53 amThat's not true.Both zBook G3 and zBook G3 Studio are certified for and fully supported under Red Hat Linux:https://www8.hp.com/h20195/v2/getpdf.aspx/c04832209.pdfhttps://www8.hp.com/h20195/v2/getpdf.aspx/c04832209.pdfIn fact, all the various HP z-Series workstations are certified for Red Hat Linux, and often also for SLED.We have various zBook 15/17 G3 on RHEL and also SLED (even though the latter is unsupported).QuoteMost of our G3 zBooks come with the optional Quadro M2000M (15") or M4000M (17"), although we have a small number of 15"G3 which only have the standard intel HD graphics. The Nvidia ones work fine with the Nvidia drivers, provided the Nvidia is set to be the primary card (no swapping between intel and Nvidia) in the BIOS.The intel graphics works out of the box through the open source drivers included in Linux.QuoteI agree, I wouldn't bother dual booting. However, I would probably run Linux natively (my recommendation would be to stick with something reliable such as openSUSE) and run Windows inside KVM. But at the end of the day the host OS should be the one that will see most use.QuoteAs I said, zBooks are not "designed to run Windows" (whatever that means, as Linux doesn't exactly require a completely different hardware architecture), and while you find them in CAD/CAM/CAE, z-Series workstations are actually predominant on other fields, like in the big movie studios. It's way more than a line aimed at CAD (which, in general, is actually, is pretty low on performance requirements)

author: TomS_
author_rank: Frequent Contributor
timestamp: May 10, 2020, 09:02:01 am
content: Quote from: MatteoX on May 04, 2020, 01:48:40 amThis is about the reason why I gave up on dual boot. It seems much more productive for me to run my secondary OS as a VM. Usually some flavor of Windows along side MacOS.Usually I'm only using one or two applications in the other OS, perhaps along side applications running in the primary OS, and having access to both at the same time is worth what ever performance penalty there might be.

author: Halcyon
author_rank: Unknown
timestamp: May 11, 2020, 02:59:06 am
content: For the most part, I prefer virtualisation. It makes backing up your core image and reverting back to a known clean version very simple.

author: MatteoX
author_rank: Regular Contributor
timestamp: May 11, 2020, 03:33:19 am
content: How much performance do you loose by running Linux under VM? I have some numerically pretty intensive stuff.Any general preference between VirtualBox and free VMWare Player? Compatibility with special hardware, speed ...?

author: brucehoult
author_rank: Super Contributor
timestamp: May 11, 2020, 04:22:59 am
content: Computationally intensive shouldn't see any slowdown at all. What can be slower is I/O, especially graphics. Any hit on disk or network I/O is usually very small.

author: BravoV
author_rank: Super Contributor
timestamp: May 11, 2020, 04:32:57 am
content: Quote from: brucehoult on May 11, 2020, 04:22:59 amEspecially for graphics, in VM environment, the so called (cmiiw) IOMMU or GPU Pass through have been quite heavily exploited for years.Just an example video out of so many out there, fyi, the video is dated back to 2017, he run Windows graphic heavy intensive game, under Linux host with almost at native speed.

author: chriva
author_rank: Regular Contributor
timestamp: May 11, 2020, 04:36:20 am
content: Computional performance is pretty much identical between a native os and a virtualized one these days.USB devices have never given me a grief in vmware workstation and virtualbox has worked flawlessly for the last two years or so.I'd try to run Linux as the Virtualized OS tho since modern versions of windows are quite dependand on 3d acceleration for the gui, something that on the other hand _IS_ very nerfed in virtual machines. Virtualbox in particular have very thrashy 3d support so go workstation if you really want Windows to be the virtual one.GPU passthrough has iffy support at best so if you intend to do cuda/opencl or play games on either one of the OS's, that OS should be the primary one.Lastly: Linux SUCKS for entertainment, lacks hardware decoding for most video formats and rarely has full support for the more advanced power saving features. Mostly because hw manufacturers are assholes so I'd really suggest you use Windows as the native one if you have any intention of using it for entertainment on the go.Dualboot is just a waste of your time if you ask me so it's not even a question

author: fourtytwo42
author_rank: Super Contributor
timestamp: May 13, 2020, 07:27:22 pm
content: Hmm maybe I look at this a different way, I transitioned to Lubuntu several years ago as my primary platform BUT I find WINE has many problems that means dual boot is still an unfortunate necessity, for exampleMicrosoft word does not run properly under wine, particularly at page boundaries it gets completely confusedMicrosoft Excell also suffer annoyinglyLTspice simply does not work properly, quite a few calculations go awryMPLAB 8x cannot access USB devices in fact USB support under wine generally for non-generic drivers is a fiascoAs an engineer I am sensitive to such things and for me dual boot remains a necessity, there are many other compatibility issues too numerous to mentionSo my short answer to the OP is by all means use translators such as wine but retain a dual boot capability for all the important stuff the translators cannot handle.

author: brucehoult
author_rank: Super Contributor
timestamp: May 14, 2020, 12:53:22 am
content: Quote from: fourtytwo42 on May 13, 2020, 07:27:22 pmA virtual machine, such as VirtualBox, is completely different to a mere API converter such as WINE.WINE tries to provide API libraries which are compatible with code in Windows.VirtualBox runs an actual copy of Windows, and emulates generic PC hardware, which is a much more well-defined and simpler task.

author: NiHaoMike
author_rank: Super Contributor
timestamp: May 14, 2020, 03:48:56 am
content: Quote from: chriva on May 11, 2020, 04:36:20 amNot true nowadays.https://wiki.archlinux.org/index.php/Hardware_video_acceleration#Comparison_tablesBTW, it's trivial to get bit perfect audio on Linux if you disable Pulseaudio.

author: chriva
author_rank: Regular Contributor
timestamp: May 14, 2020, 09:31:44 am
content: I see many modern codecs that are not supported on that list...

author: NiHaoMike
author_rank: Super Contributor
timestamp: May 14, 2020, 11:44:15 pm
content: Quote from: chriva on May 14, 2020, 09:31:44 amLike what? I see MPEG 4 ("classic" and AVC/H.264), H.265/HEVC, VP8, VP9, and even VC-1 (WMV) in the list.

author: jmelson
author_rank: Super Contributor
timestamp: May 15, 2020, 12:25:11 am
content: Quote from: ajb on May 03, 2020, 11:33:08 pmI run Linux as my main OS. I have used virtual Windows environments for many years, first with VMWare, now with VirtualBox. These work very well, and allow me to switch back and forth, or even have programs from both environments on the desktop at the same time.I run Protel 99SE for electronic CAD and a tax perparation program every year in the virtual envoronment. They run fine, in fact even better than on real hardware.The only program I have ever had a problem with was a Garmin program to download new GPS data to a GPS device. It would not run on a virtual environment with a specific message to that effect.Jon