mirror of
https://github.com/containers/podman.git
synced 2025-06-21 01:19:15 +08:00
Merge pull request #20135 from ashley-cui/hypervroot
hyperV: Respect rootful option on machine init
This commit is contained in:
@ -174,10 +174,6 @@ var _ = Describe("podman machine init", func() {
|
|||||||
})
|
})
|
||||||
|
|
||||||
It("machine init rootless docker.sock check", func() {
|
It("machine init rootless docker.sock check", func() {
|
||||||
if testProvider.VMType() == machine.HyperVVirt {
|
|
||||||
//https://github.com/containers/podman/issues/20092
|
|
||||||
Skip("rootless is broken with hyperv")
|
|
||||||
}
|
|
||||||
i := initMachine{}
|
i := initMachine{}
|
||||||
name := randomString()
|
name := randomString()
|
||||||
session, err := mb.setName(name).setCmd(i.withImagePath(mb.imagePath)).run()
|
session, err := mb.setName(name).setCmd(i.withImagePath(mb.imagePath)).run()
|
||||||
|
@ -95,6 +95,7 @@ func (m *HyperVMachine) writeIgnitionConfigFile(opts machine.InitOptions, user,
|
|||||||
TimeZone: opts.TimeZone,
|
TimeZone: opts.TimeZone,
|
||||||
WritePath: m.IgnitionFile.GetPath(),
|
WritePath: m.IgnitionFile.GetPath(),
|
||||||
UID: m.UID,
|
UID: m.UID,
|
||||||
|
Rootful: m.Rootful,
|
||||||
}
|
}
|
||||||
|
|
||||||
if err := ign.GenerateIgnitionConfig(); err != nil {
|
if err := ign.GenerateIgnitionConfig(); err != nil {
|
||||||
@ -243,6 +244,7 @@ func (m *HyperVMachine) Init(opts machine.InitOptions) (bool, error) {
|
|||||||
DiskSize: opts.DiskSize,
|
DiskSize: opts.DiskSize,
|
||||||
Memory: opts.Memory,
|
Memory: opts.Memory,
|
||||||
}
|
}
|
||||||
|
m.Rootful = opts.Rootful
|
||||||
|
|
||||||
// If the user provides an ignition file, we need to
|
// If the user provides an ignition file, we need to
|
||||||
// copy it into the conf dir
|
// copy it into the conf dir
|
||||||
|
Reference in New Issue
Block a user