multipass
multipass copied to clipboard
Windows Server support
Are there any plans to support windows server 2016?
Hi @olibanjoli I assume Hyper-V is available there?
Could you please supply the output of these commands:
Get-Service -Name vmms
Get-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V
Get-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V-Hypervisor
Get-ItemProperty -Path 'HKLM:\Software\Microsoft\Windows NT\CurrentVersion'
Do you have an idea what version / release of Server 2016 corresponds to the 1803 build of Windows 10? Our requirement is that the "Default Switch" network exists in Hyper-V.
Thanks!
Hey @Saviq Yes Hyper-V is available there.
PS C:\> Get-Service -Name vmms
Status Name DisplayName
------ ---- -----------
Running vmms Hyper-V Virtual Machine Management
PS C:\> Get-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V
FeatureName : Microsoft-Hyper-V
DisplayName : Hyper-V
Description : Hyper-V
RestartRequired : Possible
State : Enabled
CustomProperties :
ServerComponent\Description : Hyper-V provides the services that you can use to create and manage virtual machines and their resources. Each virtual machine is a virtualized computer system that
operates in an isolated execution environment. This allows you to run multiple operating systems simultaneously.
ServerComponent\DisplayName : Hyper-V
ServerComponent\EventQuery : Virtualization.Events.xml
ServerComponent\Id : 20
ServerComponent\Type : Role
ServerComponent\UniqueName : Hyper-V
ServerComponent\Version\Major : 1
ServerComponent\Version\Minor : 0
ServerComponent\BestPractices\Model\Id : Microsoft/Windows/Hyper-V
ServerComponent\Deploys\Update\Name : Microsoft-Hyper-V-Offline
ServerComponent\Deploys\Update\Name : Microsoft-Hyper-V-Online
ServerComponent\Configuration\RootClassMofDefinition :
class ServerComponent_HyperV
{
String VirtualSwitchNetworkAdapters[];
String DefaultVirtualMachinePath;
String DefaultVirtualHardDiskPath;
BOOLEAN EnableVirtualMachineMigration;
String VirtualMachineMigrationAuthenticationType;
};
ServerComponent\SystemServices\SystemService\DefaultMonitoring : true
ServerComponent\SystemServices\SystemService\Name : vmms
PS C:\> Get-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V-Hypervisor
PS C:\> Get-ItemProperty -Path 'HKLM:\Software\Microsoft\Windows NT\CurrentVersion'
SystemRoot : C:\Windows
BuildBranch : rs1_release
BuildGUID : ffffffff-ffff-ffff-ffff-ffffffffffff
BuildLab : 14393.rs1_release.180427-1804
BuildLabEx : 14393.2248.amd64fre.rs1_release.180427-1804
CompositionEditionID : ServerDatacenter
CurrentBuild : 14393
CurrentBuildNumber : 14393
CurrentMajorVersionNumber : 10
CurrentMinorVersionNumber : 0
CurrentType : Multiprocessor Free
CurrentVersion : 6.3
EditionID : ServerDatacenter
InstallationType : Server
InstallDate : 1525438702
ProductName : Windows Server 2016 Datacenter
ReleaseId : 1607
SoftwareType : System
UBR : 2248
PathName : C:\Windows
Customizations : None
DigitalProductId : {164, 0, 0, 0...}
DigitalProductId4 : {248, 4, 0, 0...}
ProductId : 00377-90016-12030-AA800
InstallTime : 131699123029921862
RegisteredOwner : Windows User
RegisteredOrganization :
PSPath : Microsoft.PowerShell.Core\Registry::HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion
PSParentPath : Microsoft.PowerShell.Core\Registry::HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT
PSChildName : CurrentVersion
PSDrive : HKLM
PSProvider : Microsoft.PowerShell.Core\Registry
Disappointed that it doesn't support Windows Server 2016 or 2019.
+1, It installs but errors out when run on the server edition, complaining about hyper-v not enabled. In fact, hyper-v is enabled and has other VMS running.
@Saviq Are you planning to introduce compatibility for windows server? Thanks.
Hi @gomez34, yes, we just need to get access to one so that we can verify it all works.
Could you run this command for me and post the output, please:
Get-VMSwitch -Id C08CB7B8-9B3C-408E-8E30-5E16A3AEB444 | Format-List
Multipass currently relies on the "Default Switch" to exist, and that above would confirm for us whether it does.
@Saviq thanks, this is the command, can I help you with something else?
PS C:\Users\Administrador> Get-VMSwitch -Id C08CB7B8-9B3C-408E-8E30-5E16A3AEB444 | Format-List
Get-VMSwitch : No Ethernet switch could be found matching the specified criteria.
At line:1 char:1
+ Get-VMSwitch -Id C08CB7B8-9B3C-408E-8E30-5E16A3AEB444 | Format-List
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (:) [Get-VMSwitch], VirtualizationException
+ FullyQualifiedErrorId : ObjectNotFound,Microsoft.HyperV.PowerShell.Commands.GetVMSwitch
Thanks @gomez34, that's going to be a problem - without the "Default Switch" we'd have to set up all networking manually…
Do you have any other switches?
PS> Get-VMSwitch | Format-List
How do you normally run your instances so they get networking?
@Saviq this is the command, my wsl application works in windows server with hyper-v and also I have Ubuntu virtual machines in Hyper-v
PS C:\Users\Administrador> Get-VMSwitch | Format-List
Name : Microsoft Hyper-V Network Adapter - Virtual Switch
Id : d2fccec7-ffaa-42d1-b4d3-fef843db2d99
Notes :
Extensions : {Microsoft Windows Filtering Platform, Microsoft Azure VFP Switch
Extension, Microsoft NDIS Capture}
BandwidthReservationMode : Absolute
PacketDirectEnabled : False
EmbeddedTeamingEnabled : False
IovEnabled : False
SwitchType : External
AllowManagementOS : True
NetAdapterInterfaceDescription : Microsoft Hyper-V Network Adapter
NetAdapterInterfaceDescriptions : {Microsoft Hyper-V Network Adapter}
NetAdapterInterfaceGuid : {65913aad-751a-4438-a48d-bbf2129fe40e}
IovSupport : False
IovSupportReasons : {Ensure that the system has chipset support for SR-IOV and that I/O
virtualization is enabled in the BIOS., To use SR-IOV on this
system, the system BIOS must be updated to allow Windows to control
PCI Express. Contact your system manufacturer for an update.,
SR-IOV cannot be used on this system as the PCI Express hardware
does not support Access Control Services (ACS) at any root port.
Contact your system vendor for further information., This network
adapter does not support SR-IOV.}
AvailableIPSecSA : 0
NumberIPSecSAAllocated : 0
AvailableVMQueues : 0
NumberVmqAllocated : 0
IovQueuePairCount : 0
IovQueuePairsInUse : 0
IovVirtualFunctionCount : 0
IovVirtualFunctionsInUse : 0
PacketDirectInUse : False
DefaultQueueVrssEnabledRequested : True
DefaultQueueVrssEnabled : False
DefaultQueueVmmqEnabledRequested : True
DefaultQueueVmmqEnabled : False
DefaultQueueVrssMaxQueuePairsRequested : 16
DefaultQueueVrssMaxQueuePairs : 0
DefaultQueueVrssMinQueuePairsRequested : 1
DefaultQueueVrssMinQueuePairs : 0
DefaultQueueVrssQueueSchedulingModeRequested : StaticVrss
DefaultQueueVrssQueueSchedulingMode : Dynamic
DefaultQueueVrssExcludePrimaryProcessorRequested : False
DefaultQueueVrssExcludePrimaryProcessor : False
SoftwareRscEnabled : False
BandwidthPercentage : 0
DefaultFlowMinimumBandwidthAbsolute : 0
DefaultFlowMinimumBandwidthWeight : 0
CimSession : CimSession: .
ComputerName : KEYLANDREMOTE
IsDeleted : False
DefaultQueueVmmqQueuePairs : 0
DefaultQueueVmmqQueuePairsRequested : 16
Name : nat
Id : d89b2760-78c6-4262-b424-4625515ffd3e
Notes :
Extensions : {Microsoft Windows Filtering Platform, Microsoft Azure VFP Switch
Extension, Microsoft NDIS Capture}
BandwidthReservationMode : Absolute
PacketDirectEnabled : False
EmbeddedTeamingEnabled : False
IovEnabled : False
SwitchType : Internal
AllowManagementOS : True
NetAdapterInterfaceDescription :
NetAdapterInterfaceDescriptions :
NetAdapterInterfaceGuid :
IovSupport : False
IovSupportReasons :
AvailableIPSecSA : 0
NumberIPSecSAAllocated : 0
AvailableVMQueues : 0
NumberVmqAllocated : 0
IovQueuePairCount : 0
IovQueuePairsInUse : 0
IovVirtualFunctionCount : 0
IovVirtualFunctionsInUse : 0
PacketDirectInUse : False
DefaultQueueVrssEnabledRequested : True
DefaultQueueVrssEnabled : False
DefaultQueueVmmqEnabledRequested : True
DefaultQueueVmmqEnabled : False
DefaultQueueVrssMaxQueuePairsRequested : 16
DefaultQueueVrssMaxQueuePairs : 0
DefaultQueueVrssMinQueuePairsRequested : 1
DefaultQueueVrssMinQueuePairs : 0
DefaultQueueVrssQueueSchedulingModeRequested : StaticVrss
DefaultQueueVrssQueueSchedulingMode : Dynamic
DefaultQueueVrssExcludePrimaryProcessorRequested : False
DefaultQueueVrssExcludePrimaryProcessor : False
SoftwareRscEnabled : False
BandwidthPercentage : 0
DefaultFlowMinimumBandwidthAbsolute : 0
DefaultFlowMinimumBandwidthWeight : 0
CimSession : CimSession: .
ComputerName : KEYLANDREMOTE
IsDeleted : False
DefaultQueueVmmqQueuePairs : 0
DefaultQueueVmmqQueuePairsRequested : 16
@gomez34 right, but you created the "nat" network yourself, we'll have to look into how would it be possible for us to support.
If you followed a guide or something to set it up, we'd be interested :)
Thanks for your help.
@Saviq with this can I help you carry out the tests you need. Thanks.
@gomez34 if you can tell me whether you can ping <vm hostname>.mshome.net
from the host in that scenario, that'd be helpful. Other than that, we'll take it from here :)
@Saviq Now I don't have any machine created, I only have the wsl machine. I am going to try to create a new virtual machine with Hyper-V.
@Saviq I have created a virtual machine with Hyper-V called ubuntu. I have assigned virtual swtich 'nat' and I have assigned an ip to the machine using these steps this I send ping the machine using its IP from the host and it responds but does not respond with the command you sent me ping ubuntu .mshome.net , it helps?
@gomez34 it does help, and confirms my worry that this doesn't integrate with the Internet Connection Sharing system. We'll have to dig deeper.
@Saviq No, it uses its own adapter that I have created with the commands of the first guide and I have called 'nat', it is a swtich manager with internal connection Switch
@Saviq I created a VMSwitch Called Default Switch
> Get-VMSwitch | Format-List
Name : Default Switch
Id : 317a5890-d3b2-4ca9-ab59-cef91744308b
Notes :
Extensions : {Microsoft Windows Filtering Platform, Microsoft Azure VFP Switch
Extension, Microsoft NDIS Capture}
BandwidthReservationMode : Absolute
PacketDirectEnabled : False
EmbeddedTeamingEnabled : False
IovEnabled : False
SwitchType : External
AllowManagementOS : True
NetAdapterInterfaceDescription : QLogic BCM5709C Gigabit Ethernet (NDIS VBD Client) #2
NetAdapterInterfaceDescriptions : {QLogic BCM5709C Gigabit Ethernet (NDIS VBD Client) #2}
NetAdapterInterfaceGuid : {4cdab563-d7e9-46fd-a7b1-2ab759e2d7f3}
IovSupport : False
IovSupportReasons : {The chipset on the system has errata which may cause system
instability if SR-IOV is used. As a precaution, the ability to use
SR-IOV has been disabled. SR-IOV may be enabled by running "bcdedit
/set {current} hypervisoriommupolicy enable" on the host. If the
system exhibits instability after SR-IOV is enabled, consider
restoring the default policy which will disable the ability to use
SR-IOV., To use SR-IOV on this system, the system BIOS must be
updated to allow Windows to control PCI Express. Contact your
system manufacturer for an update., SR-IOV cannot be used on this
system as the PCI Express hardware does not support Access Control
Services (ACS) at any root port. Contact your system vendor for
further information., This system has a security vulnerability in
the system I/O remapping hardware. As a precaution, the ability to
use SR-IOV has been disabled. You should contact your system
manufacturer for an updated BIOS which enables Root Port Alternate
Error Delivery mechanism. If all Virtual Machines intended to use
SR-IOV run trusted workloads, SR-IOV may be enabled by adding a
registry key of type DWORD with value 1 named IOVEnableOverride
under HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows
NT\CurrentVersion\Virtualization and changing state of the trusted
virtual machines. If the system exhibits reduced performance or
instability after SR-IOV devices are assigned to Virtual Machines,
consider disabling the use of SR-IOV....}
AvailableIPSecSA : 0
NumberIPSecSAAllocated : 0
AvailableVMQueues : 0
NumberVmqAllocated : 0
IovQueuePairCount : 0
IovQueuePairsInUse : 0
IovVirtualFunctionCount : 0
IovVirtualFunctionsInUse : 0
PacketDirectInUse : False
DefaultQueueVrssEnabledRequested : True
DefaultQueueVrssEnabled : False
DefaultQueueVmmqEnabledRequested : True
DefaultQueueVmmqEnabled : False
DefaultQueueVrssMaxQueuePairsRequested : 16
DefaultQueueVrssMaxQueuePairs : 0
DefaultQueueVrssMinQueuePairsRequested : 1
DefaultQueueVrssMinQueuePairs : 0
DefaultQueueVrssQueueSchedulingModeRequested : StaticVrss
DefaultQueueVrssQueueSchedulingMode : Dynamic
DefaultQueueVrssExcludePrimaryProcessorRequested : False
DefaultQueueVrssExcludePrimaryProcessor : False
SoftwareRscEnabled : True
BandwidthPercentage : 10
DefaultFlowMinimumBandwidthAbsolute : 100000000
DefaultFlowMinimumBandwidthWeight : 0
CimSession : CimSession: .
ComputerName : WIN-G785OVMQGJF
IsDeleted : False
DefaultQueueVmmqQueuePairs : 0
DefaultQueueVmmqQueuePairsRequested : 16
I then tried to install multipass with choco but it still gives me the ERROR: Hyper-V requires Windows 10 Pro/Enterprise with a build version > 17134
issue
> choco install multipass
Chocolatey v0.10.15
Installing the following packages:
multipass
By installing you accept licenses for the packages.
Progress: Downloading multipass 1.2.1... 100%
multipass v1.2.1 [Approved]
multipass package files install completed. Performing other installation steps.
The package multipass wants to run 'chocolateyinstall.ps1'.
Note: If you don't run this script, the installation will fail.
Note: To confirm automatically next time, use '-y' or consider:
choco feature enable -n allowGlobalConfirmation
Do you want to run the script?([Y]es/[A]ll - yes to all/[N]o/[P]rint): A
ERROR: Hyper-V requires Windows 10 Pro/Enterprise with a build version > 17134
The install of multipass was NOT successful.
Error while running 'C:\ProgramData\chocolatey\lib\multipass\tools\chocolateyinstall.ps1'.
See log for details.
Chocolatey installed 0/1 packages. 1 packages failed.
See the log for details (C:\ProgramData\chocolatey\logs\chocolatey.log).
Failures
- multipass (exited -1) - Error while running 'C:\ProgramData\chocolatey\lib\multipass\tools\chocolateyinstall.ps1'.
See log for details.
Below the Windows Server 2019 version I use
> systeminfo /fo csv | ConvertFrom-Csv | select OS*, System*, Hotfix* | Format-List
OS Name : Microsoft Windows Server 2019 Datacenter
OS Version : 10.0.17763 N/A Build 17763
OS Manufacturer : Microsoft Corporation
OS Configuration : Standalone Server
OS Build Type : Multiprocessor Free
System Boot Time : 2/29/2020, 2:42:29 PM
System Manufacturer : HP
System Model : ProLiant DL360 G6
System Type : x64-based PC
System Directory : C:\Windows\system32
System Locale : en-us;English (United States)
Hotfix(s) : 3 Hotfix(s) Installed.,[01]: KB4514366,[02]: KB4512577,[03]: KB4512578
As a side note, I have created docker-machine
VMs using Hyper-V on this same machine. DockerMachine requires a vmSwitch
called Primary Virtual Switch
. I just renamed the docker-machine
required virtual switch to Default Switch
Hi @b300098957 we identify the switch using a UUID rather than name, but more importantly we rely on Windows ICS (that backs the original Default Switch) to give us the IP of the instance via the .mshome.net
domain.
FWIW the choco package is maintained here and that's the error you're seeing.
@Saviq is there a way to pick the vmSwitch's name rather than using the UUID?
for example:
> multipass launch --name ubuntu-vm --vmswitch "my VmSwitch"
something similar to https://docs.docker.com/machine/drivers/hyper-v/
> docker-machine create --driver hyperv vm --hyperv-virtual-switch "my VmSwitch"
@b300098957 not at the moment, and as mentioned above, this wouldn't help us because we still won't know the IP the instance gets. We have a plan to avoid that requirement, but it is somewhat down the line.
@Saviq, I am not sure how docker-machine
achieves its launch but basically, on Windows Servers, when using a net adapter which is connected to a DHCP server, the virtual switch attached to that same net adapter gets a new IP address from the DHCP server. That means one can create multiple VMs with different IP addresses using the same virtual switch.
Unfortunately on Windows Server 2019, docker-machine
's boot2docker
image, uses tiny linux and I wanted to use ubuntu
:penguin: to create a tiny microk8s
cluster.
Thanks for the quick responses
@b300098957 sure, I understand how the VM is getting an IP address, but Multipass needs to know that address… and the only reliable "standard" way we found was to ask the Internet Connection Sharing DNS server to resolve <hostname>.mshome.net
for us. That won't work with the switch you created, as far I can tell.
BTW, this issue is about WinServer 2016, you're using 2019, correct? I was under the impression that 2019 actually does have the "Default Switch" Multipass expects (UUID C08CB7B8-9B3C-408E-8E30-5E16A3AEB444), but can't see that in your config?
Yes, sorry, I am using 2019. the UUID you are referring to doesn't seem to be there.
> Get-VMSwitch -Id C08CB7B8-9B3C-408E-8E30-5E16A3AEB444 | Format-List
Get-VMSwitch : No Ethernet switch could be found matching the specified criteria.
At line:1 char:1
+ Get-VMSwitch -Id C08CB7B8-9B3C-408E-8E30-5E16A3AEB444 | Format-List
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (:) [Get-VMSwitch], VirtualizationException
+ FullyQualifiedErrorId : ObjectNotFound,Microsoft.HyperV.PowerShell.Commands.GetVMSwitch
Has this issue been resolved or is a dead stick?
Hi @rdafoe, not resolved, no. We may be able to support it in the future, but not as things stand.
Hi @rdafoe, not resolved, no. We may be able to support it in the future, but not as things stand.
Thanks! I assume this applies to 2019 Server as well?
Thanks! I assume this applies to 2019 Server as well?
Correct, neither provide the Default Switch that we use to hook instances up to the network.
FWIW we're planning to stop relying on networking between the host and the instance, at which point Server could become an option again.
FWIW we're planning to stop relying on networking between the host and the instance, at which point Server could become an option again.
@Saviq Do you know if there an existing issue tracking that work?
For anyone coming here the workaround I found to this (which could be scripted in PowerShell I'm sure) was to use Multipass to create the VMs on a Windows 10 (11 actually) machine and then move the VHD to the server. You need to make sure you have the following configured but it boots successfully and works fine as far as I can tell.
- Create Gen 2 machine attaching the VHD and other initial settings as you like.
- Copy MAC (under advanced features) from the old external network adapter to the new (if you want external access)
- I've only copied this for my additional external network adapter but I believe probably helps keep the network config solid.
- Turn off secure boot
- Set disk top of boot order
I would also advise setting a console access user in your cloud-init if you use one or creating a user before the move as when you do this as you lose the immediate easy access to console multipass provides.
Let me know if anyone is considering this and I can create a more detailed guide.