summaryrefslogtreecommitdiff
path: root/src/Propellor/Property/Libvirt.hs
diff options
context:
space:
mode:
authorSean Whitton2018-11-09 17:14:32 -0700
committerSean Whitton2018-11-09 17:14:32 -0700
commitd6ba671cb10da78b619e281bc7ffeff6fe020b4c (patch)
tree023f6a018f59a12d2882c7d541f346d4d5e822fd /src/Propellor/Property/Libvirt.hs
parentbe6065276a0bb80fc70916a8b212dc36ffeb7656 (diff)
stop passing --os-type to virt-install
This argument is not documented in recent versions of the virt-install(1) manpage, and testing reveals that at least along with --os-variant=debian9, additionally passing --os-type=Linux makes no difference to the generated XML. It makes sense that --os-variant would be sufficient, since it has a superset of the semantic content of --os-type.
Diffstat (limited to 'src/Propellor/Property/Libvirt.hs')
-rw-r--r--src/Propellor/Property/Libvirt.hs10
1 files changed, 1 insertions, 9 deletions
diff --git a/src/Propellor/Property/Libvirt.hs b/src/Propellor/Property/Libvirt.hs
index 82e7e1a5..46caf2f9 100644
--- a/src/Propellor/Property/Libvirt.hs
+++ b/src/Propellor/Property/Libvirt.hs
@@ -105,7 +105,7 @@ defined imageType (MiBMemory mem) (NumVCPUs cpus) auto h =
xmlDefined = check (not <$> doesFileExist conf)
(scriptProperty
[ "virt-install -n " ++ hostName h
- ++ osTypeArg ++ osVariantArg
+ ++ osVariantArg
++ " --memory=" ++ show mem
++ " --vcpus=" ++ show cpus
++ " --disk path=" ++ imageLoc
@@ -133,7 +133,6 @@ defined imageType (MiBMemory mem) (NumVCPUs cpus) auto h =
conf = "/etc/libvirt/qemu" </> hostName h <.> "xml"
confTmp = conf <.> "tmp"
- osTypeArg = maybe "" (" --os-type=" ++) $ osType h
osVariantArg = maybe "" (" --os-variant=" ++) $ osVariant h
autoStartArg = case auto of
AutoStart -> " --autostart"
@@ -141,13 +140,6 @@ defined imageType (MiBMemory mem) (NumVCPUs cpus) auto h =
-- ==== utility functions ====
-osType :: Host -> Maybe String
-osType h = hostSystem h >>= \s -> case s of
- System (Debian Linux _) _ -> Just "Linux"
- System (Buntish _) _ -> Just "Linux"
- System ArchLinux _ -> Just "Linux"
- _ -> Nothing
-
-- TODO specify more of these
osVariant :: Host -> Maybe String
osVariant h = hostSystem h >>= \s -> case s of