Hyper-V - question Linux Guest with RAID arrays

  1. jimbo45's Avatar
    Posts : 10,743
    Windows / Linux : Arch Linux
       #1

    Hyper-V - question Linux Guest with RAID arrays


    Hi there
    I'm gradually giving up on VMWare to go to HYPER-V.

    One issue I have is that if I create a Linux server VM I still want to use existing XFS formatted HDD's on the Guest in RAID arrays. There's around 10 TB of space - and about 3 TB of data.

    Is the HYPER-V system as Host robust enough to run say Ubuntu or Centos VM's with their native Linux formatted HDD's - that's no prob with VMware but googling around the advice seems to be don't use physical HDD's with HYPER-V.

    I really don't want the whole exercise of converting these to VHD's - also the RAID system might hose up when done like that. (using Linux software RAID - mdadm - works efficiently every time and is a good performer).

    Any ideas @Kari as I think he's the expert around here). I don't have a problem with creating the base VM's -- some of the pass thru stuff is a bit ???.

    I don't need sound either but I do also need "Hot pluggable USB3 devices" -- Is that sufficiently robust as well - note these external HDD's are also xfs formatted so I just want to mount them on the Linux vm with standard mount/dev/sdx-t auto -o rw /mnt/shares or whatever.

    Thanks

    cheers
    jimbo
      My Computer

  2. cereberus's Avatar
    Posts : 12,122
    Windows10
       #2

    jimbo45 said:
    Hi there
    I'm gradually giving up on VMWare to go to HYPER-V.

    One issue I have is that if I create a Linux server VM I still want to use existing XFS formatted HDD's on the Guest in RAID arrays. There's around 10 TB of space - and about 3 TB of data.

    Is the HYPER-V system as Host robust enough to run say Ubuntu or Centos VM's with their native Linux formatted HDD's - that's no prob with VMware but googling around the advice seems to be don't use physical HDD's with HYPER-V.

    I really don't want the whole exercise of converting these to VHD's - also the RAID system might hose up when done like that. (using Linux software RAID - mdadm - works efficiently every time and is a good performer).

    Any ideas @Kari as I think he's the expert around here). I don't have a problem with creating the base VM's -- some of the pass thru stuff is a bit ???.

    I don't need sound either but I do also need "Hot pluggable USB3 devices" -- Is that sufficiently robust as well - note these external HDD's are also xfs formatted so I just want to mount them on the Linux vm with standard mount/dev/sdx-t auto -o rw /mnt/shares or whatever.

    Thanks

    cheers
    jimbo
    Hyper-V does not play well with Linux as normally they only run in Basic Mode, and cannot run in Enhanced Mode. There is no way to invoke sound in basic mode, even using external drives and hot plugging usb drives is difficult.

    There is currently an experiment to allow Ubuntu 1804 to be installed in enhanced mode I have written a guide which works fine, and Windows drives including usb drives are easily attached now. Unfortunately, sound is still not possible.

    A guide how to run Ubuntu 18.04 in Enhanced Mode in Hyper-V - Windows 10 Forums

    In the end, Hyper-V has really descended to Windows 10 from the Windows Server market for use as a hypervisor and is great for running windows. Even then Home can only be run in basic mode, suffering same limitations as Linux as it dos not have RDP.

    There is a workaround for Home to add RDP though which will allow it to work in enhanced mode.

    Getting Sound in 10 Home Hyper-V session - Windows 10 Forums

    I really cannot say about mounting external Linux drives - I kind of doubt it is possible. Hopefully @Kari may be able to comment here.
      My Computer

  3. jimbo45's Avatar
    Posts : 10,743
    Windows / Linux : Arch Linux
    Thread Starter
       #3

    Hi there

    Thanks @cereberus for your reply

    It's a pity HYPER-V isn't a bit more "Linux Friendly" -- especially as Ms now even acknowledge its existence by providing for a few distros for use with the WSL.
    From within Windows you can do quite a lot with the WSL - even run a load of GUI programs - although you have to take pot luck on what works -- I think it's something with DBUS -- will have a look at that later.

    Ms probably could get a lot more custom from VMWare if it developed a bit more on making HYPER-V useable for other OS'es than Windows -- I've always said there is nothing wrong whatever in running Linux servers as VM's.

    seems some of the cosmetic things they are adding into insider builds of W10 are much less important than doing something sensible like re-vamping the HYPER-V product -- with modern machines etc Virtualisation isn't going away.

    Sound on a server isn't important -- just want the file sharing bit but hot swapping external devices is definitely important, as well as hot swapping RAID devices.

    Not giving up though --sooner or later we'll get this working OK.

    WKS is fine while I've still got a corporate subscription !!!! -- I don't like VBOX -- seems too unstable - at least it is for me and the free VMware product is too restrictive for what I want to do.

    I'm not really looking to run HOST Linux on this particular box either (another get around).

    Cheers
    jimbo
      My Computer

  4. Kari's Avatar
    Posts : 17,532
    Windows 10 Pro
       #4

    You can add any removable physical drive in VM settings, subject to it being offline on host:
    Hyper-V - question  Linux Guest with RAID arrays-image.png

    It just might work, how I would start testing it is to create a Linux VM, then when installed and everything is working, add physical disk. Not sure though how RAID will react, if it works or not.

    Kari
      My Computer

  5. cereberus's Avatar
    Posts : 12,122
    Windows10
       #5

    Kari said:
    You can add any removable physical drive in VM settings, subject to it being offline on host:
    Hyper-V - question  Linux Guest with RAID arrays-image.png

    It just might work, how I would start testing it is to create a Linux VM, then when installed and everything is working, add physical disk. Not sure though how RAID will react, if it works or not.

    Kari
    Are you sure you mean removable drive.

    Probably just a language issue but removable drives in Windows means usb drives and SD cards. Do these work as well?

    You kind of say it but I think you really mean 'physical permanent host drives that can be taken offline" - this always excludes the OS drive of course.
      My Computer

  6. jimbo45's Avatar
    Posts : 10,743
    Windows / Linux : Arch Linux
    Thread Starter
       #6

    Hi folks particularly @Kari and @cereberus

    Looking good -- the offline bit for permanently attached HDD's is also OK -- what I did first was to boot up a Live linux distro to format 2 HDD's to xfs format -- that way Windows would regard these as unitinialized -- not even a GPT area on them.

    Now boot up in Windows fine the 2 HDD's are offline.

    Am creating the VM - will finish it later today - short week for me this week so lots of time.
    The RAID should be fine as I'll be using purely mdadm which is Linux software RAID and the Linux kernel will be handling the native I/O rather than the HOST with Virtual I/O from VHD's.

    I've created though a small vhd for /boot, / (system and root) /home and a swap area so the Linux VM should boot. now if I can attach the 2 HDD's then it will be fine.

    Will post later how I get on -- I'll try both UBUNTU (thanks to cereberus's tutorial) and Centos as I know that system backwards / inside out.

    Sound isn't an issue at this stage.

    Update

    Created 1 RAID 0 array with Linux live distro and stuck a few of files in it -- want to check when I create the VM I don't lose the array. I.e to test that I can still access the RAID data on HDD's previously created and don't have to start from scratch with new arrays.

    Windows shows this for the 2 HDD's -- Offline so should be OK. Linux sees RAID as continuous storage space - don't know internally what it looks like. Windows just sees as follows

    Hyper-V - question  Linux Guest with RAID arrays-raid.png

    ready to start testing soon.

    Cheers
    jimbo
    Last edited by jimbo45; 03 Sep 2018 at 03:19. Reason: added RAID info
      My Computer

  7. Kari's Avatar
    Posts : 17,532
    Windows 10 Pro
       #7

    cereberus said:
    Are you sure you mean removable drive.
    No, I chose my words badly.

    I should have said "any disk that can be removed (set offline) from system without Windows losing functionality". This includes all internal and external disks, exceptions being disk where Windows system and boot files are located, USB Flash Drives and SD cards.

    My apologies.

    Add or Remove Physical Hard Disk for Hyper-V Virtual Machine | Windows 10 Tutorials


    jimbo45 said:
    Ready to start testing soon.
    Good luck, Jimbo. Keep us posted.

    Kari
      My Computer

  8. jimbo45's Avatar
    Posts : 10,743
    Windows / Linux : Arch Linux
    Thread Starter
       #8

    Hi folks

    Created a CENTOS 7.5 VM on a laptop for test -- VM created fast and easily - used standard defaults - deleted checkpoints as this is just a test VM which will be tossed as soon as I get the hang of this better.

    First little thing -- screen resolution - got some ridiculous 852 X 11xx or something --- fixed via the grubby command (found in the tutorials) That's OK

    No sound -- no bother but will install XRDP to see if that works - sometimes that can bring local resources to Linux VM's from Windows.

    To test -- attaching and detaching USB's, SAMBA for sharing connected disks.

    Internet connection etc working without issue - note laptop on ethernet via USB-->ethernet connection so I don't know what would happen if I just rely on the wifi on the Host.

    Centos 7.5 doesn't seem to work in enhanced mode - don't think that's a primary concern at the moment as screen resolution fixed with the grubby command -- reboot VM after applying it.

    I see snipping tool from Windows captures the mouse pointer in the VM too.

    Hyper-V - question  Linux Guest with RAID arrays-hyper.png

    Quite fun this !!!!

    I'll have a look at UBUNTU as well and maybe OPENSUSE Tumbleweed to check out differences.

    With nice fast SSD for VM creation creating the VM's doesn't take long at all.

    Cheers
    jimbo
      My Computer

  9. cereberus's Avatar
    Posts : 12,122
    Windows10
       #9

    Kari said:
    No, I chose my words badly.

    I should have said "any disk that can be removed (set offline) from system without Windows losing functionality". This includes all internal and external disks, exceptions being disk where Windows system and boot files are located, USB Flash Drives and SD cards.

    My apologies.

    Kari
    I have just found an interesting thing. I created a virtual hard drive on a usb flash drive, and attached that as a drive in Disk Management. I was able to set this drive offline, and attach it to Hyper-V using the method above i.e. it works for VHDs as well REGARDLESS of whether VHD is on a flash drive or hard drive.

    So it's a bit kludgy, but an easy way to access a usb drive in Basic Mode is to have a single VHD on the flash drive big enough to hold all files that you might want to transfer, and you write files to that VHD on remote pc you are transferring to.

    However, not much real gain over simply copying files to a VHD on the local Host PC, unless you do not want to transfer files to Host PC drive for (say) confidentiality reasons perhaps.
      My Computer

  10. jimbo45's Avatar
    Posts : 10,743
    Windows / Linux : Arch Linux
    Thread Starter
       #10

    Hi there

    @Kari and @cereberus

    I've tested OK on a laptop so I can create on the server hardware (desktop --rescued proliant gen 10 HP microserver !!)

    On laptop -- all working fine -- RDP, SAMBA ,Linux XFS raw HDD, external USB as raw linux disk, RAID with 2 SSD's .

    I'll create a new Gen 2 VM

    The only issue left (not really bothered with this one but if somebody solves it then fine !!) is sound on the VM - don't need it as the file sharing (SAMBA) works fine.

    performance on the laptop is fine - listening to the music on remote TV from the HYPER-V VM created on laptop -- on remote TV using KODI as the client -- picked up the VM address via samba - no prob .

    The HDD's need though to be added as SCSI then no prob adding in the HYPER-V config.

    Thanks guys

    Hyper-V - question  Linux Guest with RAID arrays-raw.png

    Going to mark this as solved now - the trick is also to have the RAW HDD's offline to windows - that's different from VMware. One also needs to avoid using the default switch as that gives a NAT address -- use EXTERNAL switch with your network adapter --using a USB-->LAN for speed and to avoid problems with Wifi drivers etc etc.

    cheers
    jimbo
    Last edited by jimbo45; 04 Sep 2018 at 06:58.
      My Computer


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd
All times are GMT -5. The time now is 02:02.
Find Us




Windows 10 Forums