From 562bc65dec14c85981dc302e467ac200f88dc163 Mon Sep 17 00:00:00 2001 From: Rolf Neugebauer Date: Fri, 10 Mar 2017 14:55:23 +0000 Subject: [PATCH] infrakit: Attach ISO file to VM if it exists The file can me mounted in the VM as /dev/sr0 Signed-off-by: Rolf Neugebauer --- tools/infrakit.hyperkit/cmd/instance.go | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/tools/infrakit.hyperkit/cmd/instance.go b/tools/infrakit.hyperkit/cmd/instance.go index 8e0419035..0c18ea8d0 100644 --- a/tools/infrakit.hyperkit/cmd/instance.go +++ b/tools/infrakit.hyperkit/cmd/instance.go @@ -239,9 +239,11 @@ func (v hyperkitPlugin) DescribeInstances(tags map[string]string) ([]instance.De const hyperkitArgs = "-A -u -F {{.VMLocation}}/hyperkit.pid " + "-c {{.Properties.CPUs}} -m {{.Properties.Memory}}M " + - "-s 0:0,hostbridge -s 31,lpc -s 5,virtio-rnd " + - "-s 4,virtio-blk,{{.VMLocation}}/disk.img " + - "-s 2:0,virtio-vpnkit,path={{.VPNKitSock}} " + + "-s 0:0,hostbridge " + + "-s 1:0,virtio-vpnkit,path={{.VPNKitSock}} " + + "-s 2,virtio-blk,{{.VMLocation}}/disk.img " + + "-s 10,virtio-rnd " + + "-s 31,lpc " + "-l com1,autopty={{.VMLocation}}/tty,log={{.VMLocation}}/console-ring" const hyperkitKernArgs = "kexec," + "{{.Properties.Moby}}-bzImage," + @@ -260,7 +262,6 @@ func (v hyperkitPlugin) execHyperKit(spec instance.Spec, params map[string]inter if err != nil { return err } - // Build arguments c := []string{v.HyperKit} c = append(c, strings.Split(args, " ")...) @@ -286,6 +287,7 @@ func (v hyperkitPlugin) execHyperKit(spec instance.Spec, params map[string]inter if err != nil { return err } + c = append(c, "-s", "4,ahci-cd,"+path.Join(instanceDir, "config.iso")) } cmd := exec.Command(c[0], c[1:]...)