Access shares or mapped drive from a VM


Recommended Posts

v6.1.3: I've created a Windows 8/10 VM on a fast SSD (within my unRAID). Everything's working fine EXCEPT that I can't I can't fathom out how to access other areas of my NAS in order to save files. Yes I can probably save them to the c: drive, but ideally I want to save them to a separate drive or network location. The VM is running a CCTV camera app (BlueIris) ans monitoring 12 cameras, so is capable of producing a LOTS of output files. I therefore need to get them to a larger area of storage that somewhere within my vdisk. Can someone please advise how to map a unRAID disk or share, or a different location within my unRAID serverw, as a drive/vdisk, so that I can write to it. Thanks

 

Link to comment

Thanks Jonp, but I think there's still an issue here. I'm running W8.1 Pro on the VM BTW. Maybe you can advise further. If I expand 'Network' it shows nothing. If I double click Network it still shows nothing, but if I overtype Network with the URL of my unRAID server (which is already hosting this VM remember) ONLY THEN does it shows all of the shares and disks on this particular NAS. This is now persistent (ie if I cycle the VM it's still there), but it is still not listing everything on my network within 'Network'. EG I have 3x unRAID servers on my LAN, one of which is my dev box. This is a bog standard unRAID build which has the default name of TOWER. Despite the above action, TOWER is still not listed and nor are any of my Sonos devices, or uPNP devices, which do appear in my W8/W10 desktop Network neighborhood.

 

In principle, my problem is solved, in that I can now get to the particular share I wanted to access, but I'd still like to know what I'm missing, if anything.

 

I'd also like to understand what vdisk2 is supposed to be doing. Is it used as a swap or only during creation of the VM.

 

Any more advise/suggestions ?

Link to comment

Johnodon - You were right about that (but I now have another problem so please read on) to the extent that I thought I'd setup the bridge 'br0' but I hadn't actually set the 'Setup bridge' flag to 'Yes' and that explains why I couldn't find it the drop down list on the VM settings. So I did that ... then when I pressed 'Apply' I lost my server off the network ..sh1t .. what happened there.. connected a keyboard, screen and rebooted. Low & behold my server is coming up on a different IP address even though one of the  ethernet ports has a blanking plug in to remind me which one to use for the MAC address in my router's DHCP setup, so nothing has physically changed. Having checked, it's now using the MAC address of eth1 instead of that of eth0.

 

Can someone please explain what's happened here. I REALLY need to get my server back onto eth0 ASAP as it has other devices looking at it on that address as my Sky/SAGEM router is useless at DNS, but I also need communicate with my VM, preferably on a different ethernet port/IP if that's possible, and I can see no way of having multiple network setups - ie one for eth0, one for eth1 and one for br0.

 

I really hope someone can quickly point me to solutions and options here

 

Thanks

 

 

Link to comment

Follow jonps' advice.

 

If you are unable to reach your server, it may be easiest to pop your unraid thumb drive into a Windows machine and manually edit the /config/network.cfg file in Notepad.  This is what mine looks like if it helps (I give my unraid box a static IP and DNS entries):

 

# Generated settings:
USE_DHCP="no"
IPADDR="192.168.1.10"
NETMASK="255.255.255.0"
GATEWAY="192.168.1.1"
DHCP_KEEPRESOLV="no"
DNS_SERVER1="8.8.8.8"
DNS_SERVER2="8.8.4.4"
DNS_SERVER3=""
BONDING="no"
BONDING_MODE="1"
BRIDGING="yes"
BRNAME="br0"
BRSTP="yes"
BRFD="4"

 

That being said, it sounds like unRAID is using the wrong Ethernet adapter so the above won't really help.

 

@jonp:  Can you force the MAC address in the network.cfg file?

 

John

Link to comment

Thanks for those suggestions .. but unfortunately for me, I'm working away from home several days a week, so I won't be able to test out those suggestions until Thursday/Friday. Presumably there should be some std syntax for telling network.cfg which interface (eth0, eth1) and hence by association, which MAC address you're talking about, if only because you might need to specify how to configure multiple NICs: two, four, six, however many you have on your rig and/or additional PCIe card - Had a quick scan but there doesn't appear to be anything in the wiki about this.

Link to comment

So ... jonp's advice worked (of course !) - I enabled bonding, pressed Apply and after a looking at the message 'Waiting for <ip-address>' for a bit too long, I decided to open a page at the IP address my server used to be on, and there it was, back again.

 

Note in passing that I checked the network.cfg file before enabling bonding (see below) and noted that it was still showing as set for 'Use DHCP=yes', with the correct IP address in there as returned by DHCP for that (eth0) MAC address, but seems to have completely ignored that, viz:

# Generated settings:

USE_DHCP="yes"

IPADDR="192.168.0.101"

NETMASK="255.255.255.0"

GATEWAY="192.168.0.1"

DHCP_KEEPRESOLV="no"

DNS_SERVER1="192.168.0.1"

DNS_SERVER2=""

DNS_SERVER3=""

BONDING="no"

BONDING_MODE="1"

BRIDGING="yes"

BRNAME="br0"

BRSTP="yes"

BRFD="0"

 

Q1 - Does this suggest a bug when using briging ?

 

Also, I note that 'johnodon' has BRFD set to 4, whereas the default is clearly 0, as in my case.

Q2 - What are the pros & cons of up-ing the value of BRFD.

 

Finally, I googled for network.cfg in a slackware and note that it referenced the interface number as a parameter (assuming I understood correctly) such as:

 

USE_DHCP[0]="???"

IPADDR[0]="  .  .  .  "

NETMASK[0]="  .  .  .  "

GATEWAY[0]="  .  .  .  "   

.. and suggested that up to 3 interfaced can be specified in this way

 

Q3 - Can we use this to configure settings for 'eth1' AND 'br0' separately ??

 

Thanks

 

Link to comment

Also, I note that 'johnodon' has BRFD set to 4, whereas the default is clearly 0, as in my case.

Q2 - What are the pros & cons of up-ing the value of BRFD.

 

That only applies to special cases.

 

If I remember correctly, the default BRFD value is set to 15 seconds in Linux.  Leaving it set to '0' did not work for me...I had to give it a non-zero value (like '4').  This actually reduces the forward delay from 15 seconds to 4 seconds.

 

I only had to do this to allow my VMs to PXE boot.  If left at zero, they timeout trying to obtain a DHCP address.  I know...it sounds backwards but that is the way it is.

 

More info here:  https://lime-technology.com/forum/index.php?topic=41079.msg388890#msg388890

 

John

Link to comment
  • 4 weeks later...

I am having a similar issue with not see my network in my VMs. My setting are screen captures:

 

Network view on Win 10 which does not show any of my network:

2aif341.jpg

 

The setup for network:

rlcf4p.jpg

 

Screen capture of network config:

2a9d005.jpg

 

Router:

am9oo3.jpg

 

My XML file

<domain type='kvm' id='4'>
  <name>Test 9</name>
  <uuid>f2bd56a1-ac53-b0b0-9d3f-72888f512dc6</uuid>
  <description>test 9</description>
  <metadata>
    <vmtemplate name="Custom" icon="windows.png" os="windows"/>
  </metadata>
  <memory unit='KiB'>13107200</memory>
  <currentMemory unit='KiB'>1476608</currentMemory>
  <memoryBacking>
    <nosharepages/>
    <locked/>
  </memoryBacking>
  <vcpu placement='static'>6</vcpu>
  <cputune>
    <vcpupin vcpu='0' cpuset='2'/>
    <vcpupin vcpu='1' cpuset='3'/>
    <vcpupin vcpu='2' cpuset='4'/>
    <vcpupin vcpu='3' cpuset='5'/>
    <vcpupin vcpu='4' cpuset='6'/>
    <vcpupin vcpu='5' cpuset='7'/>
  </cputune>
  <resource>
    <partition>/machine</partition>
  </resource>
  <os>
    <type arch='x86_64' machine='pc-i440fx-2.3'>hvm</type>
  </os>
  <features>
    <acpi/>
    <apic/>
  </features>
  <cpu mode='host-passthrough'>
    <topology sockets='1' cores='6' threads='1'/>
  </cpu>
  <clock offset='localtime'>
    <timer name='rtc' tickpolicy='catchup'/>
    <timer name='pit' tickpolicy='delay'/>
    <timer name='hpet' present='no'/>
  </clock>
  <on_poweroff>destroy</on_poweroff>
  <on_reboot>restart</on_reboot>
  <on_crash>restart</on_crash>
  <devices>
    <emulator>/usr/bin/qemu-system-x86_64</emulator>
    <disk type='file' device='disk'>
      <driver name='qemu' type='raw' cache='writeback'/>
      <source file='/mnt/cache/appdata/ISO share/Test 9/Secondary.img'/>
      <backingStore/>
      <target dev='hdc' bus='virtio'/>
      <boot order='1'/>
      <alias name='virtio-disk2'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
    </disk>
    <disk type='file' device='cdrom'>
      <driver name='qemu' type='raw'/>
      <source file='/mnt/cache/appdata/ISO share/Windows 10 Pro/Win10.PRO.img'/>
      <backingStore/>
      <target dev='hda' bus='ide'/>
      <readonly/>
      <boot order='2'/>
      <alias name='ide0-0-0'/>
      <address type='drive' controller='0' bus='0' target='0' unit='0'/>
    </disk>
    <disk type='file' device='cdrom'>
      <driver name='qemu' type='raw'/>
      <source file='/mnt/cache/appdata/ISO share/virtio-win-0.1.102.iso'/>
      <backingStore/>
      <target dev='hdb' bus='ide'/>
      <readonly/>
      <alias name='ide0-0-1'/>
      <address type='drive' controller='0' bus='0' target='0' unit='1'/>
    </disk>
    <controller type='scsi' index='0' model='virtio-scsi'>
      <alias name='scsi0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x09' function='0x0'/>
    </controller>
    <controller type='usb' index='0'>
      <alias name='usb'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>
    </controller>
    <controller type='pci' index='0' model='pci-root'>
      <alias name='pci.0'/>
    </controller>
    <controller type='ide' index='0'>
      <alias name='ide'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/>
    </controller>
    <controller type='virtio-serial' index='0'>
      <alias name='virtio-serial0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
    </controller>
    <interface type='bridge'>
      <mac address='52:54:00:1a:34:b4'/>
      <source bridge='br0'/>
      <target dev='vnet0'/>
      <model type='virtio'/>
      <alias name='net0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
    </interface>
    <serial type='pty'>
      <source path='/dev/pts/0'/>
      <target port='0'/>
      <alias name='serial0'/>
    </serial>
    <console type='pty' tty='/dev/pts/0'>
      <source path='/dev/pts/0'/>
      <target type='serial' port='0'/>
      <alias name='serial0'/>
    </console>
    <channel type='unix'>
      <source mode='bind' path='/var/lib/libvirt/qemu/channel/target/Test 3.org.qemu.guest_agent.0'/>
      <target type='virtio' name='org.qemu.guest_agent.0' state='disconnected'/>
      <alias name='channel0'/>
      <address type='virtio-serial' controller='0' bus='0' port='1'/>
    </channel>
    <input type='tablet' bus='usb'>
      <alias name='input0'/>
    </input>
    <input type='mouse' bus='ps2'/>
    <input type='keyboard' bus='ps2'/>
    <graphics type='vnc' port='5900' autoport='yes' websocket='5700' listen='0.0.0.0' keymap='en-us'>
      <listen type='address' address='0.0.0.0'/>
    </graphics>
    <video>
      <model type='vmvga' vram='16384' heads='1'/>
      <alias name='video0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
    </video>
    <hostdev mode='subsystem' type='scsi' managed='no'>
      <source>
        <adapter name='scsi_host8'/>
        <address bus='0' target='0' unit='0'/>
      </source>
      <readonly/>
      <alias name='hostdev0'/>
      <address type='drive' controller='0' bus='0' target='0' unit='0'/>
    </hostdev>
    <hostdev mode='subsystem' type='pci' managed='yes'>
      <driver name='vfio'/>
      <source>
        <address domain='0x0000' bus='0x00' slot='0x1b' function='0x0'/>
      </source>
      <alias name='hostdev1'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/>
    </hostdev>
    <hostdev mode='subsystem' type='pci' managed='yes'>
      <driver name='vfio'/>
      <source>
        <address domain='0x0000' bus='0x00' slot='0x14' function='0x0'/>
      </source>
      <alias name='hostdev2'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x08' function='0x0'/>
    </hostdev>
    <memballoon model='virtio'>
      <alias name='balloon0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0'/>
    </memballoon>
  </devices>
</domain>

 

Best Regards

Link to comment

Is anyone seeing my screen captures in previous post? I used TinyPic and they are not visible to me.

 

Thanks

 

 

[uPDATE] Now that I home I can see them. Must be their blocked somehow at work. Any how I still have the same problem as noted in Post Reply #10 above.

Link to comment
  • 1 year later...
  • 9 months later...
  • 1 year later...
22 hours ago, JP01 said:

Hi, did any of the posters find out what was causing the lack of SMB connectivity from a guest Windows VM to the host unRAID server's shares? Thanks,

I was experiencing this issue on a Windows 2019 Server VM. The local Computer policy (Computer Config > Administrative Templates > Network > Lanman Workstation > "Enable insecure guest logons") was set to "Not Configured". The description suggests this means that access to such shares is allowed.

 

I then took a look at the following post:

which indicates that there is a registry key that should be set for this setting (i expected the policy to set it to 1) however the actual registry key is set to 0 by default on the install i had. Setting it to 1 immediately allowed my WS2019 machine to connect to the unRAID Host's SMB shares.

 

The registry key: HKLM\SYSTEM\CurrentControlSet\Services\LanmanWorkstation\Parameters\AllowInsecureGuestAuth key, value set to 1 worked for me.

Link to comment
  • 5 months later...
On 12/7/2015 at 5:43 PM, johnodon said:

Did you set up a network bridge and name it 'br0' (Settings --> Network Settings).

 

Also, you have to set Default Network Bridge in Settings --> VM Manager to 'br0'?  If it set to 'virbr0', then your VMs will have their own virtual network.

There is no option for choosing br0, only vibr0.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.