Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
Volguus
Mar 3, 2009

chutwig posted:

Does anyone have experience with doing nested virtualization in Linux guests in VMware Workstation?

I have a Xenial guest in Workstation 12 that I use for multi-VM Vagrant environments, using both VirtualBox and KVM through libvirt. The nested VMs are very unstable; if they have multiple cores allocated it's a 100% guarantee that processes in them will segfault constantly. With only one core allocated, stability improves but is still not great. I have various Ansible playbooks and build scripts for building these environments, and it sucks when they constantly fall over and explode.

By way of comparison, the same multi-VM environments are totally stable non-nested. I've tested on VirtualBox on a Mac and also with KVM on a regular Linux server and everything is fine there. I would like to set up another nested virtualization test using VMware Fusion on a Mac but haven't had time to do so yet. My main incentives for getting the nested virt working are because the desktop workstation I have is much more powerful than my MBP and has a lot more memory, so I can build much bigger and more elaborate test environments (and I don't want to tie up a $20k server for my virt experiments when I can get them all done on a much cheaper workstation). However, it has to run Windows, so I can't put Linux right on the machine.

The title of the thread was supposed to be a joke. Or so I thought.

Adbot
ADBOT LOVES YOU

Volguus
Mar 3, 2009

DevNull posted:

I work on the monitor team at VMware and we run several machines dedicated to nested testing. Mostly ESX in ESX, but we have a few WS in ESX as well. It is slower, but we expect the same correctness.

You, I understand. You are supposed to test all kinds of wacky configurations your customers may have. It's the customers that I don't get :). But anyway, is VM in VM @ VMWare now supported? I tried it back in the early 2000s (2003 maybe?) when VMs were the new cool thing and VMWare workstation caught me trying to install it in an VMWare VM and basically refused to let me do it. Again, not that I would have had a need for it, but experimenting is fun.

Volguus
Mar 3, 2009

Boris Galerkin posted:

How do I do that? Wikipedia says Hyper-V is a Windows thing and I absolutely need a Linux host.

e: After reading about it I’m not sure if I absolutely need a Linux host. I do a lot of numerical/computational stuff, so it’s pretty much been Linux all the way down because I don’t want to recompile libraries/tools for different architectures, and also because all the computers I use are also Linux so it just makes everything easier.

But if I can run a Windows host with headless Fedora/Linux with zero performance hits while letting me develop MPI applications when I run them in the Linux VM then I guess that might work. But this also seems like a lot more work than asking if there were obvious settings that I could flip on/off to gain free performance for Excel, which I don’t even use for number crunching. I just want a lightweight Excel app, and LibreOffice is poo poo and Google Sheets and Office Excel Online are too slow.

You don't, Hyper-v is a windows thing. What could help you quite a bit would be if you would have a virtualization server that will have a windows guest. Now, that server can be linux with qemu+kvm or can be windows with Hyper-v, doesn't matter, the performance will most likely be better than running the machine locally.

Given the nature of your work, running the primary development machine in a VM would not even be a consideration.

Volguus
Mar 3, 2009

Potato Salad posted:

They can barely support their rdbms. Their erp is an eternally burning heap of fire so outpaced by modern commodity platforms that it's unthinkable that any entity that wasn't married to Oracle by 1998 would have a relationship with them today.

Why the gently caress would you use their os, nonetheless whatever the hell kind of tortorous nonsense they've done to kvm?

From personal experience, while I was doing some performance analysis on a big java application that was using Oracle backend, Oracle linux had the following advantages over RedHat (7.2 era):
  • Had all the appropriate flags set for installing Oracle DB on it. RH Ent usually needed a couple tweaks here and there. Nothing major, but ... yea.
  • Was 5% more performant than RH for the same workload on that application (which could be because of some kernel flag that was not set on RH).


And, oh, they were trying to sell me at the time (once per month) their live-kernel patching mechanism. Which is not even theirs. But hey, they sell it and probably support it.

Volguus
Mar 3, 2009

Yes. I don't think there's another one.

Volguus
Mar 3, 2009

Boris Galerkin posted:

I got Windows 10 running on a Linux (Fedora) host using the virt-manager GUI to set it all up. Storage is via virtio and I'm using a spice server for the graphics (I hope those are the right way of saying it).

Everything works kinda as expected but now I'm wondering what the best way to share some directories between the host and guest are. I've read one post on SO to set up a samba server but I've also seen other posts saying to just use "filesystem passthrough" or something like that. Thoughts?

Also, is there a way to get rid of the menu bar and title bar? I'm talking about in the host system itself. The bar that says "vmname on QEMU/KVM" and then the menu bar for this window below it. It's just taking up space.

In my personal opinion, the easiest way to go about is with samba. But, instead of setting up samba server on linux, tell windows to be the server. On windows you can do that easily with network share a folder and on linux you can access it by mounting it using the cifs filesystem.

Example mount command:
code:
mount -t cifs -o username=USERNAME,password=PASSWD //192.168.1.88/shares /mnt/share
This will make the windows files available on linux under the /mnt/share folder.

About the UI: on my system (using KDE) that "bar" is the title bar of the window. Look your DEs configuration if you can make that go away. The menu is not possible to make it go away, only the toolbar (under the View menu). They would go away though if you go full screen, but really they don't take that much space.

Volguus
Mar 3, 2009

Boris Galerkin posted:

I’m using gnome but I’ll look into it. I don’t wanna go full screen though, because the only reason I’m doing this is to be able to have Office 2016 look and feel like a “native app”. This current setup is working great because I can snap the entire VM window to the sides and make the window smaller/bigger etc. Inside the actual guest I have eg Excel maximized so I’m just treating the entire VM window like it wee just the Excel app. When I get some more time I’d like to see if I can add “multiple” displays to this so that I can trick Windows into thinking I have a second display that I can throw PowerPoint into.

The simplest window that I was able to get was from running qemu by itself:
code:
qemu-system-x86_64 -display sdl,frame=off,window_close=off -no-frame 
Of course, this needs a lot more options, like hard drive image, networking (if any) and so on to be usable, but this on my system shows the simplest window. KDE however does insist on decorations (title bar and close/min buttons) though I'm sure there's a setting to remove that somewhere. Try it out and see.

Volguus
Mar 3, 2009

Boris Galerkin posted:

Does that command mimic what happens when I start virt-manager and press "run"? Like I already have the VM created, can I just start up the VM with a script like that?

Yes, that's what virt manager does too ( well, maybe a bit more complicated) but qemu is what actually runs your VM.

Volguus
Mar 3, 2009

evol262 posted:

virt-manager is essentially a frontend to libvirt (like virsh).

The primary "value add" is that it can handle a bunch of finicky migration stuff, easy device passthrough (including to running VMs), managing block storage, CPU flags, et al. It's a lot more complicated, not a little.

qemu can do all of that, if you want to manage iscsi storage pools yourself and memorize 90001 flags, though

Sure, a lot more complicated ;). But if all he wants is that border-free VM, nothing more, then a few arguments on a shell script is not that crazy.

Volguus
Mar 3, 2009
You have two options here:

- Configure the guest network in bridge mode (so it will run on the same network as the host): https://wiki.libvirt.org/page/Networking#Bridged_networking_.28aka_.22shared_physical_device.22.29
- Configure port-forwarding for the NAT: https://aboullaite.me/kvm-qemo-forward-ports-with-iptables/ https://wiki.libvirt.org/page/Networking#NAT_forwarding_.28aka_.22virtual_networks.22.29

The windows samba ports are

quote:

The following ports are associated with file sharing and server message block (SMB) communications:

Microsoft file sharing SMB: User Datagram Protocol (UDP) ports from 135 through 139 and Transmission Control Protocol (TCP) ports from 135 through 139.
Direct-hosted SMB traffic without a network basic input/output system (NetBIOS): port 445 (TCP and UPD).

And, I think (not 100% n this one) that you need a password for the user, though it may be possible to convince windows to let you share without one, but is not straightforward. Also, don't forget, an admin user can use the default windows shares of the entire C drive, called: C$ (the name of the share). So, with an admin account you can mount //WINDOWSVM/C$


Oh, and another thing about the qemu parameters that libvirt passes: look at them and you don't need to set quite a few of them. Actually, most of them, for your purposes are useless. Don't need USB, don't need to set the accel=kvm, don't need -S and -object tls crap, monitoring, all kinds of devices. Removing that can shorten the list quite a bit. Or, just start the machine from virt manager like before and don't worry about it.

Volguus fucked around with this message at 15:58 on Mar 2, 2018

Volguus
Mar 3, 2009

anthonypants posted:

Set a password.

Can you access it if is NAT-ed without port forwarding?

Edit:
Now that I think about it, from the host you should be able to. So, forget about port forwarding if you don't need access from anywhere else

Volguus fucked around with this message at 20:33 on Mar 2, 2018

Volguus
Mar 3, 2009

Goonerousity posted:

This is exactly what I needed, thank you. I’ll stick to windows 10 and full screen virtual machines when I need to write c

Also is there a free version of VMware’s virtualization software? I remember reading through google theres like a VMware workstation but got devestatingly lost on VMware’s website

I used to play wow on linux (most recently last month with the new expansion, now i stopped again) and it's perfectly fine with wine. By perfectly fine I mean 30FPS in Orgrimmar on Mal'Ganis. FreeBSD performance shouldn't be any different from the linux one.
Now I'm playing Diablo, and it works as it should. Nothing to complain about here. What im trying to say is that you may not need the passthrough (even though it does provide the best FPS) for normal gameplay. If you're one of those streaming on twitch ... then stick with windows, yes.

Volguus
Mar 3, 2009

Potato Salad posted:

"well it's slow because virtualization"

select * from table...

They're not wrong. Running on a dedicated machine would hide bad decisions such as this one. Up to a point.

Adbot
ADBOT LOVES YOU

Volguus
Mar 3, 2009

Mr. Crow posted:

Regardless of the systemd discussion because, agreed, no one's mind is gonna be changed; I'm not sure I've ever heard a single person defend pulse audio. It's a dumpster fire that while kind of works now, needs to be replaced; if only because of the negative stigma it has. I've only heard good things about pipewire.

While I've heard only positive things about pipewire too, I'm a bit more reserved about it now, since I am using Fedora 34 that comes with it by default. I have an application (written in Qt) that I use to change the default audio output device. It's more than 5 years old and it works just fine with pulseaudio. Since upgrading to F34, even though pipewire has a pulseaudio compatible API (wrapper or whatever it is), it behaves a bit differently. For example, when the DE starts (KDE), it tells me that it connected to the server, but that there are no audio outputs available. If I quit the app then restart it it works just fine. Now, maybe the pulseaudio layer is not that stable yet, so I've been meaning to write it against pipewire directly. The documentation, however, of that API is ... not quite existent to be honest. I haven't spent that much time on it, but meh I kinda gave up for now. At the moment I just live with it not starting when the DE starts and I start it manually after. I hope they'll stabilize it soon.

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply