<div dir="ltr">Much thanks.  Any of these would (will) be just fine.  I have at least one question.<div><div><br></div><div>ssh port forwarding would be the easiest, it was one way I tried, but I'm missing something.  In your example:<br><div><br></div><div>>   ssh -R 10809:nbd-server:10809 vm<br></div><div><br></div><div>...is that to say that 10809 is the only port we need to handle?  Or, is it just an example showing one of the necessary ports?</div><div><br></div><div>NFS+RPC is one of my holdups; 10809, Linux Network Block Devices, is in /etc/services on some, not all, of my Linux hosts, so, please educate me: does that process fix the "RPC problem"?</div><div><br></div><div>Thanks.</div><div><br></div><div><br></div><div><br></div><div><br></div></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Apr 20, 2022 at 9:47 AM Richard W.M. Jones <<a href="mailto:rjones@redhat.com">rjones@redhat.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Mon, Apr 18, 2022 at 11:22:07PM -0500, Michael Jinks wrote:<br>
> I have a laptop, running VMM, with a handful of VM's.  Next to that, I have a<br>
> pile of disks running on ZFS, and I'd like to give the VM's network access<br>
> there, for running backups or whatever.<br>
> <br>
> The holdup is that the laptop (pop-OS if that matters -- so Ubuntu, so Debian)<br>
> automatically prohibits any outside network traffic to the VM's. <br>
> Self-contained outward traffic from the VM is fine, like ssh; but the outside<br>
> host can't see in to any VM, so, for instance, when the VM tries to NFS-mount<br>
> to the outside, the rpc connection back will fail.<br>
> <br>
> In the past, my way of allowing something like this was to make a new virtual<br>
> network running on the host, visible for the VM's and reachable by the outside<br>
> service, but I haven't been able to find how to do that in a modern VMM setup. <br>
> I can find, in the GUI:<br>
> <br>
>   QEMU/KVM - Connection Details -> Virtual Networks: "Create a<br>
> new virtual network"...<br>
> <br>
> ...but everything I've tried has failed in one way or another.  Maybe I just<br>
> don't know how to set that up?<br>
<br>
I used this relatively recently.  It's still a lot more painful to set<br>
up than it really needs to be however ...<br>
<br>
<a href="https://wiki.libvirt.org/page/Networking#Bridged_networking_.28aka_.22shared_physical_device.22.29" rel="noreferrer" target="_blank">https://wiki.libvirt.org/page/Networking#Bridged_networking_.28aka_.22shared_physical_device.22.29</a><br>
<br>
Another option is just port forwarding.  Pretty sure you can set this<br>
up from virt-manager, but if not you can definitely do it through<br>
editing the libvirt XML:<br>
<br>
<a href="https://libvirt.org/formatdomain.html#channel" rel="noreferrer" target="_blank">https://libvirt.org/formatdomain.html#channel</a><br>
<br>
virsh edit is described here:<br>
<br>
<a href="https://www.redhat.com/sysadmin/virsh-subcommands" rel="noreferrer" target="_blank">https://www.redhat.com/sysadmin/virsh-subcommands</a><br>
<br>
Another option would be attaching a remote disk to the guest.  Again,<br>
not sure if this can be done in virt-manager, but it's certainly<br>
possible from libvirt XML:<br>
<br>
<a href="https://libvirt.org/formatdomain.html#hard-drives-floppy-disks-cdroms" rel="noreferrer" target="_blank">https://libvirt.org/formatdomain.html#hard-drives-floppy-disks-cdroms</a><br>
<br>
  <disk type='network' device='disk'><br>
    <driver name='qemu' type='raw'/><br>
    <source protocol='nbd'><br>
      <host name='nbd-server'/><br>
    </source><br>
    <target dev='vda' bus='virtio'/><br>
  </disk><br>
<br>
Another, even simpler option is a reverse SSH tunnel, ie something<br>
like this on the host:<br>
<br>
  ssh -R 10809:nbd-server:10809 vm<br>
<br>
That will export the NBD port on nbd-server:10809 into the VM, so you<br>
would be able to access an NBD server from inside the VM.<br>
<br>
Rich.<br>
<br>
> I understand the security concerns, and won't have a problem flatting that<br>
> down.<br>
> <br>
> If I'm just not looking in the right docs, please point me in the<br>
> right direction.<br>
> <br>
> Or, if I'm going about this some unwise way, please educate me.<br>
> <br>
> Thanks.<br>
> <br>
<br>
-- <br>
Richard Jones, Virtualization Group, Red Hat <a href="http://people.redhat.com/~rjones" rel="noreferrer" target="_blank">http://people.redhat.com/~rjones</a><br>
Read my programming and virtualization blog: <a href="http://rwmj.wordpress.com" rel="noreferrer" target="_blank">http://rwmj.wordpress.com</a><br>
Fedora Windows cross-compiler. Compile Windows programs, test, and<br>
build Windows installers. Over 100 libraries supported.<br>
<a href="http://fedoraproject.org/wiki/MinGW" rel="noreferrer" target="_blank">http://fedoraproject.org/wiki/MinGW</a><br>
<br>
</blockquote></div>