code: private VirtualMachine createLinuxVm(VirtualMachine.DefinitionStages.WithOS virtualMachineBuilder) {
      return virtualMachineBuilder
          .withPopularLinuxImage(KnownLinuxVirtualMachineImage.valueOf(template.imageId()))
          .withRootUsername(username)
          .withRootPassword(password)
          .withSize(hardware)
          .create();
    }
docs: is different for Windows/Linux os and custom/builtin image