FAQ Feedback - for VM FAQ


RobJ

Recommended Posts

This is the feedback thread for the forum VM FAQ, as we don't want anyone cluttering the FAQ up.  Anything that's added to the FAQ that's not a Q with A will be moved to this thread.  This is the place for suggestions, complaints, requests for FAQ entries, and any discussion about current FAQ entries.

 

This VM FAQ for unRAID was designed strictly for all virtualization related questions, for any one of our community helpers to add a Frequently Asked Question, with answer.  It is based on the existing Docker FAQ and its Docker FAQ Feedback thread.

Link to comment

Some FAQ entries I can think of are:

- the cirrus tip (here)

- the 'set CPU's to 1' tip for updating Windows

- 'if it's not visible click the Advanced button' tip

- 192.168.122.x vs 192.168.1.x  (here)

- probably a whole section on Windows issues

- another section on pass-through issues

- a reference type FAQ entry - how to get started, pointers to videos and guides, etc

Link to comment

- Seabios effectively disabling the local console

 

Only when passing through a GPU, but yes, this should be noted.

 

- Explanation of ballooning, when to use, when not to

 

Also add that ballooning is not available whenever you pass through a PCI device to a virtual machine.  Those VMs will always fully allocate the max amount of memory assigned.

Link to comment

- another section on pass-through issues

-Setting MSI Interrupt can likely be added to this section, if not list this somewhere.

 

-Information on not being able to assign the same USB device ID if multiple same devices are present.

May be useful to give direction that a passed USB card can alleviate this issue.

 

-Information/recommendation for assigning thread pairs (dlandon's performance improvement sticky presents this info currently).

 

Can't recall, do we currently give good direction for stubbing to use the VM editor to assign stubbed devices?

Link to comment

- Seabios effectively disabling the local console

 

Only when passing through a GPU, but yes, this should be noted.

 

- Explanation of ballooning, when to use, when not to

 

Also add that ballooning is not available whenever you pass through a PCI device to a virtual machine.  Those VMs will always fully allocate the max amount of memory assigned.

As the LT expert, hop to it.  ????

 

Sent from my LG-D852 using Tapatalk

 

 

Link to comment
  • 6 months later...
On 11/9/2016 at 0:50 PM, gridrunner said:

I dont have onboard graphics. Can I pass-through my GPU in the primary slot 1?

 

Yes you can pass-through a GPU in your primary slot when you dont have onboard graphics. Nvidia cards need to have the rom file

passed through to the VM for this to work.

 

How does it work for AMD Cards? Mine goes blank, not even a BIOS screen.....

Link to comment
  • 1 month later...
  • 1 month later...
On 4/29/2017 at 0:03 PM, johnnie.black said:

How do I keep my sparse vdisk as small as possible?

How do enable trim on my Windows 8/10 or Windows Server 2012/2016 VM?

 

By default vdisks are sparse, i.e., you can chose 30GB capacity but it will only allocate the actual required space and use more as required, you can see the current capacity vs allocated size by clicking on the VM name, problem is that over time as files are written and deleted, updates installed, etc, the vdisk grows and it doesn't recover from the deleted files.

 

This has two consequences, space is wasted and if the vdisk in on an SSD that unused space is not trimmed, it's possible to "re-sparsify" the vdisk e.g., by cping it to another file, but this it's not very practical and there's a better way.

 

You can use the vitio-scsi controller together with discard='unmap', this allows Windows 8/10 to detect the vdisk as "thin provisioned drive", and any files deleted on the vdisk are immediately recovered as free space on the host, this also allows fstrim to then trim those now free sectors when the vdisk is on an SSD.

 

On an existing vdisk it's also possible to run Windows defrag to recover all unused space after changing to that controller.

 

Steps to change an existing Windows8/10 VM (also works for Windows Server 2012/2016):

 

1) Shut down the VM, edit the VM XML, and add the virtio-scsi controller below the last existing controller:

 


<controller type='scsi' index='0' model='virtio-scsi'>
</controller>

2) Start the VM and install the driver for the new "SCSI controller", look for it on the virtio driver ISO (e.g., vioscsi\w10)

 

3) Shutdown the VM, edit the VM XML again, this time to change the vdisk to use the new controller:

 

Change from:

 

 

To:

 

 

4) Start the VM, it's normal for the 1st boot to crash due to Windows fast start, let it reboot and it should start normally after that.

 

5) Run Windows Defrag and Optimize drives, check that he disk is now detected as "Thin provisioned drive" and run optimize to recover all previous unused space.

 

From now on all deleted files on the vdisk should be immediately trimmed.

 

Note: If after this you edit the VM using the GUI editor these changes will be lost and will need to be redone.

 

Great tip - thanks.

 

Once complete, do the drives need optimising on a schedule?

 

Link to comment
  • 5 months later...
On 4/29/2017 at 7:03 AM, johnnie.black said:

   <disk type='file' device='disk'>
      <driver name='qemu' type='raw' cache='writeback' discard='unmap'/>
      <source file='/mnt/cache/domains/Windows 10_2/vdisk1.img'/>
      <target dev='hdc' bus='scsi'/>
      <boot order='1'/>
      <address type='drive' controller='0' bus='0' target='0' unit='0'/>

 

So I'm on unRAID 6.4 and have a new Windows 10 VM. Followed the other steps but it says that an address type cannot be "drive" so I cannot change these settings.

I changed everything but left address type as 'pci' and it still shows as a normal hard disk instead of a thin provisioned drive. Any advice on what to change it to instead of pci?

 

Thanks!

Link to comment
So I'm on unRAID 6.4 and have a new Windows 10 VM. Followed the other steps but it says that an address type cannot be "drive" so I cannot change these settings.

I changed everything but left address type as 'pci' and it still shows as a normal hard disk instead of a thin provisioned drive. Any advice on what to change it to instead of pci?

I never did this on v6.4, looks like something changed, will have a look when I have the time.

 

 

Link to comment
  • 3 weeks later...
  • 5 months later...
  • 8 months later...

I changed the disk-size in Unraid's UI of an Ubuntu mini sourced VM I've setup as a server for various things, and now the VM has no network whatsoever. What's up with that? If changing disk-size has this effect on a basic ubuntu VM, I would not qualify unraid as 'stable' or something to 'sell', to be honest (I'm 7 days into using the trial). Also, I noticed that its disksize is still not expanded, when I connect via VNC and check on this VM, it's still showing its old size. While the Unraid UI says it has 20GB, df -h shows me it only has 12GB still.

Link to comment
2 minutes ago, fluisterben said:

I changed the disk-size in Unraid's UI of an Ubuntu mini sourced VM I've setup as a server for various things, and now the VM has no network whatsoever. What's up with that? If changing disk-size has this effect on a basic ubuntu VM, I would not qualify unraid as 'stable' or something to 'sell', to be honest (I'm 7 days into using the trial). Also, I noticed that its disksize is still not expanded, when I connect via VNC and check on this VM, it's still showing its old size. While the Unraid UI says it has 20GB, df -h shows me it only has 12GB still.

I have changed the vdisk size on VMs without the effect on the network that you describe.   I expect that there is something else going on in your case.

 

i would not expect the ‘df’ command to show anything different until you have run an appropriate partition management tool (e.g. gparted) inside the VM under Linux.     Unraid may increase the physical size of the emulated disk but it will not touch the partitions/file systems on the vdisk - that is up to the VM to do so.

Link to comment

@fluisterben If you have custom edits inside the xml for your network lets say changing the model of the emulated device, these changes will be lost if you change something else in the VM settings. Keep that in mind. As stated from itimpi increasing the vdisk size in the webui doesn't change the filesystem size inside the VM. You have to expand the partion inside the VM by yourself. Also to be mentioned and been documented in Unraids wiki, never decrease the vdisk size or you will break your VM if sectors of the vdisk are used by the VM and you cut them off. 

Link to comment
  • trurl pinned this topic

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.